[Top][All Lists]

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

[bug #31149] Rules to build -include makefiles cause unexpected side-eff

From: Paul D. Smith
Subject: [bug #31149] Rules to build -include makefiles cause unexpected side-effects
Date: Tue, 28 Sep 2010 13:28:33 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100915 Ubuntu/10.04 (lucid) Firefox/3.6.10

Update of bug #31149 (project make):

           Triage Status:                    None => Verified               
                 Summary: The rule for generation dependency file (%.d)
doesn't work => Rules to build -include makefiles cause unexpected


Follow-up Comment #1:

The output you show here is actually the output you get when you use GNU make
3.81, not GNU make 3.82.  And, this output is correct for the reasons I've
described in response to your email to the bug-make mailing list.

However, your example does point out what appears to be a bug in GNU make
3.82.  In 3.82 in a completely clean directory your makefile gives a different
output; instead of succeeding it shows:

Creating dir Obj
make: *** No rule to make target `Obj/test1.d', needed by `test.so'.  Stop.

Looking at the debug and -p output, it seems that after we try and fail to
build the Obj/test1.d file for the -include, somehow the prerequisite
"test1.d" is changed to be Obj/test1.d which is wrong:

$ rm -rf Obj && make-3.82 -r -d
Updating makefiles....
 Considering target file `Obj/test1.d'.
 Failed to remake target file `Obj/test1.d'.
Updating goal targets....
Considering target file `test.so'.
  Considering target file `Obj/test1.d'.
  Recently tried and failed to update file `Obj/test1.d'.
make: *** No rule to make target `Obj/test1.d', needed by `test.so'.  Stop.

??!!  Looking at the output of make -p for the above, I see:

test.so: Obj Obj/test1.d test2.d test1.o test2.o

??what??  Why is the prerequisite in the list here Obj/test1.d?  It should
just be test1.d.

So, although the original bug report is not valid (the makefile is not
correct) and the example works as expected in GNU make 3.81, I'm leaving this
open to track the unexpected behavior in GNU make 3.82.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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