The information in this article applies to:
SUMMARYIt is possible to specify the order in which NMAKE builds target files. MORE INFORMATION
When NMAKE runs, it first checks its comment line. NMAKE builds any
targets specified on the command line in order, from left to right. If
the command line does not specify any targets, NMAKE builds the first
target in the description file.
Sample Makefile 1
In this example, NMAKE compiles THREE.C, TWO.C, and ONE.C, then it
links MAIN.EXE. The compiler uses this order because the first target
specifies the dependents in this order. NMAKE builds the first target
unless the command line specifies a different target to build.
Consider the following example that is somewhat different from the example above: Sample Makefile 2
In this example, NMAKE compiles THREE.C, ONE.C, and TWO.C, then it
links MAIN.EXE. NMAKE builds the first target, MAIN.EXE, then it
builds the file MAIN.EXE depends on in the specified order.
To summarize, NMAKE looks first at its command line. If no files are specified, it builds the first target in the description file by building each of its dependent files in the specified order. If a file that the first target depends on specifies another target, NMAKE builds the dependent files of that target in the specified order. This continues until all dependent files are built. Additional query words: kbinf 1.20 1.30 1.40 1.50
Keywords : |
Last Reviewed: October 7, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |