bugmake - Bugs: bug #30463, cannot make include makefile...

 
 

bug #30463: cannot make include makefile .INTERMEDIATE

Submitted by:  None
Submitted on:  Fri 16 Jul 2010 03:42:34 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: Not A BugPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.80Operating System: None
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.

 

Sat 17 Jul 2010 03:07:33 PM UTC, comment #2:

I suppose it might be nice for make to be able to determine the infinite loop and avoid it, but as for the underlying behavior, this is exactly as make should behave. That's what INTERMEDIATE means: the value is deleted. Make re-execs itself when a new makefile is changed, which means the only opportunity it has to clean up intermediate files is right before it re-execs (because after it re-execs, the next time make runs the file is not considered intermediate anymore (only files this instance of make creates are considered intermediate--so the after-exec instance of make will not delete it since it already existed)).

There's really no good way to delete a makefile after you're done other than, as Olexiy points out, some kind of recursion.

Paul D. Smith <psmith>
Project Administrator
Sat 17 Jul 2010 02:52:38 PM UTC, comment #1:

I would separate removal of x.mk

Create some start.mk

all:
$(MAKE) -f oops.mk
rm x.mk

remove .INTERMEDIATE from your oops.mk

Olexiy Buyanskyy <olexiyb>
Fri 16 Jul 2010 03:42:34 PM UTC, original submission:

The following little makefile never terminates:

.INTERMEDIATE: x.mk
include x.mk
x.mk:
echo "all:; echo ok" > x.mk

I would like it to remove x.mk after the make process is done.
Same behavior in 3.81

The following is a trace of make -rd

This program built for x86_64-unknown-linux-gnu
Reading makefiles...
Reading makefile `oops.mk'...
Reading makefile `x.mk' (search path) (no ~ expansion)...
oops.mk:2: x.mk: No such file or directory
Updating makefiles....
Considering target file `x.mk'.
File `x.mk' does not exist.
Finished prerequisites of target file `x.mk'.
Must remake target `x.mk'.
echo "all:; echo ok" > x.mk
Putting child 0x00537980 (x.mk) PID 14120 on the chain.
Live child 0x00537980 (x.mk) PID 14120
Reaping winning child 0x00537980 PID 14120
Removing child 0x00537980 PID 14120 from chain.
Successfully remade target file `x.mk'.
Considering target file `oops.mk'.
Looking for an implicit rule for `oops.mk'.
No implicit rule found for `oops.mk'.
Finished prerequisites of target file `oops.mk'.
No need to remake target `oops.mk'.
Removing intermediate files...
rm x.mk
Re-executing[2]: gmake -f oops.mk -rd
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

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 olexiyb (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
    Sat 17 Jul 2010 03:07:33 PM UTCpsmithStatusNone=>Not A Bug
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1