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 "Exported to shell in rule: [$$MY_VAR]"
        @echo '$(var)'
$ make
In make:  [OK]
Exported to shell in rule: [OK]
Exported to shell in function: []
$

Is it bug or feature?

If the latter, where is it documented (failed to find it), and what's
the rationale?

-- Sergey.


_______________________________________________
Help-make mailing list
Help-make@gnu.org
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to