ID Number: Q60867
1.00 1.01 1.10 1.11 | 1.01 1.10 1.11
MS-DOS | OS/2
Summary:
If you use the "directory search" feature of NMAKE (curly braces "{}")
to use a separate directory for some files, the location of these
files cannot be inferred in subsequent dependency rules.
More Information:
The following code example demonstrates this confusion:
test.exe: {\obj}test.obj
link \obj\test.obj graphics.lib;
test.obj: test.c test.h
cl /c /Fo\obj\test.obj test.c
If TEST.EXE and \OBJ\TEST.OBJ were up to date and we were to change
one of the dependencies for TEST.OBJ, nothing would happen. This is
because \OBJ\TEST.OBJ doesn't have any dependencies. The TEST.OBJ
dependency line is only for the current directory. If we were to
change the TEST.OBJ line to the following
{\obj}test.obj: test.c test.h
a change to TEST.C or TEST.H would cause \OBJ\TEST.OBJ and TEST.EXE
to be updated.
Note: NMAKE has a predefined inference rule for C.EXE that causes
TEST.EXE to be relinked in the above example if it is out of date with
TEST.C.