bugmake - Bugs: bug #48060, Recipe line flags leak between...

 
 

bug #48060: Recipe line flags leak between targets defined in one rule

Submitted by:  Paul D. Smith <psmith>
Submitted on:  Mon 30 May 2016 09:32:13 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: 3.82Operating 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.

 

Mon 30 May 2016 09:32:13 PM UTC, original submission:

Found this on a StackOverflow question from last year and simplified it. Consider this makefile:

Here we use a target-specific variable to specify whether or not the "recurse" flag is set: this allows us to have a single rule definition which defines two different recipes which have different recurse flags set (something that's not possible any other way).

Now consider the (correct) behavior when we run each one individually:

For "foo", where the recurse flag is set via the target-specific variable, we run the command and it doesn't need to run any more commands, so the -q flag causes us to exit with 0. For "bar", where the recurse flag is NOT set, we don't run the command and -q causes us to exit with 1.

Now if we run both together, we get this:

This is clearly not right: somehow the "recurse" flag set for the "foo" target has been transferred to / also set for the "bar" target.

I think that these targets are sharing too much information about the commands to be invoked and/or it's not getting cleared properly after each expansion of the recipe.

Paul D. Smith <psmith>
Project Administrator

 

(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 (Submitted the item)
  •  

    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):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1