NMAKE Help (nmake.hlp) (Table of Contents; Topic list)
Special Characters in Macros
                                             Up Contents Index Back
─────NMAKE──────────────────────────────────────────────────────────────────
 
     Certain characters have special meaning within a macro definition.
     To use one of these characters literally, use a special syntax.
     In addition to the characters discussed below, other special
     characters require special treatment when used literally,
     regardless of whether they appear in a macro.
     See: Special Characters as Literals
 
     The following are some of the special syntax rules:
 
        ■ To specify a comment with a macro definition, place a number
          sign (#) and the comment after the definition, as in:
 
               LINKCMD = link /CO  # Prepare for debugging
 
          NMAKE ignores the number sign and all characters up to the
          next newline character. To specify a literal number sign in a
          macro, use a caret (^), as in ^#.
 
        ■ To extend a macro definition to a new line, end the line with
          a backslash (\). A newline character that follows a backslash
          is replaced with a space when the macro is expanded, as in:
 
               LINKCMD = link myapp\
               another, , NUL, mylib, myapp
 
          When LINKCMD is invoked, a space separates myapp and another.
 
        ■ To specify a literal backslash at the end of the line,
          precede it with a caret (^), as in:
 
               exepath = c:\bin^\
 
          You can also make a backslash literal by following it with a
          comment specifier (#). A backslash is literal if it is
          followed by any other character.
 
        ■ To insert a literal newline character into a macro, end the
          line with a caret (^). The caret tells NMAKE to interpret the
          newline character as part of the macro, not as a line break
          ending the macro definition. For example, to define a macro
          composed of two commands separated by a newline character:
 
               CMDS = cls^
               dir
 
          This technique is useful when creating inline files.
          See: Inline Files
 
        ■ To specify a literal dollar sign ($) in a macro definition,
          use two dollar signs ($$). NMAKE interprets a single dollar
          sign as the specifier for invoking a macro.
                                    -♦-