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.
_______________________________________________
Bug-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-make