Fithian, Craig [IT] <[EMAIL PROTECTED]> 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

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to