From: Blake McBride <blake@mcbride.name>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Problem with mk
Date: Thu, 19 Dec 2013 10:20:49 -0600 [thread overview]
Message-ID: <CABwHSOvA=8tN0UKTVf=pWK6oZv9kD0je7i+miKQ84we7mN=qTA@mail.gmail.com> (raw)
In-Reply-To: <CAJUT6o7hmcdmiYK4w3QxNjKi3=cjaRkq5x4XJioghZM0BhQ_Tg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1328 bytes --]
On Thu, Dec 19, 2013 at 2:16 AM, dexen deVries <dexen.devries@gmail.com>wrote:
> the problem is not solved, merely one of the manifestation is eliminated.
> actual solution requires stating all the dependencies.
>
> if your list of sources and/or targets is dynamic, consider using mkinclude:
> <| GEN_DEPS
> where `GEN_DEPS' is your script generating deps in form TARGET:
> PREREQUISITE
>
>
The following mkfile does what I need/expect without explicit dependencies.
# Makefile for Plan 9
</$objtype/mkfile
DYNACE_PATH = ../..
BINDIR = $DYNACE_PATH/bin
LIBDIR = $DYNACE_PATH/lib
INCDIR = $DYNACE_PATH/include
TARGET = main
CLASSES = class1.d
CFILES = main.c
OBJS = ${CFILES:%.c=%.$O} ${CLASSES:%.d=%.$O}
CFLAGS = -DPLAN9 -I$INCDIR -p
C_CLASSES = ${CLASSES:%.d=%.c}
%.$O : %.c
$CC $CFLAGS $stem.c
%.c : %.d
$BINDIR/dpp -g -p $stem.d
$TARGET : generics.$O $OBJS
$LD -o $target $OBJS generics.$O $LIBDIR/Dynace.a
generics.h : generics.1 $CLASSES
$BINDIR/dpp -g -t generics.h generics.c generics.$O -h -s $newprereq
generics.c : generics.h
$BINDIR/dpp -g -c
generics.1 newgens: $INCDIR/generics.h
$BINDIR/dpp -g $INCDIR/generics.h -s $CLASSES -h
touch generics.1
$OBJS $C_CLASSES : generics.h
clean realclean:VQ:
rm -f generics.* $TARGET *.$O $C_CLASSES
[-- Attachment #2: Type: text/html, Size: 6976 bytes --]
next prev parent reply other threads:[~2013-12-19 16:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 15:23 Blake McBride
2013-12-18 15:37 ` dexen deVries
2013-12-18 16:07 ` Blake McBride
2013-12-18 20:21 ` Blake McBride
2013-12-18 21:04 ` Jacob Todd
2013-12-18 21:14 ` Blake McBride
2013-12-19 8:16 ` dexen deVries
2013-12-19 16:20 ` Blake McBride [this message]
2013-12-18 16:11 ` Blake McBride
2013-12-18 16:40 ` Bakul Shah
2013-12-18 17:06 ` Aram Hăvărneanu
2013-12-18 17:18 ` Blake McBride
2013-12-18 17:27 ` Rubén Berenguel
2013-12-18 17:28 ` Blake McBride
2013-12-18 17:47 ` Kurt H Maier
2013-12-18 18:13 ` Bakul Shah
2013-12-18 18:20 ` Blake McBride
2013-12-18 18:28 ` Blake McBride
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABwHSOvA=8tN0UKTVf=pWK6oZv9kD0je7i+miKQ84we7mN=qTA@mail.gmail.com' \
--to=blake@mcbride.name \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).