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

2022-08-30 Thread Paul D. Smith
Update of bug #56446 (project make):

  Item Group: Enhancement => Documentation  
  Status:None => Fixed  
 Assigned to:None => psmith 
 Open/Closed:Open => Closed 
   Fixed Release:None => SCM
   Triage Status:None => Small Effort   


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




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

2020-12-22 Thread Aleksey Victor Trevelin Covacevi
Follow-up Comment #2, bug #56446 (project make):

I agree with Robert, this looks like a documentation issue. The behavior
actually looks consistent to me.

A simple way to avoid exporting certain variables/functions automatically
(besides unexport) is to prefix them with an invalid character for a shell
variable:

define !FUNCTION
target: $1
endef

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




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

2020-08-20 Thread Robert Sachunsky
Follow-up Comment #1, bug #56446 (project make):

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.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




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

2019-06-05 Thread Mark Galeck
URL:
  

 Summary: Make shouldn't be running eval when expanding
variables for export
 Project: make
Submitted by: 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
 Discussion Lock: Any
   Component Version: 4.2.1
Operating System: None
   Fixed Release: None
   Triage Status: None

___

Details:

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.  




___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make