BUG: NMAKE TOOLS.INI Commands Ignore Environment Variables

Last reviewed: January 24, 1995
Article ID: Q86814
The information in this article applies to:
  • Microsoft NMAKE for MS-DOS, versions 1.2, 1.3, and 1.4
  • Microsoft NMAKE Utility for Windows NT, versions 1.4 and 1.5

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.

  1. 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.
    
    

  2. At the MS-DOS command prompt, type the following to define the ENV_VAR environment variable:

          SET ENV_VAR=1
    

  3. Create a file named makefile that contains the following:

          ALL:
    
             @echo $(TEST)
    
    

  4. At the MS-DOS prompt, type "NMAKE" (without quotation marks).

NMAKE displays the following on the screen:

   okay

instead of the following expected output:

   okay Environment is defined


Additional reference words: 1.20 1.30 1.40 1.50
KBCategory: kbtool kbbuglist
KBSubcategory: NmakeIss


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: January 24, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.