FIX: Using "!" & "$?" Do Not Work as Expected w/ NMAKE 1.11Last reviewed: September 11, 1997Article ID: Q61808 |
1.11 | 1.11
MS-DOS | OS/2
kbtool kbbuglist kbfixlist
The information in this article applies to:
SYMPTOMSIn an NMAKE description file, applying the "!" (exclamation point) operator to the beginning of a command line using the macro "$?" should cause the command to be executed once for every out-of-date dependent file. In version 1.11 of NMAKE (shipped with C version 6.00), the $? macro evaluates to the list of every dependent, regardless of whether it is out of date or not. This is not the correct behavior.
RESOLUTIONFortunately, the problem above is easy to correct. NMAKE performs correctly if two colons (::) are placed after the target NEW.LIB on the dependency line. The NMAKE file may be rewritten as follows so that the $? macro will work with NMAKE 1.11:
new.lib::a.obj b.obj c.obj !lib $@-+$?;The use of the $? macro is described on page 108 of the "Microsoft C Advanced Programming Techniques" manual included with C version 6.00. The use of the two colons on the dependency line is described on page 109.
STATUSMicrosoft has confirmed this to be a problem in NMAKE version 1.11. This problem was corrected in NMAKE version 1.12.
MORE INFORMATIONTo re-create this problem, save the following lines to a file called MAKEFILE:
new.lib: a.obj b.obj c.obj !lib $@-+$?;Assuming that only A.OBJ is out of date with respect to NEW.LIB, the following will be produced upon running NMAKE:
|
Additional reference words: buglist1.11 fixlist1.12
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |