Make Command Line


make [target | option | macro | @response] ...


Options are indicated by a "-" or "/" followed by a single letter, which is the option name.

Macros are macro definitions of the form name=[value]. Macros defined on the command line take precedence over macros defined in the makefile.

Targets are named targets to be built. If no command-line targets are listed the first target in the first makefile is made.

@response directs Make to read response file for additional options, macros, targets and response files.

Initial Options:

Before parsing the command line Make looks for the OPUSMAKEOPTS environment variable and, if it is found, its value is parsed as an initial command line.

Current Options:

After reading its initialization file, Make places the command-line options in a macro called MFLAGS. The state of each command-line option is also kept in a State Macro.

Command Line Options

Option Action
-a The command-line targets (or default target) are updated whether or not they need updating.
-A Automatic dependencies are enabled.
-b file Names file as the built-ins initialization file (the default is make.ini).
-d Run-time debugging of Make operation displays targets being made.
-D Keep-directory mode. The first access of a directory to look for a file results in the directory being read into memory and kept.
-e Environment macros prevail over the makefile definition
-E N Emulate NMAKE.
-E O Emulate Opus Make (the default).
-E P Emulate PolyMake / PVCS Configuration Builder.
-E 2 Emulate Opus Make v5.2x
-f file Specify file as the makefile. May be repeated. If file is "-" the console is read.
-h Display the list of command-line options.
-i Ignore errors. The non-zero exit status from any shell lines is ignored.
-k Keep working. Any errors when updating a target cause work on that target only to be stopped.
-m Use the memory miser. (MSDOS only)
-M Make the makefile before reading it.
-n No execute. Display but do not execute the shell lines.
-nologo Inhibit display of Opus Make banner.
-p Print debugging information to screen.
-q Query mode. Make returns exit status 0 if there is nothing to update.
-r Reject inference rules that are built into Make and that are defined in the initialization file.
-s Silent mode. Shell lines are not displayed before execution.
-t Touch out-of-date targets, setting their timestamp to the current time.
-T Like "-t", but creates target files of zero length if they do not exist yet.
-V Print out the Make banner and version then quit.
-x file Redirect error messages into file. If file is "-" the error messages are redirected to the screen.
-z The MFLAGS macro is not examined for options.
-# 1 Debugging option. Read-time debugging mode.
-# 2 Debugging option. Warn about undefined macros.
-# 4 Debugging option. Warn about unrecognized makefile lines.
-# 8 Debugging option. Leave behind generated response and batch files.