[Top][All Lists]
[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 18:16:42 -0600 |
User-agent: |
Mutt/1.5.6i |
Fithian, Craig [IT] <address@hidden> writes:
> Ooops. The example I gave works for me too. I guess I oversimplified
> my real example which includes a construct to automatically create the
> directories. Here is a corrected example makefile:
>
> default: out/file.o
>
> %/.exists:
> -mkdir $(@D)
> touch $@
>
> #works
> src/%.c: %.l src/.exists
> @echo $< to $@
> touch $@
>
> #does not work
> #src/file.c: file.l src/.exists
> # @echo file.l to $@
> # touch $@
>
>
> out/%.o: src/%.c out/.exists
> @echo -c $< -o $@
> touch $@
>
> To test, delete the out and src directories, touch file.l, and then 'make'.
> I may be able to figure out something from make -d, but so far I have not
> deciphered it yet. Thanks for looking into it.
>
> Craig
>
>
> PS:
>
> I have been testing with 2 versions:
>
> GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
> Built for i386-redhat-linux-gnu
>
> GNU Make version 3.78.1, by Richard Stallman and Roland McGrath.
> Built for sparc-sun-solaris2.5.1
>
It works as expected with GNU make 3.80 from Debian unstable as well
as CVS head.
-boris
signature.asc
Description: Digital signature