Macros provide a convenient way to replace one string with another
in the description file. The text is automatically replaced each
time NMAKE is run. This feature makes it easy to change text throughout
the description file without having to edit every line that uses
the text.
Two common uses of macros are:
- To create a standard description file for several projects.
The macro represents the file names in commands. These file names
are defined when you run NMAKE. When you switch to a different project,
changing the macro changes the file names NMAKE uses throughout
the description file.
- To control the options that NMAKE passes to the compiler, assembler,
or linker. When using a macro to specify the options, you can quickly
change the options throughout the description file in one easy step.
A macro can be defined:
- In a description file
- On the command line
- In TOOLS.INI
- Through inheritance from environment variables