persistence - How to forward macros between nmake invocations? -
How can I forward the macro between Nemec invocation?
Let's say we have
--- a.mak --- some_variable = value all: nmake -f b.mak --- END --- - - b.mak --- All: @heah some_variable = What does it keep here to get some values? --- END --- I was trying different things like using set and set x commands but the value of the variable set in parent makefile does not apply to makefiles from within is being done.
Here is the information from MSDN:
call NMK Use recursion macros for recursively. Recurring sessions have command line and environment-variable macros and Tools.ini notifications. They do not inherit mefile-defined estimation rules or SUFFIXs and privacy specifications. To pass the macro in the recurring NMKE session, either set an environment variable with the SET before the recursive call, defines a macro in the command for recursive calls, or defines the macro in Tools.ini.
Then, you can look like a.mak :
# ---- a.mak - - some_variable = value all: nmake -f B.mak some_variable = $ (some_variable) # --- END --- Also, note that to put the variable in the environment Using set sommand for this will also work, but nmake automatically exposes the environmental variable names (even " Wonder "which is lowercase in the system for some reason, such as for strange people too) To use RUN variable, you have to use the variable in uppercase.
:
The inherited name changes to uppercase. Heritage is done before processing first
So, it is your b.mak should look like if you use the environment to clear the variable Instead of transferring from the command line:
# --- bmk --- all: @home is something _Verable: $ (SOME_VARIABLE) # --- end- For this reason, there is probably no bad idea to standardize on all caps naming conventions for nmake macro names.
Comments
Post a Comment