bugmake - Bugs: bug #56446, Make shouldn't be running eval...

 
 

bug #56446: Make shouldn't be running eval when expanding variables for export

Submitted by:  Mark Galeck <mark_galeck0>
Submitted on:  Thu 06 Jun 2019 01:47:17 AM UTC  
 
Severity:  3 - Normal Item Group:  Enhancement
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  4.2.1 Operating System:  None
Fixed Release:  None Triage Status:  None

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Thu 20 Aug 2020 07:31:28 AM UTC, comment #1: 

Yes, .EXPORT_ALL_VARIABLES should at least be documented for its danger regarding (forced) early expansion with the very first recipe being executed. This also breaks most usage of functions like error in variables.

As for this example, at least unexport FUNCTION2 helps here.

Robert Sachunsky <bertsky>
Thu 06 Jun 2019 01:47:17 AM UTC, original submission:  

This is a good Makefile (SSCCE example) that nevertheless bombs:

define FUNCTION
target: $1
endef

FUNCTION2 = $(eval $(call FUNCTION,$1))

.EXPORT_ALL_VARIABLES:

all:   
    echo OK

Now when you make this, you get:

Makefile:5: *** prerequisites cannot be defined in recipes.  Stop.

Paul Smith suggested I file this request for enhancement:  Make shouldn't be running eval when expanding variables for export. 

Mark Galeck <mark_galeck0>

 

(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 bertsky (Posted a comment)
  • -email is unavailable- added by mark_galeck0 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.5