bugmake - Bugs: bug #21771, make 3.81 is deleting intermediate...


bug #21771: make 3.81 is deleting intermediate files in a wrong way

Submitted by:  Rajasekhar <rathreya>
Submitted on:  Tue 11 Dec 2007 05:44:48 AM UTC  
Severity:  3 - Normal Item Group:  Bug
Status:  Duplicate Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  3.81 Operating System:  POSIX-Based
Fixed Release:  None Triage Status:  None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sat 01 Aug 2009 07:41:10 PM UTC, comment #1:

This appears to me to be a duplicate of bug #17752. I can no longer reproduce it in the latest CVS version of GNU make.

Paul D. Smith <psmith>
Project Administrator
Tue 11 Dec 2007 05:44:48 AM UTC, original submission:

bash-3.00$ cat makefile

-include abc.def
-include abc.dep

%.do :
echo "$@: $^"
/bin/rm -f $*.dep $*.def

%.dep : %.def
echo "$*.do : $(DEF)" > $@

%.def :
echo "DEF := $*" > $@

makefile : ;
abc : ;

Here's the o/p when we run with make 3.80

bash-3.00$ /sw/packages/make/3.80/bin/make abc.do
echo "DEF := abc" > abc.def
echo "abc.do : " > abc.dep
echo "abc.do: "
/bin/rm -f abc.dep abc.def


When we run with 3.81

bash-3.00$ /sw/packages/make/3.81/bin/make abc.do
echo "DEF := abc" > abc.def
echo "abc.do : " > abc.dep
echo "DEF := abc" > abc.def
echo "DEF := abc" > abc.def
echo "DEF := abc" > abc.def



AFAIK the issue here is make 3.81 is considering the .def file as intermediate file and deleting it after producing the .dep file so every time when it is re-reading the include statements it is not able to find the .def file and it is going into infinite loop.

when we add:

.SECONDARY : abc.def



then make-3.81 does not delete abc.def (as part of cleaning up the intermediate files).

One more thing of interest here is if we change the order of includes to

-include abc.dep
-include abc.def

Then make 3.81 works fine !!.

Rajasekhar <rathreya>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by rathreya (Submitted the item)
  • -email is unavailable- added by rathreya

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-08-01 psmith StatusNone => Duplicate
        Open/ClosedOpen => Closed
    2007-12-11 rathreya Carbon-Copy- => Added -email is unavailable-

    Back to the top

    Powered by Savane 3.3