bugmake - Bugs: bug #15145, improving automatic generation of...

 
 

bug #15145: improving automatic generation of prerequisites example

Submitted by:  None
Submitted on:  Mon 05 Dec 2005 04:14:17 AM UTC  
 
Severity: 3 - NormalItem Group: Documentation
Status: FixedPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.79.1Operating System: POSIX-Based
Fixed Release: 3.80Triage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 03 Jan 2006 04:07:34 AM UTC, comment #1:

This has already been fixed in the latest release (GNU make 3.80).

Paul D. Smith <psmith>
Project Administrator
Mon 05 Dec 2005 04:14:17 AM UTC, original submission:

Hi guys!
In the documentation I've met your example of the rule to generate prerequisites automatically (sec. 4.14 of the online manual). I think it's not clean enough because in the case when compiler fails to generate dependancy it keeps a temporary file undeleted, each time. I think it's better to give up using 'set -e' feature of shell and think about other possibilities to check exit status of a command that needs to be followed by another command like in a pipeline. I would suggest to put a following construct
[ -s $@ ] || ( rm -f $@; false )
in the end of the rule. So if you don't have a target file or it is empty you make it sure that return status is non-zero and there is no target file left with updated time stamp.

One more thing. 'set -e' does not work for pipeline commands as assumed in make.info documentation v3.79.1 (the same section about automatic prerequisites).

Cheers,
Sergey

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

 

CC list is empty

 

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
Tue 03 Jan 2006 04:07:34 AM UTCpsmithStatusNone=>Fixed
  Open/ClosedOpen=>Closed
  Fixed ReleaseNone=>3.80

Back to the top


Powered by Savane 3.1-cleanup1