NMAKE Help (nmake.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Filename Macros
                                             Up Contents Index Back
─────NMAKE──────────────────────────────────────────────────────────────────
 
     Filename macros conveniently represent files in the dependency.
     The names are as they are specified in the dependency and not the
     full specification of the filenames as they exist on disk.
 
     As with all one-character macros, the filename macros do not
     require parentheses when invoked. (The $$@ and $** macros do not
     require parentheses even though they contain two characters.)
 
     You can use modifiers to extract part of a filename.
     See: Modifying Filename Macros
 
          Macro    Meaning
 
          $@       The current target's full name (path, base name, and
                   extension), as currently specified.
 
          $$@      The current target's full name (path, base name, and
                   extension), as currently specified. Valid only for
                   specifying a dependent in a dependency line.
 
          $*       The current target's path and base name minus the
                   file extension.
 
          $**      All dependents of the current target.
 
          $?       All dependents that have a later time stamp than the
                   current target.
 
          $<       The dependent if it has a later time stamp than the
                   target. Valid only in commands in inference rules.
 
     Example
 
          trig.lib : sin.obj cos.obj arctan.obj
            !LIB trig.lib -+$?;
 
     The $? macro represents all dependents that have changed more
     recently than trig.lib. The ! command modifier causes NMAKE to
     execute a command once for each dependent in the list. As a
     result, the LIB command is executed up to three times, each time
     replacing a module with a newer version.
     See: Exclamation Point (!) Modifier
                                    -♦-