FIX: Macros w/ Different Case Can't Be Assigned to Each Other (86813)



The information in this article applies to:

  • Microsoft NMAKE Utility for MS-DOS 1.11
  • Microsoft NMAKE Utility for MS-DOS 1.12
  • Microsoft NMAKE Utility for MS-DOS 1.13
  • Microsoft NMAKE Utility for MS-DOS 1.2
  • Microsoft NMAKE Utility for OS/2 1.11
  • Microsoft NMAKE Utility for OS/2 1.12
  • Microsoft NMAKE Utility for OS/2 1.13

This article was previously published under Q86813

SYMPTOMS

NMAKE version 1.11, 1.12, 1.13, or 1.2 macros that are the same but have a different case cannot be assigned to one another. This kind of macro assignment results in nothing being assigned. For example, the sample makefile below displays

upper and

when the output should be as follow:

upper and lowercase

RESOLUTION

Even though NMAKE macros are case sensitive, this type of assignment is not successful. Two workarounds are:
  • Use a temporary MACRO to perform the assignment. For example,
         target= file.exe;
         TEMP = $(target)
         TARGET = $(TEMP)
    						
    -or-

  • Give each macro a unique name.

STATUS

Microsoft has confirmed this to be a problem in NMAKE versions 1.11, 1.12, 1.13, and 1.2 for MS-DOS and versions 1.11, 1.12, and 1.13 for OS/2. This problem was corrected in NMAKE version 1.3.

Sample Makefile

target = lowercase
TARGET = upper and $(target)

ALL:

   @echo $(TARGET)
				

Modification Type:MajorLast Reviewed:10/23/2003
Keywords:kb16bitonly kbfix KB86813