bug-make
[Top][All Lists]
Advanced

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

Re: -include filename does not show correct dependency errors


From: willard
Subject: Re: -include filename does not show correct dependency errors
Date: Tue, 27 Jan 2009 21:44:07 -0800 (PST)

this is my example (create the foo.d manually as below)

$ cat bad.mak

all: foo.d foo.ooo

COMPILE=gcc

%.o: %.c
        $(COMPILE) -c $<

%.d: %.c
        $(COMPILE) -c $< -MM -o $*.d

-include foo.d

foo.ooo: foo.o
        ld -o foo.ooo foo.o
[/cygdrive/d/opentv/tstmake]
$ make -f bad.mak
make: *** No rule to make target `foo.d', needed by `all'.  Stop.
[/cygdrive/d/opentv/tstmake]
$ cat good.mak

all: foo.d foo.ooo

COMPILE=gcc

%.o: %.c
        $(COMPILE) -c $<

%.d: %.c
        $(COMPILE) -c $< -MM -o $*.d

include foo.d

foo.ooo: foo.o
        ld -o foo.ooo foo.o
[/cygdrive/d/opentv/tstmake]
$ make -f good.mak
make: *** No rule to make target `xxx.h', needed by `foo.d'.  Stop.
[/cygdrive/d/opentv/tstmake]
$ cat foo.d
foo.d foo.o: foo.c xxx.h

the only difference between the 'good.mak' and 'bad.mak' is the '-' prefix
on the include... 
See that the good.mak really displays what the problem is... whereas the
bad.mak messages are not helpful.


-- 
View this message in context: 
http://www.nabble.com/-include-filename-does-not-show-correct-dependency-errors-tp21699973p21700324.html
Sent from the Gnu - Make - Bugs mailing list archive at Nabble.com.





reply via email to

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