A pseudotarget is a target in a description block that is not a file. It is a name that serves as a handle for building a group of files or executing a command block. There are two types of pseudotargets recognized by NMAKE32, predefined and user defined.
Predefined pseudotargets start with a period (.) and are used to control NMAKE32 processing characteristics. NMAKE32 provided pseudotargets and function follow:
┌─────────────────────────┬─────────────────────────────────────────────┐ │.IGNORE: [targets] │Tells NMAKE32 to ignore return codes from │ │ │invoked commands. Same function as /i option │ │ │on the command line. If specified with │ │ │targets, only return codes of those targets │ │ │are ignored. │ ├─────────────────────────┼─────────────────────────────────────────────┤ │.MAKEINIT: [command] │The commands of this target are executed just│ │ │before the first real target is examined │ │ │(after the command line and the description │ │ │file have been processed). │ ├─────────────────────────┼─────────────────────────────────────────────┤ │.INIT: [command] │The commands of this target are executed just│ │ │before the first real target is built (just │ │ │before the first user command is invoked). │ ├─────────────────────────┼─────────────────────────────────────────────┤ │.MAKEDEINIT: [command] │The commands of this target are executed just│ │ │before NMAKE32 terminates. │ ├─────────────────────────┼─────────────────────────────────────────────┤ │.DEINIT: [command] │The commands of this target are executed just│ │ │before the commands of the .MAKEDEINIT: │ │ │target are executed, but only if the commands│ │ │of the .INIT: target and at least one user │ │ │command have been executed. │ ├─────────────────────────┼─────────────────────────────────────────────┤ │.RECHECK: │Instructs NMAKE32 to recheck the date, time │ │ │and path of each target (the check occurs │ │ │after all commands for that target have been │ │ │executed). │ ├─────────────────────────┼─────────────────────────────────────────────┤ │.NORECHECK: │Instructs NMAKE32 to not recheck the date, │ │ │time and path of each target. This is the │ │ │default behavior. │ ├─────────────────────────┼─────────────────────────────────────────────┤ │.PRECIOUS: [targets] │Instructs NMAKE32 not to delete the targets │ │ │if the command completes with a nonzero │ │ │return code. If specified with targets, │ │ │only those targets are saved for nonzero │ │ │return codes. │ ├─────────────────────────┼─────────────────────────────────────────────┤ │.SILENT: │Instructs NMAKE32 not to echo commands. Same │ │ │function as /s option on the command line. │ ├─────────────────────────┼─────────────────────────────────────────────┤ │.SUFFIXES: [exts] │Used to change the defined extensions that │ │ │NMAKE32 recognizes for inference rule │ │ │processing. If specified without extensions, │ │ │resets the defined extensions to null. If │ │ │followed by extensions, these are added to │ │ │the defined recognized extensions. │ └─────────────────────────┴─────────────────────────────────────────────┘
Example:
# Example of .SUFFIXES and .PRECIOUS
.sav.exe:
-copy keep.sav keepthis.exe
.SUFFIXES: # This set .SUFFIXES to null
.SUFFIXES: .sav .exe # These two extensions can be used
# in inference rules
.PRECIOUS: keepthis.exe # This protects keepthis.exe from
# being deleted
keepthis.exe :keep.sav
# Inference rule will be used here
User defined pseudotargets are used when you wish to invoke a block of commands without having them associated to a target. This would allow you to invoke the block of commands either from the command line by specifying the pseudotarget name, or from the description file via a dependency. (The commands for a pseudotarget without dependencies are always executed.)
Example:
ALWAYS: @echo These commands will always execute if you @echo specify the pseudotarget ALWAYS on the NMAKE32 @echo invocation, or you run a description file where @echo ALWAYS appears as a dependent, or the only target @echo in the description file. There is no actual @echo file named ALWAYS.