home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
gnu
/
make-3.70-bin.lha
/
man
/
cat1
/
make.0
Wrap
Text File
|
1993-12-07
|
10KB
|
265 lines
MAKE(1L) LOCAL USER COMMANDS MAKE(1L)
NNAAMMEE
make - GNU make utility to maintain groups of programs
SSYYNNOOPPSSIISS
mmaakkee [ --ff makefile ] [ option ] ... target ...
WWAARRNNIINNGG
This man paage is an extract of the documentation of _G_N_U
_m_a_k_e _. It is updated only occasionally, because the GNU
project does not use nroff. For complete, current docu-
mentation, refer to the Info file mmaakkee or the DVI file
mmaakkee..ddvvii which are made from the Texinfo source file
mmaakkee..tteexxiinnffoo.
DDEESSCCRRIIPPTTIIOONN
The purpose of the _m_a_k_e utility is to determine automati-
cally which pieces of a large program need to be recom-
piled, and issue the commands to recompile them. This
manual describes the GNU implementation of _m_a_k_e, which was
written by Richard Stallman and Roland McGrath. Our exam-
ples show C programs, since they are most common, but you
can use _m_a_k_e with any programming language whose compiler
can be run with a shell command. In fact, _m_a_k_e 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.
To prepare to use _m_a_k_e, you must write a file called the
_m_a_k_e_f_i_l_e 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 com-
piling source files.
Once a suitable makefile exists, each time you change some
source files, this simple shell command:
mmaakkee
suffices to perform all necessary recompilations. The
_m_a_k_e 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.
_m_a_k_e executes commands in the _m_a_k_e_f_i_l_e to update one or
more target _n_a_m_e_s, where _n_a_m_e is typically a program. If
no --ff option is present, _m_a_k_e will look for the makefiles
_G_N_U_m_a_k_e_f_i_l_e, _m_a_k_e_f_i_l_e, and _M_a_k_e_f_i_l_e, in that order.
Normally you should call your makefile either _m_a_k_e_f_i_l_e or
_M_a_k_e_f_i_l_e. (We recommend _M_a_k_e_f_i_l_e because it appears
prominently near the beginning of a directory listing,
right near other important files such as _R_E_A_D_M_E.) The
GNU 22 August 1989 1
MAKE(1L) LOCAL USER COMMANDS MAKE(1L)
first name checked, _G_N_U_m_a_k_e_f_i_l_e, is not recommended for
most makefiles. You should use this name if you have a
makefile that is specific to GNU _m_a_k_e, and will not be
understood by other versions of _m_a_k_e. If _m_a_k_e_f_i_l_e is `-',
the standard input is read.
_m_a_k_e updates a target if it depends on prerequisite files
that have been modified since the target was last modi-
fied, or if the target does not exist.
OOPPTTIIOONNSS
--bb
--mm These options are ignored for compatibility with
other versions of _m_a_k_e.
--CC _d_i_r
Change to directory _d_i_r before reading the makefiles
or doing anything else. If multiple --CC options are
specified, each is interpreted relative to the previ-
ous one: --CC / --CC etc is equivalent to --CC /etc. This
is typically used with recursive invocations of _m_a_k_e.
--dd Print debugging information in addition to normal
processing. 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 _m_a_k_e
decides what to do.
--ee Give variables taken from the environment precedence
over variables from makefiles.
--ff _f_i_l_e
Use _f_i_l_e as a makefile.
--ii Ignore all errors in commands executed to remake
files.
--II _d_i_r
Specifies a directory _d_i_r to search for included
makefiles. If several --II options are used to specify
several directories, the directories are searched in
the order specified. Unlike the arguments to other
flags of _m_a_k_e, directories given with --II flags may
come directly after the flag: --II_d_i_r is allowed, as
well as --II _d_i_r_. This syntax is allowed for compati-
bility with the C preprocessor's --II flag.
--jj _j_o_b_s
Specifies the number of jobs (commands) to run simul-
taneously. If there is more than one --jj option, the
GNU 22 August 1989 2
MAKE(1L) LOCAL USER COMMANDS MAKE(1L)
last one is effective. If the --jj option is given
without an argument, _m_a_k_e will not limit the number
of jobs that can run simultaneously.
--kk 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.
--ll
--ll _l_o_a_d
Specifies that no new jobs (commands) should be
started if there are others jobs running and the load
average is at least _l_o_a_d (a floating-point number).
With no argument, removes a previous load limit.
--nn Print the commands that would be executed, but do not
execute them.
--oo _f_i_l_e
Do not remake the file _f_i_l_e even if it is older than
its dependencies, and do not remake anything on
account of changes in _f_i_l_e. Essentially the file is
treated as very old and its rules are ignored.
--pp Print the data base (rules and variable values) that
results from reading the makefiles; then execute as
usual or as otherwise specified. This also prints
the version information given by the --vv switch (see
below). To print the data base without trying to
remake any files, use mmaakkee --pp --ff_/_d_e_v_/_n_u_l_l_.
--qq ``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.
--rr Eliminate use of the built-in implicit rules. Also
clear out the default list of suffixes for suffix
rules.
--ss Silent operation; do not print the commands as they
are executed.
--SS Cancel the effect of the --kk option. This is never
necessary except in a recursive _m_a_k_e where --kk might
be inherited from the top-level _m_a_k_e via MAKEFLAGS or
if you set --kk in MAKEFLAGS in your environment.
--tt 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 _m_a_k_e.
GNU 22 August 1989 3
MAKE(1L) LOCAL USER COMMANDS MAKE(1L)
--vv Print the version of the _m_a_k_e program plus a copy-
right, a list of authors and a notice that there is
no warranty. After this information is printed, pro-
cessing continues normally. To get this information
without doing anything else, use mmaakkee --vv --ff_/_d_e_v_/_n_u_l_l_.
--ww Print a message containing the working directory
before and after other processing. This may be use-
ful for tracking down errors from complicated nests
of recursive _m_a_k_e commands.
--WW _f_i_l_e
Pretend that the target _f_i_l_e has just been modified.
When used with the --nn flag, this shows you what would
happen if you were to modify that file. Without --nn,
it is almost the same as running a _t_o_u_c_h command on
the given file before running _m_a_k_e, except that the
modification time is changed only in the imagination
of _m_a_k_e.
SSEEEE AALLSSOO
/usr/local/doc/gnumake.dvi
_T_h_e _G_N_U _M_a_k_e _M_a_n_u_a_l
BBUUGGSS
See the chapter `Problems and Bugs' in _T_h_e _G_N_U _M_a_k_e _M_a_n_u_a_l
_.
AAUUTTHHOORR
This manual page contributed by Dennis Morse of Stanford
University. It has been reworked by Roland McGrath.
GNU 22 August 1989 4