Microsoft KB Archive/86814

= BUG: NMAKE TOOLS.INI Commands Ignore Environment Variables =

Article ID: 86814

Article Last Modified on 10/23/2003

-

APPLIES TO


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

-



This article was previously published under Q86814



SYMPTOMS
Commands placed in the TOOLS.INI file may not recognize an environment variable macro and proceed as if the macro was undefined.



RESOLUTION
There are two methods to work around this problem, as follows:
 * Define the macro on the command line instead of as an environment variable. -or-


 * Place the commands that depend on the environment variable in the makefile rather than in the TOOLS.INI file.



STATUS
Microsoft has confirmed this to be a problem in NMAKE versions 1.2, 1.3, and 1.4. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
Perform the following four steps to demonstrate this problem.

  Edit your TOOLS.INI file to add the following section: [NMAKE] TEST=okay !IFDEF ENV_VAR                       #  Place these commands in      TEST = $(TEST) Environment is defined #  the makefile to resolve !ENDIF                               #  the problem.  At the MS-DOS command prompt, type the following to define the ENV_VAR environment variable:

SET ENV_VAR=1

 Create a file named makefile that contains the following:

ALL:

@echo $(TEST)

 At the MS-DOS prompt, type NMAKE .

NMAKE displays the following on the screen:

okay

instead of the following expected output:

okay Environment is defined

Additional query words: 1.20 1.30 1.40 1.50

Keywords: KB86814

-

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

© Microsoft Corporation. All rights reserved.