Share via


Precedence in Macro Definitions

 

The latest version of this topic can be found at Precedence in Macro Definitions.

If a macro has multiple definitions, NMAKE uses the highest-precedence definition. The following list shows the order of precedence, from highest to lowest:

  1. A macro defined on the command line

  2. A macro defined in a makefile or include file

  3. An inherited environment-variable macro

  4. A macro defined in the Tools.ini file

  5. A predefined macro, such as CC and AS

Use /E to cause macros inherited from environment variables to override makefile macros with the same name. Use !UNDEF to override a command line.

See Also

Defining an NMAKE Macro