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

 
 

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

Submitter:  None
Submitted:  Mon 26 May 2008 09:48:36 AM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Not A Bug Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  3.81 Operating System:  Any
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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 Files:
   
   
Comment:
   

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-06-07 psmith StatusNone Not A Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code