Makethe command-line options
-B
-M
Ignored to provide other versions of Make compatibility.
-B
--always-make
Forces the target of all rules to be rebuilt, without deciding whether to rebuild the target file based on the rule's dependency description.
-C DIR
--directory=dir
Before reading the makefile, go to the directory "dir", that is, switch the working directory to "dir" after the make. When there are multiple "-C" options, the final working directory of make is the relative path to the first directory. such as: "Make–c/C etc" is equivalent to "make–c/etc". In general, this option is used in recursive make calls.
-D
Make prints out all the debugging information during the execution. Include: make thinks those files need to be rebuilt, those files need to compare their last modified time, the results of comparisons, the commands to be executed to rebuild the target, the implied rules used, and so on. With the "-d" option we can see that make constructs a dependency chain and rebuilds all the information for the target process, which is equivalent to "-debug=a".
-debug[=options]
The debug information is output when make executes. You can use options to control the level of debug information. The default is "Options=b", and the possible values for "options" are the following, with the first letter valid (all and AW equivalent).
A (All)
Outputs all types of debug information, equivalent to the "-d" option.
B (Basic)
Output basic debugging information. Include: those targets expire, whether to rebuild successful expired target files.
V (verbose)
The output information above the "basic" level. Include: Parse the makefile file name, do not need to rebuild files and so on. This option opens the "Basic" level of debugging information by default.
I (implicit)
Outputs all the implied rule descriptions used. This option opens the "Basic" level of debugging information by default.
J (Jobs)
Outputs all the sub-processes that execute the command, including the PID of the command execution.
M (makefile)
That is makefile, output make reads makefile, updates makefile, and executes makefile information.
-E
--environment-overrides
Use the definition of the system environment variable to overwrite the same name variable definition in makefile.
-f=file
--file= file
--makefile= FILE
Specifies the makefile file that "file" executes for make.
-H
--help
Print help information.
-I.
--ignore-errors
The error that the rule command executes during execution is ignored.
-I. DIR
--include-dir=dir
Specifies the search directory that contains the makefile file. When another file "include" appears in makefile, it is searched under the "DIR" directory. When multiple "-i" directories are specified, the search directory is in the specified order.
-j [JOBS]
--jobs[=jobs]
Specifies the number of commands that can be executed concurrently. Without specifying the "-j" parameter, the number of commands executed will be the maximum possible number of systems allowed. When there are multiple "-j" parameters, the number specified by the last "-j" ("JOBS") is valid.
-K
--keep-going
Do not terminate the execution of make when executing a command error, making the most possible execution of all commands until a fatal error occurs.
-L LOAD
--load-average[=load]
-max-load[=load]
Tells make when there are other tasks executing, if the system load exceeds "load" (the floating-point number represents), the new task is no longer started. The "-i" option without specifying "LOAD" cancels the limit specified before "-i".
-N
--just-print
--dry-run
--recon
Prints only the command that you want to execute, but does not execute the command.
-O FILE
--old-file= file
--assume-old= FILE
The specified file "file" does not need to be rebuilt, even if the dependency relative to it has expired, and does not rebuild any files that depend on this file (the destination file). Note: This parameter is not passed to the child make process through the variable "makeflags".
-P
--print-data-base
Before the command executes, prints out all the data of the makefile that make read (including the values of rules and variables) and prints out the version information of make. You can use the MAKE-QP command only if you want to print this data information (without executing the command). To see the preset rules and variables before make executes, use the command "Make–p-f/dev/null".
-Q
--question
Called "inquiry mode"; no commands are run and no output is running. Make simply returns a query state. A return status of 0 indicates that no target needs to be rebuilt, 1 indicates there is a target to rebuild, and 2 indicates an error occurred.
-R
--no-builtin-rules
Suppresses all inline implicit rules, but you can use pattern rules in makefile to define rules. The option "-R" also cancels the list of implied suffixes for all supported trailing rules, and we can also use "." In Makefile. Suffixes "defines our own suffix rules. The "-r" option does not remove the implicit variable that is embedded in make.
-R
--no-builtin-variabes
Suppresses the implicit variables that are embedded in make, but we can explicitly define certain variables in makefile. Note that the "-r" option also turns on the "-r" option. Because there is no implied variable, the implied rule loses its meaning (the implied rule is based on an embedded implicit variable).
-S
--silent
--quiet
Cancels the printing of the command execution process.
-S
--no-keep-going
--stop
Cancels the "-k" option. In the recursive make process, neutron make inherits the upper-level command-line options through the "makeflags" variable. We can use the "-S" option in sub-make to cancel the "-k" option on the upper level, or cancel the "-k" option in the system environment variable "makeflags".
-T
-touch
Same as the Linux Touch command implementation, updates the timestamp of all target files to the current system time. Prevents make from rebuilding all obsolete target files.
-V
--version
View make version information.
-W
--print-directory
Print the working directory before make enters a directory to read makefile. This option can help us debug makefile and track positioning errors. This option is turned on by default when using the "-C" option. Refer to the description of the "-C" option in the first part of this section.
--no-print-directory
Cancels the "-w" option. Can be used in the recursive make call process, the "-C" parameter of the default open "-w" function.
-W FILE
--what-if= FILE
--new-file= file
--assume-file= file
The timestamp for the file "files" is the current time, but does not change the actual last modified time of the file. This option is primarily for a forced rebuild of all targets that depend on the file "files".
--warn-undefined-variables
An alarm message is given when a reference to a variable that is not defined is present in the discovery makefile. This feature can help us debug a complex makefile that has a multilevel set of nested variable references. However: We recommend that you try to avoid more than a three-level variable nested reference when writing makefile.
command-line options for Make