[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #25493] -include filename does not show correct dependency errors
From: |
Pierre Willard |
Subject: |
[bug #25493] -include filename does not show correct dependency errors |
Date: |
Wed, 04 Feb 2009 21:52:14 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 |
URL:
<http://savannah.gnu.org/bugs/?25493>
Summary: -include filename does not show correct dependency
errors
Project: make
Submitted by: willard
Submitted on: Wed 04 Feb 2009 09:52:12 PM GMT
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: 3.81
Operating System: None
Fixed Release: None
_______________________________________________________
Details:
When using the "-include filename"(instead of just "include filename"), if
this filename includes dependencies that are missing, make does not show those
missing dependencies...
For example, if using:
-include foo.d
with foo.d being:
food.d foo.o: foo.c xxx.h
Let's say xxx.h does not exist (and cannot be generated) , the make fails,
but it does not say it's because of xxx.h missing.
If instead, this is used:
include foo.d
then it works fine...
I understand that the '-' in front of include means that THIS file 'foo.d'
should not itself generate an error, but I would expect the content of foo.d
to be used normally....
Full 1st example:
-----------------
$ 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/tstmake]
$ make -f bad.mak
make: *** No rule to make target `foo.d', needed by `all'. Stop.
[/cygdrive/d/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/tstmake]
$ make -f good.mak
make: *** No rule to make target `xxx.h', needed by `foo.d'. Stop.
[/cygdrive/d/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.
Full 2nd example:
-----------------
it's the same if foo.d is not a direct target. It's even worse as make fails
without ANY error message.
Example2:
$ cat bad2.mak
all: 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/tstmake]
$ make -f bad2.mak
[/cygdrive/d/tstmake]
$ cat makefile
all:
$(MAKE) -f bad2.mak
[/cygdrive/d/tstmake]
$ make
make -f bad2.mak
make: *** [all] Error 2
[/cygdrive/d/tstmake]
$ cat foo.d
foo.d foo.o: foo.c xxx.h
See that the 'make -f bad2.mak' shows no message at all..(but going thru a
makefile shows Error 2).
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?25493>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #25493] -include filename does not show correct dependency errors,
Pierre Willard <=