Nmake's command line syntax
grammar:
Nmake [options] [macros] [Targets]
Where options are NMAKE options, Macros is the macro definition in the command line, and Targets is a list of target files for NMAKE.
Option (ignore the case):
1) / a Forced Reconfiguration All Dependents related to NMAKE Target, even if these Dependents have not expired;
2) / b Even if Dependent has the same Time Stamp, it is also the same Time Stamp, and it is also rebuilt. Time stamp in most OS is in 2 seconds, if it is modified within 2 seconds, then its Time Stamp will not change. In this case, you need to use this option to make NMAKE rebuild. In order to prevent everyone, this option should always be used, although it may cause unnecessary reconstruction operations.
3) / c Shield most of the NMAKE output information, including: Non-fatal error information, warning information, Time Stamp, and copyright information. If the / c and / k option exists at the same time, the warning information sent by / k will be done.
4) / D Display the relevant information during NMAKE execution. Including Time Stamp, dependencies, and prompt information similar to "files do not exist". Used to get the error of makefile;
5) / E enable environment variables to cover predefined macros;
6) / f FileName Specifies the name of the makefile. If you use "-" instead of FileName, NMAKE gets the Makefile input from Stdin (for the keyboard terminal, ending with F6 or Ctrl z). You can specify multiple Makefile, and there is one / f before each makefile.
If there is no / f option, nmake will find a file called Makefile as Makefile in the current directory. If you can't find it, use the derived rule for the command line target file.
7) / Help shows help;
8) / i ignore the return value of all instructions in the makefile;
9) / K does not exit when an instruction has an error but continues other instructions. In the default, if any one of the instructions returns a non-0 value, Nmaek is terminated back to the execution. When the / k option is turned on, NMAKE will continue to perform other instructions, but do not build files related to the error instruction, but a warning message is issued. If the / k option is opened, the build cannot be completed, then nmake returns 1;
10) / m Under MS-DOS, swap NMAKE programs to disk to make more memory.
11) / n Show but do not perform commands in makefile (except for pre-processing commands) for Debug;
12) / NOLOGO prohibits NMAKE copyright information;
13) / P Precursing all NMAKE information to Stdout, including all macro definitions, IR, target file descriptions, and .suffixes list. If you open the / P option, the NMAKE only displays the relevant information.
14) / Q Check Time Stamp, but does not execute Commands Block. Returns 0 if the target file is valid, otherwise 255. Only the preprocessing command in makefile will be executed. This option is useful when calling nmake in a batch file. 15) / r Clear. Suffixes List, Ignore all IR and Tools.ini defined or predefined macros.
16) / s Disable display information for all of the executed instructions in Makefile;
17) / t Transform the time stamp in the command line to the current time, only the preprocessing command is executed without executing Commands Block, and the content of the target file will not be changed;
18) / V When NMAKE is recursively called, all defined macros will be inherited. By default, only macros defined in the command line (actually a macro) can be inherited.
19) / x filename outputs all the error information of the NMAKE to the file or device specified by the filename. If you use "-" instead of FileName, the error message is output to Stdout. By default, the error message outputs to the stderr. This option does not affect the output generated by the command in the Makefile.
20) /? Display nmake's grammar and available options;
NMAKE return value
Nmake's return value and its meaning are shown below:
Value meaning
0 no error
1 Do not fully perform instructions in Commands Block (valid only when the / k option is opened)
2 Program errors, possible reasons include:
l Makefile's grammatical error
L Commands Block Action An error occurred
l User interrupt
4 system errors, such as insufficient memory
255 When the / q option is opened, the value is returned if the target file has expired.