Inherited Macros

When NMAKE is called recursively, the only macros that are inherited by the called NMAKE are those defined on the command line or in environment variables. Macros defined in the makefile are not inherited when NMAKE is called recursively. There are several ways to pass macros to a recursive NMAKE session:

Run NMAKE with the /V option. This option causes all macros to be inherited by the recursively called NMAKE. You can use this option on the NMAKE command for the entire session, or you can specify it in a command for a recursive NMAKE call to affect just the specified recursive session.

Use the SET command before the recursive call to set an environment variable before the called NMAKE session.

Define a macro on the command line for the recursive call.

Define a macro in the TOOLS.INI file. Each time NMAKE is recursively called, it reads TOOLS.INI.