Microsoft KB Archive/79824

= FIX: Last Letter of NMAKE Command-Line Macro Incremented =

Article ID: 79824

Article Last Modified on 10/23/2003

-

APPLIES TO


 * Microsoft Program Maintenance Utility 1.2
 * Microsoft Program Maintenance Utility 1.2
 * Microsoft Program Maintenance Utility 1.4
 * Microsoft Program Maintenance Utility 1.4

-



This article was previously published under Q79824



SYMPTOMS
When the NMAKE command line defines a macro, NMAKE may increment the last letter of the macro string by one letter. Every other letter, beginning with the letter &quot;b&quot;, is incremented in this manner. For example, the make file example below expands the macro DIR to be &quot;XXY&quot; instead of &quot;XXX&quot;.



RESOLUTION
Use one of the following three methods to work around this problem:  Use the /F command-line option to specify the name of the makefile. For example:

nmake /F test.mak DIR=XXX

-or-

nmake DIR=XXX /F test.mak

 Place any command-line option after the macro definition. For example:

nmake DIR=XXX /A test.mak

 Define the macro in the specified makefile instead of on the command line.



MORE INFORMATION
This problem occurs only when the command line specifies a makefile name other than the default name &quot;MAKEFILE&quot; and the command line does not include the /F option. Use the /F option to specify the name of the makefile any time it is not &quot;MAKEFILE.&quot; For more information, please refer to page 292 of the &quot;Microsoft Macro Assembler Programmer's Guide&quot; for Microsoft Macro Assembler (MASM) version 6.0.

Sample Code

 * 1) Command line required to demonstrate problem: nmake DIR=XXX test.mak

ALL: ECHO $(DIR)

Additional query words: 1.20 character change

Keywords: kbfix kb16bitonly KB79824

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.