1 .TH MAKE 1L "22 August 1989" "GNU" "LOCAL USER COMMANDS"
3 make \- GNU make utility to maintain groups of programs
12 This man page is an extract of the documentation of
14 It is updated only occasionally, because the GNU project does not use nroff.
15 For complete, current documentation, refer to the Info file
17 which is made from the Texinfo source file
23 utility is to determine automatically which
24 pieces of a large program need to be recompiled, and issue the commands to
26 The manual describes the GNU implementation of
28 which was written by Richard Stallman and Roland McGrath.
29 Our examples show C programs, since they are most common, but you can use
31 with any programming language whose compiler can be run with a
35 is not limited to programs.
36 You can use it to describe any task where some files must be
37 updated automatically from others whenever the others change.
41 you must write a file called the
43 that describes the relationships among files in your program, and the
44 states the commands for updating each file.
45 In a program, typically the executable file is updated from object
46 files, which are in turn made by compiling source files.
48 Once a suitable makefile exists, each time you change some source files,
49 this simple shell command:
55 suffices to perform all necessary recompilations.
58 program uses the makefile data base and the last-modification times
59 of the files to decide which of the files need to be updated.
60 For each of those files, it issues the commands recorded in the data base.
63 executes commands in the
70 is typically a program.
75 will look for the makefiles
82 Normally you should call your makefile either
88 because it appears prominently near the beginning of a directory
89 listing, right near other important files such as
91 The first name checked,
93 is not recommended for most makefiles.
94 You should use this name if you have a makefile that is specific to GNU
96 and will not be understood by other versions of
100 is `\-', the standard input is read.
103 updates a target if it depends on prerequisite files
104 that have been modified since the target was last modified,
105 or if the target does not exist.
112 These options are ignored for compatibility with other versions of
118 before reading the makefiles or doing anything else.
121 options are specified, each is interpreted relative to the
127 This is typically used with recursive invocations of
131 Print debugging information in addition to normal processing.
132 The debugging information says which files are being considered for
133 remaking, which file-times are being compared and with what results,
134 which files actually need to be remade, which implicit rules are
135 considered and which are applied---everything interesting about how
140 Give variables taken from the environment precedence
141 over variables from makefiles.
149 Ignore all errors in commands executed to remake files.
152 Specifies a directory
154 to search for included makefiles.
157 options are used to specify several directories, the directories are
158 searched in the order specified.
159 Unlike the arguments to other flags of
161 directories given with
163 flags may come directly after the flag:
165 is allowed, as well as
167 This syntax is allowed for compatibility with the C
173 Specifies the number of jobs (commands) to run simultaneously.
174 If there is more than one
176 option, the last one is effective.
179 option is given without an argument,
181 will not limit the number of jobs that can run simultaneously.
184 Continue as much as possible after an error.
185 While the target that failed, and those that depend on it, cannot
186 be remade, the other dependencies of these targets can be processed
192 Specifies that no new jobs (commands) should be started if there are
193 others jobs running and the load average is at least
195 (a floating-point number).
196 With no argument, removes a previous load limit.
199 Print the commands that would be executed, but do not execute them.
202 Do not remake the file
204 even if it is older than its dependencies, and do not remake anything
205 on account of changes in
207 Essentially the file is treated as very old and its rules are ignored.
210 Print the data base (rules and variable values) that results from
211 reading the makefiles; then execute as usual or as otherwise
213 This also prints the version information given by the
216 To print the data base without trying to remake any files, use
223 Do not run any commands, or print anything; just return an exit status
224 that is zero if the specified targets are already up to date, nonzero
228 Eliminate use of the built-in implicit rules.
229 Also clear out the default list of suffixes for suffix rules.
232 Silent operation; do not print the commands as they are executed.
235 Cancel the effect of the
238 This is never necessary except in a recursive
242 might be inherited from the top-level
244 via MAKEFLAGS or if you set
246 in MAKEFLAGS in your environment.
249 Touch files (mark them up to date without really changing them)
250 instead of running their commands.
251 This is used to pretend that the commands were done, in order to fool
252 future invocations of
256 Print the version of the
258 program plus a copyright, a list of authors and a notice that there
262 Print a message containing the working directory
263 before and after other processing.
264 This may be useful for tracking down errors from complicated nests of
270 Pretend that the target
272 has just been modified.
275 flag, this shows you what would happen if you were to modify that file.
278 it is almost the same as running a
280 command on the given file before running
282 except that the modification time is changed only in the imagination of
285 .I "The GNU Make Manual"
287 See the chapter `Problems and Bugs' in
288 .I "The GNU Make Manual" .
290 This manual page contributed by Dennis Morse of Stanford University.
291 It has been reworked by Roland McGrath.