Example

Using the following description file excerpt:

     !INCLUDE <INFRULES.TXT>     !CMDSWITCHES +D
     WINNER.EXE: WINNER.OBJ
     !IFDEF DEBUG
     !   IF "$(DEBUG)" == "y"
            ilink /DE WINNER.OBJ;
     !   ELSE
            ilink WINNER.OBJ
     !   ENDIF
     !ELSE
     !    ERROR Macro named DEBUG is not defined.
     !ENDIF

The !INCLUDE directive causes the file INFRULES.TXT to be read and evaluated as if it were part of the description file.

The !CMDSWITCHES directive turns on the /D option, which displays the dates of the files as they are checked.

The !IFDEF directive checks to see whether the macro DEBUG is defined. If it is defined, the !IF directive checks to see whether it is set to 'y'. If it is, the linker is invoked with the /DE option; otherwise, it is invoked without the /DE. If the DEBUG macro is not defined, the !ERROR directive prints out the message and NMAKE32 stops executing.


[Back] [Next]