Microsoft SDK for Java

Nmake Options

This section describes the command-line options that can be used with Nmake.

/a

Forces a build of all evaluated targets, even if not out-of-date with respect to dependents. Does not force a build of unrelated targets.

/b

Forces a build even if timestamps are equal. Recommended only for very fast systems (resolution of two seconds or less).

/c

Suppresses default output, including nonfatal Nmake errors or warnings, timestamps, and Nmake copyright message. Suppresses warnings issued by /k.

/d

Displays timestamps of each evaluated target and dependent, and a message when a target does not exist. Useful with /p for debugging a makefile.

Use !CMDSWITCHES to set or clear /d for part of a makefile.

/e

Causes environment variables to override makefile macro definitions.

/f makefile

Specifies a makefile. Spaces or tabs can precede the makefile name. Specify /f once for each makefile. To supply a makefile from standard input, specify a hyphen (–) for the file name, and end the keyboard input with either F6 or CTRL+Z.

/help, /?

Displays Nmake usage information including a list of command-line options.

/i

Ignores exit codes from all commands. To set or clear /i for part of a makefile, use !CMDSWITCHES. To ignore exit codes for part of a makefile, use a hyphen (–) command modifier or .IGNORE. If both are specified, overrides /k.

/k

Continues building unrelated dependencies, if a command returns an error. Also issues a warning and returns an exit code of 1. By default, Nmake halts if any command returns a nonzero exit code. Warnings from /k are suppressed by /c. If both are specified, /i overrides /k.

/n

Displays but does not execute commands; preprocessing commands are executed. Does not display commands in recursive Nmake calls. Useful for debugging makefiles and checking timestamps. To set or clear /n for part of a makefile, use !CMDSWITCHES.

/nologo

Suppresses the Nmake copyright message.

/p

Displays Nmake information (macro definitions, inference rules, targets, .SUFFIXES list) to standard output, and then runs the build. If no makefile or command-line target exists, it only displays information. Use with /d to debug a makefile.

/q

Checks timestamps of targets but does not run the build. Returns a zero exit code if all targets are up-to-date and a nonzero exit code if any target is not. Preprocessing commands are executed. Useful when running Nmake from a batch file.

/r

Clears the .SUFFIXES list and ignores inference rules and macros that are predefined.

/s

Suppresses display of executed commands. To suppress display in part of a makefile, use the @ command modifier or .SILENT. To set or clear /s for part of a makefile, use !CMDSWITCHES.

/t

Updates timestamps of command-line targets (or first makefile target) and executes preprocessing commands, but does not run the build.

/u

Dumps inline Nmake files so that the /n output can be used as a batch file. Must be used in conjunction with /n.

/x <filename>

Sends Nmake error output to the specified file name instead of standard error. Spaces or tabs can precede the file name. To send error output to standard output, specify a hyphen (–) for file name. Does not affect output from commands to standard error.

/y

Disables batch-mode inference rules. When this option is selected, all batch-mode inference rules are treated as regular inference rules.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.