-
- nmake - configure, manage and update file hierarchies
-
- make [ options ] [ script ... ] [ target ... ]
-
- nmake reads input makefiles and triggers shell actions to build target files that are out of date with prerequisite files. Most information used
to build targets is contained in the global base rules that are augmented by user makefiles. Each operand may be an option, script, or target. An
option operand is preceded by - or +. A script operand contains at least one of space, tab, newline, :, =, ",
or \ and is parsed as a separate, complete makefile. Otherwise the operand is a target that is generated according to the makefile and global
rules. target operands are made in order from left to right and override the default targets.
- Command line options, scripts and targets may appear in any order, with the exception that no option operand may appear after a -- operand.
- Options are qualified by the base name of the makefile that defined them. Unqualified options are defined by nmake itself.
-
- -A, --accept
- Accept filesystem timestamps of existing targets.
- -a, --alias
- Enable directory aliasing.
- -b, --base
- Compile base or global rules.
- -B, --believe=level
- Believe the state file time of files lower than view level level-1. The file system time will be checked for
files with no state or files in views equal to or higher than level. level=0 causes the file system time to be checked for files on all view levels.
The top view is level 0. The default value is 0.
- -C, --compatibility
- Disable compatibility messages.
- -c, --compile
- Compile the input makefile and exit.
- -X, --corrupt[=action]
- action determines the action to take for corrupt or invalid top view state files. The top view default is
error and the lower view default is accept. action may be one of:
- accept
- print a warning and set --accept
- error
- print a diagnostic and exit
- ignore
- print a warning and set --noreadstate
- If the option value is omitted then accept is assumed.
- -J, --cross
- Don't run generated executables.
- -d, --debug=level
- Set the debug trace level to level. Higher levels produce more output.
- -E, --errorid=id
- Add id to the error message command identifier. The default value is make.
- -n, --exec
- Enable shell action execution. --noexec disables all but .ALWAYS shell actions and also disables make object and
state file generation/updates. On by default; -n means --noexec.
- -x, --expandview
- Expand 3d filesystem paths.
- -e, --explain
- Explain each action.
- -f, --file=file
- Read the makefile file. If --file is not specified then the makefile names specified by $(MAKEFILES)
are attempted in order from left to right. The file - is equivalent to /dev/null.
- -F, --force
- Force all targets to be out of date.
- -g, --global=file
- Read the global makefile file. The --file search is not affected.
- -i, --ignore
- Ignore shell action errors.
- -K, --ignorelock
- Ignore state file locks.
- -I, --include=directory
- Add directory to the makefile search list.
- -G, --intermediate
- Force intermediate target generation.
- -j, --jobs=level
- Set the shell action concurrency level to level. Level 1 allows dependency checking while an action is
executing; level 0 stops all activity while an action is executing. The default value is ${NPROC:-1}.
- -k, --keepgoing
- Continue after error with sibling prerequisites.
- -l, --list
- List the current rules and variables on the standard output in makefile form.
- -M, --mam=type[,subtype][:file[:parent[:directory]]]
- Write make abstract machine output to file if specified or to the
standard output otherwise. See mam(5) for details on the make abstract machine language. If parent
!=0 then it is the process id of a parent mam process. directory is the working directory of the current mam process relative to the root mam
process, . if not specified. type must be one of:
- dynamic
- mam trace of an actual build
- regress
- mam for regression testing; labels, path names and time stamps are canonicalized for easy comparison
- static
- mam representation of the makefile assertions; used for makefile conversion
- ----
- 0 or more comma separated subtypes ----
- port
- used by the base rules to generate portable makefiles; some paths are parameterized; on by default
- -N, --never
- Don't execute any shell actions. --noexec executes .ALWAYS shell actions.
- --option='char;name;flags;set;description;values'
- Define a new option. The definition is a delimiter separated field list. Any
non-alpha-numberic delimiter other than - may be used. ; is used in this description. Makefile set option definitions must be '...' quoted.
Two adjacent delimiters specifies the literal delimiter character and a - field value specifies an empty field. char is the single character option
name, name is the long option name, set is an optional .FUNCTION that is called when the option value is changed by set, values
is an optget(3) value list, and flags are a combination of:
- a
- multiple values appended
- b
- boolean value
- i
- internal value inverted
- n
- numeric value
- o
- -char means --noname
- s
- string value
- v
- optional option argument
- x
- not expanded in $(-)
- --override
- Implicit rules or metarules override explicit rules.
- -Q, --questionable=mask
- Enable questionable features defined by mask. Questionable features are artifacts of previous
implementations (nmake has been around since 1984-11-01) that will eventually be dropped. The questionable mask registry is in the main.c nmake
source file.
- -R, --readonly
- Current assignments and assertions will be marked readonly.
- -S, --readstate[=level]
- Ignore state files lower than view level level. level=0 ignores state files on all view levels.
The top view is level 0. The option value may be omitted. The default value is 0.
- -q, --regress
- Massage output for regression testing.
- --reread
- Ignore any previously generated .mo files and re-read all input makefiles.
- -r, --ruledump
- Dump rule information in tabular form on the standard error when nmake exits.
- --scan
- Scan for and/or check implicit file prerequisites. On by default.
- -O, --serialize
- Serialize concurrent output by caching job stdout and stderr output until job completion.
- -s, --silent
- Do not trace shell actions as they are executed.
- -V, --strictview
- Set VPATH .SOURCE rule interpretation to follow strict 3d filesystem semantics, where directories in the
top views take precedence. On by default when running in 2d with VPATH defined, off by default otherwise.
- --target-context
- Expand and execute shell actions in the target directory context. This allows a single makefile to control a directory tree while
generating target files at the source file directory level. By default target files are generated in the current directory.
- --target-prefix=separator
- Allow metarules to match separator in the target to / in the source. Used to disambiguate source file
base name clashes when target files are generated in the current directory. separator must not contain metarule or shell pattern characters.
- -T, --test=mask
- Enable test code defined by mask. Test code is implementation specific. The test mask registry is in the
main.c nmake source file.
- -z, --tolerance=seconds
- Set the time comparison tolerance to seconds. Times within the tolerance range compare equal. Useful on
systems that can't quite get the file system and local clocks in sync. A tolerance of more that 5 seconds soon becomes intolerable.
- -t, --touch
- Touch the time stamps of out of date targets rather than execute the shell action.
- -v, --vardump
- Dump variable information in tabular form on the standard error when nmake exits.
- -w, --warn
- Enable verbose warning messages.
- --writeobject[=file]
- Generate a .mo make object file in file that can be read instead of the input makefiles on the next nmake
invocation. On by default. --nowriteobject prevents the generation. The default name is used if file is omitted or -. If file is a
directory then the default is placed in that directory. The option value may be omitted. The default value is $(MAKEFILE:B:S=.mo).
- --writestate[=file]
- Generate a .ms make state file in file when nmake exits.The state contains the time stamps of all
prerequisites and targets that have been accessed since the state file was first generated. On by default. --nowritestate prevents the generation. The
default name is used if file is omitted or -. If file is a directory then the default is placed in that directory. The option value may be
omitted. The default value is $(MAKEFILE:B:S=.ms).
- -o, --byname=name[=value]
- (obsolete) Set options by name.
- -D, --define=name[=value]
- (obsolete) Pass macro definition to the makefile preprocessor.
- -P, --preprocess
- (obsolete) Preprocess all makefiles.
- -U, --undef=name
- (obsolete) Pass macro deletion to the makefile preprocessor.
- --all-static
- (Makerules) Force the prerequisite libraries of static +lname library references to be static.
- --ancestor=depth
- (Makerules) Set the ancestor search directory depth to depth. MAKEPATH and variant recursive invocations may
increase the depth. The default value is 3.
- --ancestor-source=.SOURCE.suffix directory...
- (Makerules) A list of .SOURCE.suffix directory pairs added to the ancestor
directory search. The default value is .SOURCE.a lib .SOURCE.h include.
- --archive-clean=edit-ops
- (Makerules) A catenation of edit operators that selects archive member files to be removed after being added to the
archive.
- --archive-output=file
- (Makerules) The output file name for archiving actions (pax, save, tgz, etc.) The default is based
on the current directory and the VERSION variable.
- --cctype=type
- (Makerules) Set the probe(1) C compiler type identifier. The default value
is based on the CC variable.
- --clean-ignore=pattern
- (Makerules) Ignore clean action generated target files matching pattern.
- --clobber[=pattern]
- (Makerules) Replace existing install action targets matching pattern instead of renaming to target.old
. If the option value is omitted then * is assumed.
- --compare
- (Makerules) Ignore install action targets whose contents have not changed. On by default.
- --debug-symbols
- (Makerules) Compile and link with debugging symbol options enabled.
- --force-shared
- (Makerules) Do not ignore -lname shared library reference modification times.
- --instrument=command
- (Makerules) Enable compile-time, link-time and/or run-time code instrumentation. Instrumentation interfaces that replace
the compiler command, and the app, insight, purecov, purify, quantify and sentinel special-need interfaces, are
supported.
- --ld-script=suffix
- (Makerules) A space-separated list of suffixes of script files to be passed to the linker.
- --lib-type
- (Makerules) Bind library references to --debug-symbols or --profile specific variants.
- --link=pattern
- (Makerules) Hard link install action targets matching pattern instead of copying.
- --local-static
- (Makerules) Compile and link against static library targets. The default links against shared library targets, but care must be taken
to point runtime shared library binding to the current directory when executing command targets in the current directory.
- --native-pp=level
- (Makerules) Force the use of the native C preprocessor and print a level diagnostic message noting the override.
- --official-output=file
- (Makerules) The diff(1) log file name for the official
action. If file is a relative path name then it is written in the next view level. The default value is OFFICIAL.
- --prefix-include
- (Makerules) Override the C preprocessor prefix include option. --noprefix-include may be needed for some compilers that
misbehave when $(CC.INCLUDE.LOCAL) is set and #include "..." assumes the subdirectory of the including file. The default value is based on the probe(1)
information.
- --preserve[=pattern]
- (Makerules) Move existing install action targets matching pattern to the ETXTBSY subdirectory of the
install target. If the option value is omitted then * is assumed.
- --profile
- (Makerules) Compile and link with prof(1) instrumentation options enabled.
- --recurse=action
- (Makerules) Set the recursive :MAKE: action:
- combine
- Combine all recursive makefiles into one rooted at the current directory. ::, :PACKAGE:, .SOURCE*,
and LDLIBRARIES are intercepted to adjust relative directory and library references. Complex makefile hierarchies may not be amenable to combination.
- implicit
- All makefiles in all subdirectories are treated as if they contained :MAKE:.
- list
- List the recursion directories, one per line, on the standard output and exit. A - prerequisite separates groups that
may be made concurrently and a + prerequisite separates leaf directories from intermediate directories.
- prereqs
- List the recursion directory dependencies as a makefile on the standard output and exit.
- number
- Set the directory recursion concurrency level to number.
- The default value is 1.
- --recurse-enter=text
- (Makerules) text prependeded to the directory: message printed on the standard error upon entering a
recursive :MAKE: directory.
- --recurse-leave=text
- (Makerules) text prependeded to the directory: message printed on the standard error upon leaving a
recursive :MAKE: directory. If --recurse-leave is not specified then no message is printed upon leaving :MAKE: directories.
- --select=edit-ops
- (Makerules) A catenation of edit operators that selects terminal source files.
- --separate-include
- (Makerules) Allow $(CC.INCLUDE.LOCAL) to be used with compilers that support it. On by default. If --noseparate-include
is set then $(CC.INCLUDE.LOCAL) will not be used, even if the current compiler supports it.
- --shared
- (Makerules) Set :LIBRARY: to generate shared libraries (dlls).
- --static-link
- (Makerules) Compile and link with a preference for static libraries.
- --strip-symbols
- (Makerules) Strip link-time static symbols from executables.
- --threads
- (Makerules) Compile and link with thread options enabled. Not implemented yet.
- --variants[=pattern]
- (Makerules) Select only cc-variant directories matching pattern. If the option value is omitted then
* is assumed.
- --view-verify=level
- (Makerules) Verify that all view root directories exist. If there are any missing directories then a level
diagnostic is printed.
- --virtual
- (Makerules) Allow :MAKE: to mkdir(1) recursive directories that do not exist in
the top view. On by default. If --novirtual is set then :MAKE: warns about but ignores virtual recursive directories.
-
- Diagnostic messages are printed on the standard error and are classified by levels. The level determines if the diagnostic is printed, if it causes nmake
to exit, and if it affects the nmake exit status. The levels are:
- <0
- Debug message, enabled when the absolute value of level is greater than or equal to the --debug level. Debug
diagnostics are prefixed by debug-level:.
- 1
- Warning message, disabled by --silent. Warning diagnostics are prefixed by warning:
- 2
- Non-fatal error message. Processing continues after the diagnostic, but the eventual nmake exit status will be non-zero.
- >2
- Fatal error message. nmake exits after the diagnostic (and internal cleanup) with exit status level-2.
-
- 3d(1), ar(1), cc(1),
coshell(1), cpp(1), probe(1),
sh(1)
-
- version
- make (AT&T Research) 5.3 2008-02-02
- author
- Glenn Fowler <gsf@research.att.com>
- copyright
- Copyright © 1984-2008 AT&T Intellectual Property
- license
- http://www.opensource.org/licenses/cpl1.0.txt