home *** CD-ROM | disk | FTP | other *** search
- The syntax for NMAKE is:
-
- NMAKE [option...] [macros...] [targets...] [@commandfile...]
-
- NMAKE builds only specified targets or, if none is specified, the first target
- in the makefile. The first makefile target can be a pseudotarget that builds
- other targets. NMAKE uses makefiles specified with /F; if /F is not specified,
- it uses the Makefile file in the current directory. If no makefile is specified,
- it uses inference rules to build command-line targets.
-
- The commandfile text file contains command-line input. Other input can precede
- or follow @commandfile. A path is permitted. In commandfile, line breaks are
- treated as spaces. Enclose macro definitions in quotation marks if they contain spaces.
-
-
- NMAKE options are described in the following table.
-
- Options are preceded by either a slash (/) or a dash (û) and are not case sensitive.
- Use !CMDSWITCHES to change option settings in a makefile.
-
- Option Action
- ----------- -----------------------------------------------------------------------
- /A Forces build of all evaluated targets, even if not out-of-date with
- respect to dependents. Does not force build of unrelated targets.
-
- /B Forces 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 filename Specifies filename as a makefile. Spaces or tabs can precede filename.
- Specify /F once for each makefile. To supply a makefile from standard
- input, specify a dash (û) for filename, and end keyboard input with
- either F6 or CTRL+Z.
-
- /HELP, /? Displays a brief summary of NMAKE command-line syntax.
-
- /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 dash (û) command modifier or .IGNORE. Overrides /K if both
- are specified.
-
- /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; /I overrides /K if both are specified.
-
- /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 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 displays information only.
- Use with /D to debug a makefile.
-
- /Q Checks timestamps of targets; 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 Must be used in conjunction with /N. Dumps inline NMAKE files so that
- the /N output can be used as a batch file.
-
- /X filename Sends NMAKE error output to filename instead of standard error. Spaces or
- tabs can precede filename. To send error output to standard output,
- specify a dash (û) for filename. 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.
-
-
- NMAKE returns the following exit codes.
-
- Code Meaning
- -------- -------------------------------------------------------
- 0 No error (possibly a warning)
-
- 1 Incomplete build (issued only when /K is used)
-
- 2 Program error, possibly due to one of the following:
- A syntax error in the makefile
- An error or exit code from a command
- An interruption by the user
-
- 4 System errorùout of memory
-
- 255 Target is not up-to-date (issued only when /Q is used)
-
-
-