From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <5446730.4oMZM0t5oA@coil> Date: Thu, 19 Dec 2013 10:20:49 -0600 Message-ID: From: Blake McBride To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=047d7b86eae672772d04ede58b6d Subject: Re: [9fans] Problem with mk Topicbox-Message-UUID: a0ffbbcc-ead8-11e9-9d60-3106f5b1d025 --047d7b86eae672772d04ede58b6d Content-Type: text/plain; charset=ISO-8859-1 On Thu, Dec 19, 2013 at 2:16 AM, dexen deVries 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
On T= hu, Dec 19, 2013 at 2:16 AM, dexen deVries &= lt;dexen.devri= es@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 us= ing mk include:
<| GEN_DEPS
where `GEN_DEPS' is your script generating deps in form TARGET: PREREQUISITE


The following mkfile=A0does what I need/expect without explicit dep= endencies.

# Makefile for Plan 9

</$objtype/mkfile

DYNACE_PATH =3D ../..

BINDIR =3D $DYNACE_PATH/bin
LIBDIR =3D $DY= NACE_PATH/lib
INCDIR =3D $DYNACE_PATH/include

TARGET =3D main

CLASSES =3D class1.d<= /div>

CFILES =3D main.c

OBJS =3D ${CFILES:%.<= /span>c=3D%.$O} ${CLASSES:%.<= /span>d=3D%.$O}

CFLAGS =3D -DPLAN9 -I$INCDIR -p

C_CLASSES =3D ${CLASSES:%.d=3D%.c}

%.$O : %.c
$CC $CFLAGS $stem.c=

%.c : %.d
$BINDIR/dpp -g -p $stem.d

$TARGET : generics.$O $OBJS
$LD -o $target $OBJS generic= s.$O $LIBDIR/Dynace.a

generics.h : generics.<= /span>1 $CLASSES
$BINDIR/dpp -g -t g= enerics.h generics.c generics.$O -h -s $newprereq

= generics.c : generics.h
$BINDIR/dpp -g -c

generics.1 <= span id=3D"3c8f1353-9aa8-4bda-a5cd-ca8a13848024" class=3D"GINGER_SOFTWARE_m= ark">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

=A0
--047d7b86eae672772d04ede58b6d--