FIX: Bad Macro Substitution, In-line File in Inference Rule

Last reviewed: September 11, 1997
Article ID: Q66459
1.01 1.10 1.11 1.12 1.13 | 1.01 1.11 1.12 1.13
MS-DOS                   | OS/2
kbtool kbbuglist kbfixlist

The information in this article applies to:

  • Microsoft NMAKE Utility for MS-DOS, versions 1.01, 1.1, 1.11, 1.12, and 1.13
  • Microsoft NMAKE Utility for OS/2, versions 1.01, 1.11, 1.12, and 1.13

SYMPTOMS

Using an in-line file inside of an inference rule with NMAKE version 1.11, 1.12, or 1.13 can cause improper results in macro substitutions following the in-line file.

STATUS

This problem has been fixed in NMAKE versions 1.2 and later.

MORE INFORMATION

The following NMAKE description file produces the following output:

   cl -c test.c
   link @lrf
   cd test.exe   <---- This is wrong.   It should be "cd \test"

NMAKE: fatal error U1077: 'cd' return code 1 Stop.

The third line of the output is incorrect. The macro $(SAMPLEDIR) is incorrectly replaced with the value of $(EXENAME).

Sample Makefile

EXENAME=test.exe SAMPLEDIR=\test

.obj.exe:

  link @<<lrf     <--- In-line file with $(EXENAME) macro
$<                     causes the problem.
$(EXENAME); <<KEEP
  cd $(SAMPLEDIR)

test.exe:test.obj

test.obj:test.c


Additional reference words: 1.10
KBCategory: kbtool kbbuglist kbfixlist
KBSubcategory: NmakeIss
Keywords : kb16bitonly
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.