VirtualBox

source: kBuild/vendor/gnumake/3.82/make.1

Last change on this file was 2579, checked in by bird, 12 years ago

Importing make-3.82.tar.bz2 (md5sum 1a11100f3c63fcf5753818e59d63088f) with --auto-props but no keywords.

File size: 10.0 KB
Line 
1.TH MAKE 1 "22 August 1989" "GNU" "LOCAL USER COMMANDS"
2.SH NAME
3make \- GNU make utility to maintain groups of programs
4.SH SYNOPSIS
5.B "make "
6[
7.B \-f
8.I makefile
9] [ options ] ... [ targets ] ...
10.SH WARNING
11This man page is an extract of the documentation of GNU
12.IR make .
13It is updated only occasionally, because the GNU project does not use nroff.
14For complete, current documentation, refer to the Info file
15.B make.info
16which is made from the Texinfo source file
17.BR make.texi .
18.SH DESCRIPTION
19.LP
20The purpose of the
21.I make
22utility is to determine automatically which
23pieces of a large program need to be recompiled, and issue the commands to
24recompile them.
25The manual describes the GNU implementation of
26.IR make ,
27which was written by Richard Stallman and Roland McGrath, and is
28currently maintained by Paul Smith.
29Our examples show C programs, since they are most common, but you can use
30.I make
31with any programming language whose compiler can be run with a
32shell command.
33In fact,
34.I make
35is not limited to programs.
36You can use it to describe any task where some files must be
37updated automatically from others whenever the others change.
38.LP
39To prepare to use
40.IR make ,
41you must write a file called the
42.I makefile
43that describes the relationships among files in your program, and the
44states the commands for updating each file.
45In a program, typically the executable file is updated from object
46files, which are in turn made by compiling source files.
47.LP
48Once a suitable makefile exists, each time you change some source files,
49this simple shell command:
50.sp 1
51.RS
52.B make
53.RE
54.sp 1
55suffices to perform all necessary recompilations.
56The
57.I make
58program uses the makefile data base and the last-modification times
59of the files to decide which of the files need to be updated.
60For each of those files, it issues the commands recorded in the data base.
61.LP
62.I make
63executes commands in the
64.I makefile
65to update
66one or more target
67.IR names ,
68where
69.I name
70is typically a program.
71If no
72.B \-f
73option is present,
74.I make
75will look for the makefiles
76.IR GNUmakefile ,
77.IR makefile ,
78and
79.IR Makefile ,
80in that order.
81.LP
82Normally you should call your makefile either
83.I makefile
84or
85.IR Makefile .
86(We recommend
87.I Makefile
88because it appears prominently near the beginning of a directory
89listing, right near other important files such as
90.IR README .)
91The first name checked,
92.IR GNUmakefile ,
93is not recommended for most makefiles.
94You should use this name if you have a makefile that is specific to GNU
95.IR make ,
96and will not be understood by other versions of
97.IR make .
98If
99.I makefile
100is `\-', the standard input is read.
101.LP
102.I make
103updates a target if it depends on prerequisite files
104that have been modified since the target was last modified,
105or if the target does not exist.
106.SH OPTIONS
107.sp 1
108.TP 0.5i
109.BR \-b , " \-m"
110These options are ignored for compatibility with other versions of
111.IR make .
112.TP 0.5i
113.BR \-B , " \-\-always\-make"
114Unconditionally make all targets.
115.TP 0.5i
116\fB\-C\fR \fIdir\fR, \fB\-\-directory\fR=\fIdir\fR
117Change to directory
118.I dir
119before reading the makefiles or doing anything else.
120If multiple
121.B \-C
122options are specified, each is interpreted relative to the
123previous one:
124.BR "\-C " /
125.BR "\-C " etc
126is equivalent to
127.BR "\-C " /etc.
128This is typically used with recursive invocations of
129.IR make .
130.TP 0.5i
131.B \-d
132Print debugging information in addition to normal processing.
133The debugging information says which files are being considered for
134remaking, which file-times are being compared and with what results,
135which files actually need to be remade, which implicit rules are
136considered and which are applied---everything interesting about how
137.I make
138decides what to do.
139.TP 0.5i
140.BI \-\-debug "[=FLAGS]"
141Print debugging information in addition to normal processing.
142If the
143.I FLAGS
144are omitted, then the behavior is the same as if
145.B \-d
146was specified.
147.I FLAGS
148may be
149.I a
150for all debugging output (same as using
151.BR \-d ),
152.I b
153for basic debugging,
154.I v
155for more verbose basic debugging,
156.I i
157for showing implicit rules,
158.I j
159for details on invocation of commands, and
160.I m
161for debugging while remaking makefiles.
162.TP 0.5i
163.BR \-e , " \-\-environment\-overrides"
164Give variables taken from the environment precedence
165over variables from makefiles.
166.TP 0.5i
167\fB\-f\fR \fIfile\fR, \fB\-\-file\fR=\fIfile\fR, \fB\-\-makefile\fR=\fIFILE\fR
168Use
169.I file
170as a makefile.
171.TP 0.5i
172.BR \-i , " \-\-ignore\-errors"
173Ignore all errors in commands executed to remake files.
174.TP 0.5i
175\fB\-I\fR \fIdir\fR, \fB\-\-include\-dir\fR=\fIdir\fR
176Specifies a directory
177.I dir
178to search for included makefiles.
179If several
180.B \-I
181options are used to specify several directories, the directories are
182searched in the order specified.
183Unlike the arguments to other flags of
184.IR make ,
185directories given with
186.B \-I
187flags may come directly after the flag:
188.BI \-I dir
189is allowed, as well as
190.BI "\-I " dir.
191This syntax is allowed for compatibility with the C
192preprocessor's
193.B \-I
194flag.
195.TP 0.5i
196\fB\-j\fR [\fIjobs\fR], \fB\-\-jobs\fR[=\fIjobs\fR]
197Specifies the number of
198.I jobs
199(commands) to run simultaneously.
200If there is more than one
201.B \-j
202option, the last one is effective.
203If the
204.B \-j
205option is given without an argument,
206.IR make
207will not limit the number of jobs that can run simultaneously.
208.TP 0.5i
209.BR \-k , " \-\-keep\-going"
210Continue as much as possible after an error.
211While the target that failed, and those that depend on it, cannot
212be remade, the other dependencies of these targets can be processed
213all the same.
214.TP 0.5i
215\fB\-l\fR [\fIload\fR], \fB\-\-load\-average\fR[=\fIload\fR]
216Specifies that no new jobs (commands) should be started if there are
217others jobs running and the load average is at least
218.I load
219(a floating-point number).
220With no argument, removes a previous load limit.
221.TP 0.5i
222.BR \-L , " \-\-check\-symlink\-times"
223Use the latest mtime between symlinks and target.
224.TP 0.5i
225.BR \-n , " \-\-just\-print" , " \-\-dry\-run" , " \-\-recon"
226Print the commands that would be executed, but do not execute them (except in
227certain circumstances).
228.TP 0.5i
229\fB\-o\fR \fIfile\fR, \fB\-\-old\-file\fR=\fIfile\fR, \fB\-\-assume\-old\fR=\fIfile\fR
230Do not remake the file
231.I file
232even if it is older than its dependencies, and do not remake anything
233on account of changes in
234.IR file .
235Essentially the file is treated as very old and its rules are ignored.
236.TP 0.5i
237.BR \-p , " \-\-print\-data\-base"
238Print the data base (rules and variable values) that results from
239reading the makefiles; then execute as usual or as otherwise
240specified.
241This also prints the version information given by the
242.B \-v
243switch (see below).
244To print the data base without trying to remake any files, use
245.B make
246.B \-p
247.BI \-f /dev/null.
248.TP 0.5i
249.BR \-q , " \-\-question"
250``Question mode''.
251Do not run any commands, or print anything; just return an exit status
252that is zero if the specified targets are already up to date, nonzero
253otherwise.
254.TP 0.5i
255.BR \-r , " \-\-no\-builtin\-rules"
256Eliminate use of the built\-in implicit rules.
257Also clear out the default list of suffixes for suffix rules.
258.TP 0.5i
259.BR \-R , " \-\-no\-builtin\-variables"
260Don't define any built\-in variables.
261.TP 0.5i
262.BR \-s , " \-\-silent" , " \-\-quiet"
263Silent operation; do not print the commands as they are executed.
264.TP 0.5i
265.BR \-S , " \-\-no\-keep\-going" , " \-\-stop"
266Cancel the effect of the
267.B \-k
268option.
269This is never necessary except in a recursive
270.I make
271where
272.B \-k
273might be inherited from the top-level
274.I make
275via MAKEFLAGS or if you set
276.B \-k
277in MAKEFLAGS in your environment.
278.TP 0.5i
279.BR \-t , " \-\-touch"
280Touch files (mark them up to date without really changing them)
281instead of running their commands.
282This is used to pretend that the commands were done, in order to fool
283future invocations of
284.IR make .
285.TP 0.5i
286.BR \-v , " \-\-version"
287Print the version of the
288.I make
289program plus a copyright, a list of authors and a notice that there
290is no warranty.
291.TP 0.5i
292.BR \-w , " \-\-print\-directory"
293Print a message containing the working directory
294before and after other processing.
295This may be useful for tracking down errors from complicated nests of
296recursive
297.I make
298commands.
299.TP 0.5i
300.B \-\-no\-print\-directory
301Turn off
302.BR \-w ,
303even if it was turned on implicitly.
304.TP 0.5i
305\fB\-W\fR \fIfile\fR, \fB\-\-what\-if\fR=\fIfile\fR, \fB\-\-new\-file\fR=\fIfile\fR, \fB\-\-assume\-new\fR=\fIfile\fR
306Pretend that the target
307.I file
308has just been modified.
309When used with the
310.B \-n
311flag, this shows you what would happen if you were to modify that file.
312Without
313.BR \-n ,
314it is almost the same as running a
315.I touch
316command on the given file before running
317.IR make ,
318except that the modification time is changed only in the imagination of
319.IR make .
320.TP 0.5i
321.B \-\-warn\-undefined\-variables
322Warn when an undefined variable is referenced.
323.SH "EXIT STATUS"
324GNU
325.I make
326exits with a status of zero if all makefiles were successfully parsed
327and no targets that were built failed. A status of one will be returned
328if the
329.B \-q
330flag was used and
331.I make
332determines that a target needs to be rebuilt. A status of two will be
333returned if any errors were encountered.
334.SH "SEE ALSO"
335.I "The GNU Make Manual"
336.SH BUGS
337See the chapter `Problems and Bugs' in
338.IR "The GNU Make Manual" .
339.SH AUTHOR
340This manual page contributed by Dennis Morse of Stanford University.
341It has been reworked by Roland McGrath. Further updates contributed by
342Mike Frysinger.
343.SH "COPYRIGHT"
344Copyright (C) 1992, 1993, 1996, 1999, 2007 Free Software Foundation, Inc.
345This file is part of GNU
346.IR make .
347.LP
348GNU Make is free software; you can redistribute it and/or modify it under the
349terms of the GNU General Public License as published by the Free Software
350Foundation; either version 3 of the License, or (at your option) any later
351version.
352.LP
353GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
354WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
355A PARTICULAR PURPOSE. See the GNU General Public License for more details.
356.LP
357You should have received a copy of the GNU General Public License along with
358this program. If not, see
359.IR http://www.gnu.org/licenses/ .
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette