I'm reading the section 5.7.2 (Communicating Variables to a Sub-make) and,
unless I missed something, I'm getting behavior I don't understand.  I
have
a variable that I want to export to a sub-make.  In the top-level
makefile, it gets assigned a value using "override VAR += value" (the base
value is
set from the command line).  When the sub-make is invoked, only the
original
value is passed, and does not include the value from the += statement.

Why is this and how can I fix it?

The Makefile looks like:

=======================================
override VAR += extra
export VAR

all:
   @echo $(VAR)
   $(MAKE) -C dir
=======================================

and the second-level file is just:

=======================================
all:
   @echo $(VAR)
=======================================

and I invoke this with "make VAR=value".

Thanks,

  Michael


      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to