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:

  export ID = $(shell id -a)
  var := $(shell echo hi)

Some sort of loop detection on variable expansion needs to be
implemented.

You need to explicitly provide the variables you need in the shell
function:

  var := $(shell MY_VAR='$(MY_VAR)'; echo "value = $$MY_VAR")


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

Reply via email to