bugmake - Bugs: bug #23361, Infinite loop when including file...

 
 

bug #23361: Infinite loop when including file that depends on a phony target

Submitted by:  None
Submitted on:  Mon 26 May 2008 09:48:36 AM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: Not A BugPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.81Operating System: Any
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 07 Jun 2009 01:57:46 AM UTC, comment #2:

Dave's comment is correct. This is behaving as expected. Not ideally, but as expected. Since make re-execs itself it's actually quite difficult to know what files were already built by a previous incarnation.

For a while I had a feature where the re-exec would add -o options for all makefiles rebuilt so that the next invocation would not try to rebuild them. However, some people rely on this behavior AND it also caused problems with makefiles that have lots of included files: the re-exec was failing due to running out of environment space.

Paul D. Smith <psmith>
Project Administrator
Mon 26 May 2008 02:11:58 PM UTC, comment #1:

This looks like the intended behaviour to me. See the manual chapter on "Remaking makefiles".

http://www.gnu.org/software/make/manual/make.html#Remaking-Makefiles

Since the file 'bar' always becomes newer every time it is remade, remake always believes it has to start again, in case the contents have changed.

You probably want to look at something like the use of the 'move-if-change' scripts used in gnu makefiles (e.g. binutils, gcc) to construct something in a temporary file and only update the actual file on which there is a dependency if the contents have changed.

Dave Korn <davek>
Mon 26 May 2008 09:48:36 AM UTC, original submission:

#############################
.PHONY: foo
bar: foo
touch bar
include bar
#############################

Running 'make' will do "touch bar"'s forever.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

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 davek (Posted a comment)
  •  

    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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 07 Jun 2009 01:57:46 AM UTCpsmithStatusNone=>Not A Bug
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1