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 - NormalItem Group: Bug
Status: DuplicatePrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.81Operating System: POSIX-Based
Fixed Release: NoneTriage Status: None

Add a New Comment (Rich MarkupRich 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 File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

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

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 01 Aug 2009 07:41:10 PM UTCpsmithStatusNone=>Duplicate
    Tue 11 Dec 2007 05:44:48 AM UTCrathreyaCarbon-Copy-=>Added -unavailable-

    Back to the top

    Powered by Savane 3.1-cleanup