Re: Exporting variable to $(shell).

2017-01-11 Thread Sergey Organov
Paul Smith writes: > On Wed, 2017-01-11 at 19:10 +0300, Sergey Organov wrote: >> > Some sort of loop detection on variable expansion needs to be >> > implemented. >> >> Can't it rather be solved by exporting variables to the $(shell) >> unexpanded? > > Well, that would be a major difference in t

Re: Exporting variable to $(shell).

2017-01-11 Thread Paul Smith
On Wed, 2017-01-11 at 19:10 +0300, Sergey Organov wrote: > > Some sort of loop detection on variable expansion needs to be > > implemented. > > Can't it rather be solved by exporting variables to the $(shell) > unexpanded? Well, that would be a major difference in the way make works, and probably

Re: Exporting variable to $(shell).

2017-01-11 Thread Sergey Organov
Paul Smith writes: > On Wed, 2017-01-11 at 17:49 +0300, Sergey Organov wrote: >> It looks like exporting variables to $(shell) function >> doesn't work. > > This is https://savannah.gnu.org/bugs/?10593 > > It should be made to work, but unfortunately it's not completely trivial > to fix, since yo

Re: Exporting variable to $(shell).

2017-01-11 Thread Paul Smith
On Wed, 2017-01-11 at 17:49 +0300, Sergey Organov wrote: > It looks like exporting variables to $(shell) function > doesn't work. This is https://savannah.gnu.org/bugs/?10593 It should be made to work, but unfortunately it's not completely trivial to fix, since you can have infinite loops like:

Exporting variable to $(shell).

2017-01-11 Thread Sergey Organov
Hello, It looks like exporting variables to $(shell) function doesn't work. Here is a test to demonstrate the issue: $ cat Makefile override MY_VAR := OK export MY_VAR var := $(shell echo "Exported to shell in function: [$$MY_VAR]") all: @echo "In make: [$(MY_VAR)]" @echo "Expor