bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with Exporting Automatic Variables


From: Sid Ray Chaudhuri
Subject: Problem with Exporting Automatic Variables
Date: Fri, 09 Feb 2001 12:38:25 -0800

Hello:

I am using a top-level makefile to invoke several sub-level builds. I am exporting quite a few variables from the top-level to the sub-level, including one that intends to include an automatic variable string as part of the macro.

MACRONAME = MacroValue is $(@)

I would have thought that since I am using an `=' (and not a `:='), the evaluation of the automatic variable would be postponed until the point of its use. It appears that the "export" command itself results in the evaluation and so in my sub-level build, the macro MACRONAME has the value "MacroValue is", i.e., without the $@ in it. As a result, I cannot use MACRONAME as intended, e.g., as part of a command in a rule in the sub-level build.

Is that a bug? If so, is there a patch available?

If the above is not a bug, then how can I communicate a variable to a sub-level build from the top-level, which contains an automatic variable reference that I want to be evaluated no sooner than at the point of its actual use. Any help and/or pointers in this regard will be highly appreciated.

I have attached the top-level and sub-level makefiles that I have used to experiment with the above. Thanks very much.

Regards,
Sid Ray Chaudhuri

Attachment: topmake.gmk
Description: Binary data

Attachment: submake.gmk
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]