[bug #25493] -include filename does not show correct dependency errors

2009-08-02 Thread Paul D. Smith

Update of bug #25493 (project make):

  Status:None => Duplicate  
 Open/Closed:Open => Closed 

___

Follow-up Comment #1:

This is a duplicate of bug #15110

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/



___
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make


[bug #25493] -include filename does not show correct dependency errors

2009-02-04 Thread Pierre Willard

URL:
  

 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:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/



___
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make