Special Macros
NMAKE predefines several macros. The first six macros below return one
or more file specifications for the files in the target/dependent line of
a description block. Except where noted, the file specification includes
the path of the file, the base file name, and the file-name extension.
Macro
$@
The specification of the target file.
$*
The base name (without extension) of the target
file. Path information is also returned if the path was specified as part
of the target file name. This macro cannot be used in a dependent list.
$**
The specifications
of the dependent files.
$?
The
specifications for only those dependent files that are out-of-date with
respect to the targets.
$<
The
specification of a single dependent file that is out-of-date with respect
to the targets. This macro is used only in inference rules.
$$@
The file specification of the target that NMAKE
is currently evaluating. This is a dynamic dependency parameter, used only
in dependent lists.
$(CC)
The
string ICC, which is the command to run the C Set ++ Compiler. You can
redefine this macro to use a different command.
$(AS)
The string MASM, which is the command to run the
Macro Assembler (MASM). You can redefine this macro to use a different
command.
$(MAKE)
The command
name used to run NMAKE. This macro is used to invoke NMAKE recursively.
If you redefine this macro, NMAKE issues a warning message.
Note: NMAKE executes the command line in which $(MAKE) appears,
even if the display commands (/N) option is on.
$(MAKEFLAGS)
The NMAKE options currently in effect. You cannot
redefine this macro.
Note: The special macros $** and $$@ are the only exceptions to
the rule that macro names longer than one character must be enclosed in
parentheses.
You can append characters to any of the first six macros in this list to
modify the meaning of the macro. However, you cannot use macro substitutions
in these macros.
[Back: Macro Substitutions]
[Next: Examples]