ID Number: Q76298
1.00 1.01 1.10 1.11 1.12 1.13 | 1.10 1.11 1.12 1.13
MS-DOS | OS/2
Summary:
When using NMAKE versions 1.0, 1.01, 1.1, 1.11, 1.12, or 1.13, a
command line that specifies the operating system PATH command does not
affect the other commands that are processed by NMAKE. This is by
design. If the PATH environment variable must be reassigned, the SET
command may be used instead.
More Information:
NMAKE.EXE documentation for Microsoft C version 6.0 and Microsoft
Macro Assembler (MASM) version 6.0 state that any command that can be
run from the DOS command line can be executed from the NMAKE command
line. This is not entirely true. The PATH command is not emulated by
NMAKE and has no effect.
There are two methods to re-assign the PATH environment variable in
NMAKE. First, a macro called PATH can be assigned to the the paths you
want to add to the PATH system variable. The macro name PATH must be
in uppercase letters. Second, the SET command can be used. For
example, a command could be placed in the description block that
states "SET PATH=c:\;c:\dos".
The sample makefiles below demonstrates these concepts. In the first
makefile, the PATH command has no effect. The second and third
makefiles show two ways to re-assign PATH, effectively doing the same
as the PATH command does from the DOS or OS/2 prompt.
Sample Makefile #1
------------------
# The PATH command has no effect on the PATH environment variable
# assignment.
all:
path c:\c600\bin;c:\c600\binb
cl /c sample.c
Sample Makefile #2
------------------
# The SET command in this makefile temporarily modifies the PATH
# system variable for commands that are processed for the duration
# of the makefile.
all:
set path=c:\c600\bin;c:\c600\binb
cl /c sample.c
Sample Makefile #3
------------------
# The macro called PATH re-assigns the PATH system variable for the
# duration of the makefile.
PATH=c:\c600\bin;c:\c600\binb
all:
cl /c sample.c
Additional reference words: 1.00 1.10 6.00