10.3.6 Directives

The directives in Table 10.7 provide additional control of NMAKE operations. You can use them in a description file outside of a description block or in the TOOLS.INI file. The four directives listed in the table are case sensitive and must appear in all uppercase letters. (Preprocessing directives are not case sensitive; see Section 10.3.7, “Preprocessing Directives.”)

Table 10.7 Directives

Directive Action
.IGNORE : Ignores exit codes returned by programs called from the description file. This directive has the same effect as invoking NMAKE with the /I option.
.PRECIOUS : target... Tells NMAKE not to delete targets if the commands that build them quit or are interrupted. Overrides the NMAKE default, which is to delete the target if building was interrupted by CTRL+C or CTRL+BREAK.
.SILENT : Does not display lines as they are executed. This directive has the same effect as invoking NMAKE with the /S option.
.SUFFIXES : list Lists file suffixes for NMAKE to try when building a target file for which no dependents are specified. This list is used together with inference rules. See Section 10.3.5, “Inference Rules.”

The .IGNORE and .SILENT directives affect the file from their location onward. Location within the file does not matter for the .PRECIOUS and .SUFFIXES directives; they affect the entire description file.

NMAKE refers to the value of the .SUFFIXES directive when using inference rules. When NMAKE finds a target without dependents, it searches the current directory for a file with the same base name as the target and a suffix from list. If NMAKE finds such a file, and if an inference rule applies to the file, then NMAKE treats the file as a dependent of the target. The order of the suffixes in the list defines the order in which NMAKE searches for the file. The list is predefined as follows:

.SUFFIXES : .exe .obj .asm .c .bas .cbl .for .pas .res .rc

To add additional suffixes to the end of the list, specify .SUFFIXES : followed by the additional suffixes. To clear the list, specify .SUFFIXES : by itself. To change the list order or to specify an entirely new list, clear the list and specify a new .SUFFIXES : setting.