help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: creating a chain which has an explicit target rule


From: Boris Kolpackov
Subject: Re: creating a chain which has an explicit target rule
Date: Tue, 11 Jan 2005 22:04:32 +0000 (UTC)
User-agent: nn/6.6.5+RFC1522

"Fithian, Craig [IT]" <address@hidden> writes:

> Unfortunately it doesn't  work with gnu make - ...
>
> default: odir/file.o
>
> gsrcdir/file.c: input.l
>       generate_file < input.l > $@
>
> odir/%.o: gsrcdir/%.c
>       cc -c $< -o $@

I modified your example like this (/tmp/makefile):

default: out/file.o

src/file.c: input.l
        echo input.l to $@

out/%.o: src/%.c
        echo -c $< -o $@


Then I do

$ cd /tmp
$ mkdir src out
$ touch input.l

This setup works as expected with make 3.80 from Debian unstable
and with current CVS head. Which version of make are you using?






reply via email to

[Prev in Thread] Current Thread [Next in Thread]