Defined Macros

After you have defined a macro, you can use it anywhere in your description file with the following syntax:

$(macroname)

The parentheses are not required if the macro name is only one character long. To use a dollar sign ( $ ) without using a macro, enter two dollar signs ( $$ ), or use the caret ( ^ ) before the dollar sign as an escape character.

When NMAKE runs, it replaces all occurrences of $(macroname) with the defined macro string. If the macro is undefined, nothing is substituted. After a macro is defined, you can cancel it only with the !UNDEF directive.


[Back: Inherited Macros]
[Next: Macro Substitutions]