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.
Modifying Filename Macros
◄Up► ◄Contents► ◄Index► ◄Back►
─────NMAKE──────────────────────────────────────────────────────────────────
Macro modifiers specify parts of the predefined filename macros.
You can append one of the modifiers to any of the filename macros
to extract part of a filename. If you add one of these modifiers
to the macro, enclose the name and modifier in parentheses.
NOTE: In a commands block, there is another way to represent
components of the first dependent filename.
See: ◄Filename-Parts Syntax►
Modifier Resulting Filename Part
D Drive plus directory
B Base name
F Base name plus extension
R Drive plus directory plus base name
If $@ represents the target C:\SOURCE\PROG\SORT.OBJ, the effect of
combining each modifier with $@ is as follows::
Invoked Macro Value
$(@D) C:\SOURCE\PROG
$(@F) SORT.OBJ
$(@B) SORT
$(@R) C:\SOURCE\PROG\SORT
If $@ represents the target SORT.OBJ without a path, the value of
the modified macro $(@R) is SORT, and the value of $(@D) is a
period (.) to represent the current directory.
Example
# Files in the c:\objects directory depend on
# the versions in the current directory.
DIR = c:\objects
$(DIR)\a.obj $(DIR)\b.obj $(DIR)\c.obj : $$(@F)
COPY $(@F) $@
This example uses the F modifier to specify a file of the same
name in the current directory.
-♦-