In the top level Makefile I define and export a recursive variable like this:

TOPVAR=/path/$(NAM)-map.txt
export TOPVAR

where $(NAM) is not defined in top level Makefile.

Then in the sub-make Makefile I define NAM and use TOPVAR:

NAM=boot

echo "$(TOPVAR)"

and I see TOPVAR is
/path/-map.txt

(not /path/boot-map.txt)

On page 43 of the make manual it states "make exports a variable ... if its *name* consists only of letters, numbers and underscores" which TOPVAR does. However it appears that on export, any unexpanded variables are expanded (NAM to null). This works fine with DOS nmake and NAM is not expanded until it is actually used in the sub-make.

Comments?

--
Lit up like Levy's



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

Reply via email to