The information in this article applies to:
SUMMARYIf a target is specified in more than one dependency block, some files may not be built. For example, consider a make file that contains dependencies such as the following:
If MYAPP1.OBJ and MYAPP2.OBJ are newer than MYAPP.EXE, but MYAPP3.OBJ
is not, NMAKE does not build MYAPP.EXE. To further confuse the issue,
the following is the output from NMAKE when the /d (display file
dates) option is specified:
Obviously, NMAKE determines that the MYAPP1.OBJ and MYAPP2.OBJ files
have later dates, but it does not link MYAPP.EXE.
MORE INFORMATION
The multiple dependency construct, specified by a double colon (::)
following the name of the target, is very useful in NMAKE because it
allows the programmer to specify various operations to occur with a
target file based on various dependent files. For example, when you
build an application for the Microsoft Windows operating system, the
makefile can specify that when one or more .OBJ files change, NMAKE
must run LINK to rebuild the application. On the other hand, if the
resource file changes but the .OBJ files do not, NMAKE must only run
the Resource Compiler to update the application.
Another method involves placing all dependencies on the same line as
the target, as follows:
Additional query words: kbinf 1.10 1.20 1.30 1.40 1.50
Keywords : |
Last Reviewed: October 28, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |