[bug #54727] foreach variable is not visible for a target specific variable definition in a recipe

2018-10-05 Thread Michael Builov
Follow-up Comment #4, bug #54727 (project make): The first version of the patch is not good, make hangs on this test: $ echo '$(eval all: M:=$$(eval all: Q:=(eval all: T:=M)))' | ./make -f - The second version of the patch takes into account that the target-specific context may already

Re: [bug #54727] foreach variable is not visible for a target specific variable definition in a recipe

2018-10-05 Thread Michael Builov
Many thanks to you, Brian. I'm not solving a real problem, I just found a corner case, which I think should be fixed or documented. In some cases, it is preferable to delay variable expansions in $(eval ...) to speed up the parser, and $(foreach ...) can be used to introduce local variables. It

[bug #54727] foreach variable is not visible for a target specific variable definition in a recipe

2018-10-05 Thread Michael Builov
Additional Item Attachment, bug #54727 (project make): File name: make_bug_54727.patch Size:0 KB ___ Reply to this item at: ___ Message

Re: [bug #54727] foreach variable is not visible for a target specific variable definition in a recipe

2018-10-04 Thread Brian Vandenberg
On Thu, Oct 4, 2018 at 7:53 AM Michael Builov wrote: > > Follow-up Comment #3, bug #54727 (project make): > > It also possible to step on this "foreach + eval" bug not in a recipe. Agreed, I reproduced with the following: $ cat -n makefile 1 .RECIPEPREFIX := > 2 f:=g 3 asdf=$(foreach

[bug #54727] foreach variable is not visible for a target specific variable definition in a recipe

2018-10-04 Thread Michael Builov
Follow-up Comment #3, bug #54727 (project make): It also possible to step on this "foreach + eval" bug not in a recipe. Please consider the next example: # define global variable f := g # function for defining target-specific variables # $1 - target # $2 - variable

[bug #54727] foreach variable is not visible for a target specific variable definition in a recipe

2018-09-26 Thread Michael Builov
Follow-up Comment #2, bug #54727 (project make): > By the time we expand the recipe all target-specific variables for that recipe have already been assigned: it's not possible for the recipe to add more target-specific variables to it's target and have those take effect. But this is works: $

[bug #54727] foreach variable is not visible for a target specific variable definition in a recipe

2018-09-25 Thread Paul D. Smith
Update of bug #54727 (project make): Item Group: Bug => Enhancement ___ Follow-up Comment #1: This will definitely never work. By the time we expand the recipe all target-specific variables

[bug #54727] foreach variable is not visible for a target specific variable definition in a recipe

2018-09-25 Thread Michael Builov
URL: Summary: foreach variable is not visible for a target specific variable definition in a recipe Project: make Submitted by: mbuilov Submitted on: Tue 25 Sep 2018 02:48:25 PM UTC