-.TH MAKE 1L "22 August 1989" "GNU" "LOCAL USER COMMANDS"
+.TH MAKE 1 "22 August 1989" "GNU" "LOCAL USER COMMANDS"
.SH NAME
make \- GNU make utility to maintain groups of programs
.SH SYNOPSIS
[
.B \-f
.I makefile
-] [ option ] ...
-target ...
+] [ options ] ... [ targets ] ...
.SH WARNING
-This man page is an extract of the documentation of
-.I GNU make .
+This man page is an extract of the documentation of GNU
+.IR make .
It is updated only occasionally, because the GNU project does not use nroff.
For complete, current documentation, refer to the Info file
.B make.info
which is made from the Texinfo source file
-.BR make.texinfo .
+.BR make.texi .
.SH DESCRIPTION
.LP
The purpose of the
recompile them.
The manual describes the GNU implementation of
.IR make ,
-which was written by Richard Stallman and Roland McGrath.
+which was written by Richard Stallman and Roland McGrath, and is
+currently maintained by Paul Smith.
Our examples show C programs, since they are most common, but you can use
.I make
with any programming language whose compiler can be run with a
.SH OPTIONS
.sp 1
.TP 0.5i
-.B \-b
-.TP 0.5i
-.B \-m
+.BR \-b , " \-m"
These options are ignored for compatibility with other versions of
.IR make .
.TP 0.5i
-.BI "\-C " dir
+.BR \-B , " \-\-always\-make"
+Unconditionally make all targets.
+.TP 0.5i
+\fB\-C\fR \fIdir\fR, \fB\-\-directory\fR=\fIdir\fR
Change to directory
.I dir
before reading the makefiles or doing anything else.
.I make
decides what to do.
.TP 0.5i
-.B \-e
+.BI \-\-debug "[=FLAGS]"
+Print debugging information in addition to normal processing.
+If the
+.I FLAGS
+are omitted, then the behavior is the same as if
+.B \-d
+was specified.
+.I FLAGS
+may be
+.I a
+for all debugging output (same as using
+.BR \-d ),
+.I b
+for basic debugging,
+.I v
+for more verbose basic debugging,
+.I i
+for showing implicit rules,
+.I j
+for details on invocation of commands, and
+.I m
+for debugging while remaking makefiles.
+.TP 0.5i
+.BR \-e , " \-\-environment\-overrides"
Give variables taken from the environment precedence
over variables from makefiles.
.TP 0.5i
-.BI "\-f " file
++\fB\-f\fR \fIfile\fR, \fB\-\-file\fR=\fIfile\fR, \fB\-\-makefile\fR=\fIFILE\fR
Use
.I file
as a makefile.
.TP 0.5i
-.B \-i
+.BR \-i , " \-\-ignore\-errors"
Ignore all errors in commands executed to remake files.
.TP 0.5i
-.BI "\-I " dir
+\fB\-I\fR \fIdir\fR, \fB\-\-include\-dir\fR=\fIdir\fR
Specifies a directory
.I dir
to search for included makefiles.
.B \-I
flag.
.TP 0.5i
-.BI "\-j " jobs
-Specifies the number of jobs (commands) to run simultaneously.
+\fB\-j\fR [\fIjobs\fR], \fB\-\-jobs\fR[=\fIjobs\fR]
+Specifies the number of
+.I jobs
+(commands) to run simultaneously.
If there is more than one
.B \-j
option, the last one is effective.
.IR make
will not limit the number of jobs that can run simultaneously.
.TP 0.5i
-.B \-k
+.BR \-k , " \-\-keep\-going"
Continue as much as possible after an error.
While the target that failed, and those that depend on it, cannot
be remade, the other dependencies of these targets can be processed
all the same.
.TP 0.5i
-.B \-l
-.TP 0.5i
-.BI "\-l " load
+\fB\-l\fR [\fIload\fR], \fB\-\-load\-average\fR[=\fIload\fR]
Specifies that no new jobs (commands) should be started if there are
others jobs running and the load average is at least
.I load
(a floating-point number).
With no argument, removes a previous load limit.
.TP 0.5i
-.B \-n
+.BR \-L , " \-\-check\-symlink\-times"
+Use the latest mtime between symlinks and target.
+.TP 0.5i
+.BR \-n , " \-\-just\-print" , " \-\-dry\-run" , " \-\-recon"
Print the commands that would be executed, but do not execute them.
.TP 0.5i
-.BI "\-o " file
+\fB\-o\fR \fIfile\fR, \fB\-\-old\-file\fR=\fIfile\fR, \fB\-\-assume\-old\fR=\fIfile\fR
Do not remake the file
.I file
even if it is older than its dependencies, and do not remake anything
.IR file .
Essentially the file is treated as very old and its rules are ignored.
.TP 0.5i
-.B \-p
+.BR \-p , " \-\-print\-data\-base"
Print the data base (rules and variable values) that results from
reading the makefiles; then execute as usual or as otherwise
specified.
.B \-p
.BI \-f /dev/null.
.TP 0.5i
-.B \-q
+.BR \-q , " \-\-question"
``Question mode''.
Do not run any commands, or print anything; just return an exit status
that is zero if the specified targets are already up to date, nonzero
otherwise.
.TP 0.5i
-.B \-r
-Eliminate use of the built-in implicit rules.
+.BR \-r , " \-\-no\-builtin\-rules"
+Eliminate use of the built\-in implicit rules.
Also clear out the default list of suffixes for suffix rules.
.TP 0.5i
-.B \-s
+.BR \-R , " \-\-no\-builtin\-variables"
+Don't define any built\-in variables.
+.TP 0.5i
+.BR \-s , " \-\-silent" , " \-\-quiet"
Silent operation; do not print the commands as they are executed.
.TP 0.5i
-.B \-S
+.BR \-S , " \-\-no\-keep\-going" , " \-\-stop"
Cancel the effect of the
.B \-k
option.
.B \-k
in MAKEFLAGS in your environment.
.TP 0.5i
-.B \-t
+.BR \-t , " \-\-touch"
Touch files (mark them up to date without really changing them)
instead of running their commands.
This is used to pretend that the commands were done, in order to fool
future invocations of
.IR make .
.TP 0.5i
-.B \-v
+.BR \-v , " \-\-version"
Print the version of the
.I make
program plus a copyright, a list of authors and a notice that there
is no warranty.
.TP 0.5i
-.B \-w
+.BR \-w , " \-\-print\-directory"
Print a message containing the working directory
before and after other processing.
This may be useful for tracking down errors from complicated nests of
.I make
commands.
.TP 0.5i
-.BI "\-W " file
+.B \-\-no\-print\-directory
+Turn off
+.BR \-w ,
+even if it was turned on implicitly.
+.TP 0.5i
+\fB\-W\fR \fIfile\fR, \fB\-\-what\-if\fR=\fIfile\fR, \fB\-\-new\-file\fR=\fIfile\fR, \fB\-\-assume\-new\fR=\fIfile\fR
Pretend that the target
.I file
has just been modified.
.IR make ,
except that the modification time is changed only in the imagination of
.IR make .
+.TP 0.5i
+.B \-\-warn\-undefined\-variables
+Warn when an undefined variable is referenced.
.SH "SEE ALSO"
.I "The GNU Make Manual"
.SH BUGS
See the chapter `Problems and Bugs' in
-.I "The GNU Make Manual" .
+.IR "The GNU Make Manual" .
.SH AUTHOR
This manual page contributed by Dennis Morse of Stanford University.
-It has been reworked by Roland McGrath.
+It has been reworked by Roland McGrath. Further updates contributed by
+Mike Frysinger.
+# -*-perl-*-
+
$description = "The following tests the -i option and the '-' in front of \n"
."commands to test that make ignores errors in these commands\n"
."and continues processing.";
if ($vos)
{
- $delete_command = "delete_file";
+ $rm_command = "delete_file";
}
else
{
- $delete_command = "rm";
+ $rm_command = "rm";
}
open(MAKEFILE,"> $makefile");
# The Contents of the MAKEFILE ...
print MAKEFILE "clean:\n"
- ."\t-$delete_command cleanit\n"
- ."\t$delete_command foo\n"
+ ."\t-$rm_command cleanit\n"
+ ."\t$rm_command foo\n"
."clean2: \n"
- ."\t$delete_command cleanit\n"
- ."\t$delete_command foo\n";
+ ."\t$rm_command cleanit\n"
+ ."\t$rm_command foo\n";
# END of Contents of MAKEFILE
&touch("foo");
unlink("cleanit");
-$cleanit_error = `sh -c "$delete_command cleanit 2>&1"`;
+$cleanit_error = `sh -c "$rm_command cleanit 2>&1"`;
$delete_error_code = $? >> 8;
# TEST #1
# -------
-$answer = "$delete_command cleanit\n"
+$answer = "$rm_command cleanit\n"
. $cleanit_error
."$make_name: [clean] Error $delete_error_code (ignored)\n"
- ."$delete_command foo\n";
+ ."$rm_command foo\n";
&run_make_with_options($makefile,"",&get_logfile);
# TEST #2
# -------
-$answer = "$delete_command cleanit\n"
+$answer = "$rm_command cleanit\n"
. $cleanit_error
."$make_name: [clean2] Error $delete_error_code (ignored)\n"
- ."$delete_command foo\n";
+ ."$rm_command foo\n";
&run_make_with_options($makefile,"clean2 -i",&get_logfile);