Follow-up Comment #6, bug#65359 (group make):

Hi, Martin,

Yes, you are right. My previous understanding was wrong. Exported variables in
makefile can be seen by the recipes, as stated in make manual,

"To pass down, or export, a variable, make adds the variable and its value to
the environment for running each line of the recipe. The sub-make, in turn,
uses the environment to initialize its table of variable values. See Variables
from the Environment."

[comment #4 comment #4:]
> As demonstrated by eg:

> martind@stormy:~/tmp/make-65359$ cat Makefile
> export BADGER = wombat
> default:; echo BADGER = $$BADGER
> martind@stormy:~/tmp/make-65359$ 


> 
> Variables are communicated to subprocesses, be they Make, the shell or
otherwise, via the environment.  There is no other way.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65359>

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


Reply via email to