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-Parts Syntax
◄Up► ◄Contents► ◄Index► ◄Back►
─────NMAKE──────────────────────────────────────────────────────────────────
NMAKE provides a syntax that you can use in commands to represent
components of the name of the first dependent file. The filename
components are the file's drive, path, base name, and extension as
you have specified it, not as it exists on disk.
The first dependent is usually the first file listed to the right
of the colon in a dependency line. However, NMAKE considers an
inferred dependent to be first, ahead of any explicit dependents.
See: ◄Inferred Dependents►
NOTE: There is another way to represent components of the
predefined filename macros.
See: ◄Modifying Filename Macros►
Representing the Entire Filename
You can represent the complete filename with the following syntax:
%s
For example, if a description block contains
sample.exe : c:\project\sample.obj
LINK %s;
NMAKE interprets the command as
LINK c:\project\sample.obj;
Representing Parts of the Filename
You can represent parts of the filename with the following syntax:
%|[parts]F
where <parts> is zero or more specification letters, in any order:
Letter Description
No letter Complete name
d Drive
p Path
f File base name
e File extension
Using this syntax, you can represent a complete filename by %|F or
by %|dpfeF, as well as by %s.
Example
sample.exe : c:\project\sample.obj
LINK %s, a:%|pfF.exe;
NMAKE interprets the first filename specification in the command
as the complete filename of the dependent. It interprets the
second specification as a filename with the same path and base
name as the dependent but on the specified drive and with the
specified extension. It executes the following command:
LINK c:\project\sample.obj, a:\project\sample.exe;
-♦-