Several control characters are used by NMAKE32 in its syntax. These characters are:
( ) # $ ^ \ { } ! @ - [newline]
To use one of these characters in a command and not have it interpreted by NMAKE32, a caret (^) is used in front of the character.
Examples:
The string:
BIG^#.C
is treated as
BIG#.C
With the caret, you can include a literal newline character in a description file. This capability is useful in macro definitions, as in the following example:
XYZ=abc^<enter> def
where <enter> is a newline character.
The effect is equivalent to the effect of assigning the C-style string abc\ndef to the XYZ macro. Note that this effect differs from the effect of using the backslash (\) to continue a line. A newline character that follows a backslash is replaced with a space, unless the -\ option is specified. NMAKE32 ignores a caret that is not followed by any of the characters it sees in its syntax.
Note: Control characters in the makefile that are used in filenames, pathnames, and so on, that are not to be evaluated by NMAKE32 must be preceded by the caret (^) character. For example, to define a macro which contains the root directory specifier C:\, the backslash character must be preceded by a caret character, since the backslash character is used to concatenate lines in NMAKE32. The proper way to define this macro is:
root=C:^\
If the macro was coded without the caret character, such as in:
root=C:\ !ifdef root . . .
an error would result, since NMAKE32 would concatenate the root macro definition with the next line in the makefile. Placing a caret character before the backslash character prevents NMAKE32 from processing the backslash as a control character.