Invoking NMAKE with /A Still Evaluates First Target OnlyLast reviewed: February 17, 1995Article ID: Q73690 |
The information in this article applies to:
SUMMARYThe Microsoft NMAKE File Maintenance Utility evaluates only the first target in a makefile, even if the command line includes the /A option switch. This may not be readily apparent from the documentation, which states that the /A switch causes NMAKE to rebuild all requested targets, even if they are not out of date with respect to their dependents.
MORE INFORMATIONIn the sample makefile below, NMAKE invokes the compiler to produce HELLO1.OBJ and then stops. The /A switch instructs NMAKE to call the compiler for HELLO1.C even if HELLO1.OBJ is more recent. The /A switch does not build all targets in the makefile. To force NMAKE to evaluate each target, specify a pseudotarget as the first target in the make file. Specify the actual targets as dependents of the pseudotarget. The sample makefile below uses "ALL" as the pseudotarget. Remove the comment from that line to build all targets. For more information, please refer to the NMAKE documentation provided with your compiler or query in the Microsoft Knowledge Base on the following words:
nmake and pseudotarget and default Sample Makefile# ALL : hello1.exe hello2.exe # Remove the comment from this # line to build all of the targetshello1.obj : hello1.c hello2.obj : hello2.c hello1.exe : hello1.obj hello2.exe : hello2.obj
|
Additional reference words: kbinf kbinf 1.20 1.30 1.40 1.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |