diff options
Diffstat (limited to 'make.1')
-rw-r--r-- | make.1 | 168 |
1 files changed, 81 insertions, 87 deletions
@@ -1,49 +1,35 @@ -.TH MAKE 1 "22 August 1989" "GNU" "LOCAL USER COMMANDS" +.TH MAKE 1 "27 December 2010" "GNU" "User Commands" .SH NAME make \- GNU make utility to maintain groups of programs .SH SYNOPSIS -.B "make " -[ -.B \-f -.I makefile -] [ options ] ... [ targets ] ... -.SH WARNING -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.texi . +.B make +[\fIOPTION\fR]... [\fITARGET\fR]... .SH DESCRIPTION .LP -The purpose of the -.I make -utility is to determine automatically which -pieces of a large program need to be recompiled, and issue the commands to -recompile them. -The manual describes the GNU implementation of -.IR make , -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 +The .I make -with any programming language whose compiler can be run with a -shell command. +utility will determine automatically which pieces of a large program need to +be recompiled, and issue the commands to recompile them. The manual describes +the GNU implementation of +.BR make , +which was written by Richard Stallman and Roland McGrath, and is currently +maintained by Paul Smith. Our examples show C programs, since they are very +common, but you can use +.B make +with any programming language whose compiler can be run with a shell command. In fact, -.I make -is not limited to programs. -You can use it to describe any task where some files must be -updated automatically from others whenever the others change. +.B make +is not limited to programs. You can use it to describe any task where some +files must be updated automatically from others whenever the others change. .LP To prepare to use -.IR make , +.BR make , you must write a file called the .I makefile -that describes the relationships among files in your program, and the -states the commands for updating each file. -In a program, typically the executable file is updated from object -files, which are in turn made by compiling source files. +that describes the relationships among files in your program, and the states +the commands for updating each file. In a program, typically the executable +file is updated from object files, which are in turn made by compiling source +files. .LP Once a suitable makefile exists, each time you change some source files, this simple shell command: @@ -54,16 +40,15 @@ this simple shell command: .sp 1 suffices to perform all necessary recompilations. The -.I make -program uses the makefile data base and the last-modification times -of the files to decide which of the files need to be updated. -For each of those files, it issues the commands recorded in the data base. +.B make +program uses the makefile description and the last-modification times of the +files to decide which of the files need to be updated. For each of those +files, it issues the commands recorded in the makefile. .LP -.I make +.B make executes commands in the .I makefile -to update -one or more target +to update one or more target .IR names , where .I name @@ -71,7 +56,7 @@ is typically a program. If no .B \-f option is present, -.I make +.B make will look for the makefiles .IR GNUmakefile , .IR makefile , @@ -90,27 +75,27 @@ listing, right near other important files such as .IR README .) The first name checked, .IR GNUmakefile , -is not recommended for most makefiles. -You should use this name if you have a makefile that is specific to GNU -.IR make , +is not recommended for most makefiles. You should use this name if you have a +makefile that is specific to GNU +.BR make , and will not be understood by other versions of -.IR make . +.BR make . If .I makefile is `\-', the standard input is read. .LP -.I make +.B make updates a target if it depends on prerequisite files that have been modified since the target was last modified, or if the target does not exist. .SH OPTIONS .sp 1 .TP 0.5i -.BR \-b , " \-m" +\fB\-b\fR, \fB\-m\fR These options are ignored for compatibility with other versions of -.IR make . +.BR make . .TP 0.5i -.BR \-B , " \-\-always\-make" +\fB\-B\fR, \fB\-\-always\-make\fR Unconditionally make all targets. .TP 0.5i \fB\-C\fR \fIdir\fR, \fB\-\-directory\fR=\fIdir\fR @@ -126,7 +111,7 @@ previous one: is equivalent to .BR "\-C " /etc. This is typically used with recursive invocations of -.IR make . +.BR make . .TP 0.5i .B \-d Print debugging information in addition to normal processing. @@ -134,7 +119,7 @@ The debugging information says which files are being considered for remaking, which file-times are being compared and with what results, which files actually need to be remade, which implicit rules are considered and which are applied---everything interesting about how -.I make +.B make decides what to do. .TP 0.5i .BI \-\-debug "[=FLAGS]" @@ -160,7 +145,7 @@ for details on invocation of commands, and .I m for debugging while remaking makefiles. .TP 0.5i -.BR \-e , " \-\-environment\-overrides" +\fB\-e\fR, \fB\-\-environment\-overrides\fR Give variables taken from the environment precedence over variables from makefiles. .TP 0.5i @@ -169,7 +154,7 @@ Use .I file as a makefile. .TP 0.5i -.BR \-i , " \-\-ignore\-errors" +\fB\-i\fR, \fB\-\-ignore\-errors\fR Ignore all errors in commands executed to remake files. .TP 0.5i \fB\-I\fR \fIdir\fR, \fB\-\-include\-dir\fR=\fIdir\fR @@ -181,13 +166,14 @@ If several options are used to specify several directories, the directories are searched in the order specified. Unlike the arguments to other flags of -.IR make , +.BR make , directories given with .B \-I flags may come directly after the flag: .BI \-I dir is allowed, as well as -.BI "\-I " dir. +.B \-I +.IR dir . This syntax is allowed for compatibility with the C preprocessor's .B \-I @@ -203,10 +189,10 @@ option, the last one is effective. If the .B \-j option is given without an argument, -.IR make +.BR make will not limit the number of jobs that can run simultaneously. .TP 0.5i -.BR \-k , " \-\-keep\-going" +\fB\-k\fR, \fB\-\-keep\-going\fR 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 @@ -219,10 +205,10 @@ others jobs running and the load average is at least (a floating-point number). With no argument, removes a previous load limit. .TP 0.5i -.BR \-L , " \-\-check\-symlink\-times" +\fB\-L\fR, \fB\-\-check\-symlink\-times\fR Use the latest mtime between symlinks and target. .TP 0.5i -.BR \-n , " \-\-just\-print" , " \-\-dry\-run" , " \-\-recon" +\fB\-n\fR, \fB\-\-just\-print\fR, \fB\-\-dry\-run\fR, \fB\-\-recon\fR Print the commands that would be executed, but do not execute them (except in certain circumstances). .TP 0.5i @@ -234,7 +220,7 @@ on account of changes in .IR file . Essentially the file is treated as very old and its rules are ignored. .TP 0.5i -.BR \-p , " \-\-print\-data\-base" +\fB\-p\fR, \fB\-\-print\-data\-base\fR Print the data base (rules and variable values) that results from reading the makefiles; then execute as usual or as otherwise specified. @@ -242,63 +228,61 @@ This also prints the version information given by the .B \-v switch (see below). To print the data base without trying to remake any files, use -.B make -.B \-p -.BI \-f /dev/null. +.IR "make \-p \-f/dev/null" . .TP 0.5i -.BR \-q , " \-\-question" +\fB\-q\fR, \fB\-\-question\fR ``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 -.BR \-r , " \-\-no\-builtin\-rules" +\fB\-r\fR, \fB\-\-no\-builtin\-rules\fR Eliminate use of the built\-in implicit rules. Also clear out the default list of suffixes for suffix rules. .TP 0.5i -.BR \-R , " \-\-no\-builtin\-variables" +\fB\-R\fR, \fB\-\-no\-builtin\-variables\fR Don't define any built\-in variables. .TP 0.5i -.BR \-s , " \-\-silent" , " \-\-quiet" +\fB\-s\fR, \fB\-\-silent\fR, \fB\-\-quiet\fR Silent operation; do not print the commands as they are executed. .TP 0.5i -.BR \-S , " \-\-no\-keep\-going" , " \-\-stop" +\fB\-S\fR, \fB\-\-no\-keep\-going\fR, \fB\-\-stop\fR Cancel the effect of the .B \-k option. This is never necessary except in a recursive -.I make +.B make where .B \-k might be inherited from the top-level -.I make +.B make via MAKEFLAGS or if you set .B \-k in MAKEFLAGS in your environment. .TP 0.5i -.BR \-t , " \-\-touch" +\fB\-t\fR, \fB\-\-touch\fR 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 . +.BR make . .TP 0.5i .B \-\-trace Print information about the commands invoked by -.IR make. +.BR make. .TP 0.5i -.BR \-v , " \-\-version" +\fB\-v\fR, \fB\-\-version\fR Print the version of the -.I make +.B make program plus a copyright, a list of authors and a notice that there is no warranty. .TP 0.5i -.BR \-w , " \-\-print\-directory" +\fB\-w\fR, \fB\-\-print\-directory\fR Print a message containing the working directory before and after other processing. This may be useful for tracking down errors from complicated nests of recursive -.I make +.B make commands. .TP 0.5i .B \-\-no\-print\-directory @@ -318,25 +302,35 @@ Without it is almost the same as running a .I touch command on the given file before running -.IR make , +.BR make , except that the modification time is changed only in the imagination of -.IR make . +.BR make . .TP 0.5i .B \-\-warn\-undefined\-variables Warn when an undefined variable is referenced. .SH "EXIT STATUS" GNU -.I make +.B make exits with a status of zero if all makefiles were successfully parsed and no targets that were built failed. A status of one will be returned if the .B \-q flag was used and -.I make +.B make determines that a target needs to be rebuilt. A status of two will be returned if any errors were encountered. .SH "SEE ALSO" -.I "The GNU Make Manual" +The full documentation for +.B make +is maintained as a Texinfo manual. If the +.B info +and +.B make +programs are properly installed at your site, the command +.IP +.B info make +.PP +should give you access to the complete manual. .SH BUGS See the chapter `Problems and Bugs' in .IR "The GNU Make Manual" . @@ -345,9 +339,9 @@ This manual page contributed by Dennis Morse of Stanford University. Further updates contributed by Mike Frysinger. It has been reworked by Roland McGrath. Maintained by Paul Smith. .SH "COPYRIGHT" -Copyright (C) 1992, 1993, 1996, 1999, 2007, 2010 Free Software Foundation, Inc. -This file is part of GNU -.IR make . +Copyright \(co 1992, 1993, 1996, 1999, 2007, 2010 Free Software Foundation, Inc. +This file is part of +.IR "GNU make" . .LP GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software |