summaryrefslogtreecommitdiff
path: root/usr.bin/make/make.1
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/make/make.1')
-rw-r--r--usr.bin/make/make.168
1 files changed, 36 insertions, 32 deletions
diff --git a/usr.bin/make/make.1 b/usr.bin/make/make.1
index a0a7441a186..84b2d80377a 100644
--- a/usr.bin/make/make.1
+++ b/usr.bin/make/make.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: make.1,v 1.13 1998/09/05 17:41:47 deraadt Exp $
+.\" $OpenBSD: make.1,v 1.14 1998/09/26 19:55:05 aaron Exp $
.\" $NetBSD: make.1,v 1.18 1997/03/10 21:19:53 christos Exp $
.\"
.\" Copyright (c) 1990, 1993
@@ -55,7 +55,7 @@
.Op Ar variable=value
.Op Ar target ...
.Sh DESCRIPTION
-.Nm Make
+.Nm make
is a program designed to simplify the maintenance of other programs.
Its input is a list of specifications as to the files upon which programs
and other files depend.
@@ -91,7 +91,7 @@ to be 1, in the global context.
Turn on debugging, and specify which portions of
.Nm make
are to print debugging information.
-.Ar Flags
+.Ar flags
is one or more of the following:
.Bl -tag -width Ds
.It Ar A
@@ -133,7 +133,7 @@ If
is
.Ql Fl ,
standard input is read.
-Multiple makefile's may be specified, and are read in the order specified.
+Multiple makefiles may be specified, and are read in the order specified.
.It Fl I Ar directory
Specify a directory in which to search for makefiles and included makefiles.
The system makefile directory (or directories, see the
@@ -156,8 +156,9 @@ that do not depend on the target whose creation caused the error.
.It Fl m Ar directory
Specify a directory in which to search for sys.mk and makefiles included
via the <...> style. Multiple directories can be added to form a search path.
-This path will override the default system include path: /usr/share/mk.
-Furthermore the system include path will be appended to the search path used
+This path will override the default system include path:
+.Pa /usr/share/mk .
+Furthermore, the system include path will be appended to the search path used
for "..."-style inclusions (see the
.Fl I
option).
@@ -280,7 +281,9 @@ A
.Ql Ic \-
causes any non-zero exit status of the command line to be ignored.
.Sh VARIABLE ASSIGNMENTS
-Variables in make are much like variables in the shell, and, by tradition,
+Variables in
+.Nm make
+are much like variables in the shell, and, by tradition,
consist of all upper-case letters.
The five operators that can be used to assign values to variables are as
follows:
@@ -302,7 +305,7 @@ the result to the variable.
Any newlines in the result are replaced with spaces.
.El
.Pp
-Any white-space before the assigned
+Any whitespace before the assigned
.Ar value
is removed; if the value is being appended, a single space is inserted
between the previous contents of the variable and the appended value.
@@ -367,7 +370,7 @@ The name of the target; also known as
The shorter forms
.Ql Va @ ,
.Ql Va ? ,
-.Ql Va \&>
+.Ql Va \&> ,
and
.Ql Va *
are permitted for backward
@@ -377,7 +380,7 @@ The six variables
.Ql Va "@D" ,
.Ql Va "<F" ,
.Ql Va "<D" ,
-.Ql Va "*F"
+.Ql Va "*F" ,
and
.Ql Va "*D"
are
@@ -409,7 +412,7 @@ sign.
The name that
.Nm make
was executed with
-.Pq Va argv Op 0
+.Pq Va argv Ns Op 0 .
.It Va .CURDIR
A path to the directory where
.Nm make
@@ -440,7 +443,7 @@ Finally, if none of the above directories are available
will settle for and use the current directory.
.It Ev MAKEFLAGS
The environment variable
-.Ql Ev MAKEFLAGS
+.Ev MAKEFLAGS
may contain anything that
may be specified on
.Nm make Ns 's
@@ -448,7 +451,7 @@ command line.
Anything specified on
.Nm make Ns 's
command line is appended to the
-.Ql Ev MAKEFLAGS
+.Ev MAKEFLAGS
variable which is then
entered into the environment for all programs which
.Nm make
@@ -461,15 +464,15 @@ normally sets
to the canonical path given by
.Xr getcwd 2 .
However, if the environment variable
-.Ql Ev PWD
+.Ev PWD
is set and gives a path to the current directory, then
.Nm make
sets
.Ql Va .CURDIR
to the value of
-.Ql Ev PWD
+.Ev PWD
instead.
-.Ql Ev PWD
+.Ev PWD
is set to the value of
.Ql Va .OBJDIR
for all programs which
@@ -478,7 +481,7 @@ executes.
.El
.Pp
Variable expansion may be modified to select or modify each word of the
-variable (where a ``word'' is white-space delimited sequence of characters).
+variable (where a ``word'' is whitespace delimited sequence of characters).
The general format of a variable expansion is as follows:
.Pp
.Dl {variable[:modifier[:...]]}
@@ -505,13 +508,13 @@ The wildcard characters may be escaped with a backslash
.Pq Ql \e .
.It Cm N Ns Ar pattern
This is identical to
-.Ql Cm M ,
+.Cm M ,
but selects all words which do not match
the rest of the modifier.
.It Cm Q
Quotes every shell meta-character in the variable, so that it can be passed
safely through recursive invocations of
-.Nm .
+.Nm make .
.It Cm R
Replaces each word in the variable with everything but its suffix.
.Sm off
@@ -779,7 +782,7 @@ Takes a target name as an argument and evaluates to true if the target
has been defined.
.El
.Pp
-.Ar Expression
+.Ar expression
may also be an arithmetic or string comparison. Variable expansion is
performed on both sides of the comparison, after which the integral
values are compared. A value is interpreted as hexadecimal if it is
@@ -797,7 +800,7 @@ variable is being compared against 0.
.Pp
When
.Nm make
-is evaluating one of these conditional expression, and it encounters
+is evaluating one of these conditional expressions, and it encounters
a word it doesn't recognize, either the ``make'' or ``defined''
expression is applied to it, depending on the form of the conditional.
If the form is
@@ -809,7 +812,8 @@ is applied.
Similarly, if the form is
.Ql Ic .ifmake
or
-.Ql Ic .ifnmake , the ``make''
+.Ql Ic .ifnmake ,
+the ``make''
expression is applied.
.Pp
If the conditional evaluates to true the parsing of the makefile continues
@@ -838,10 +842,10 @@ The syntax of a for loop is:
.Xc
.El
After the for
-.Ic expression
+.Ar expression
is evaluated, it is split into words. The
iteration
-.Ic variable
+.Ar variable
is successively set to each word, and substituted in the
.Ic make-rules
inside the body of the for loop.
@@ -888,7 +892,7 @@ as if they all were preceded by an at sign
.Pq Ql @ .
.It Ic .USE
Turn the target into
-.Nm make Ns 's .
+.Nm make Ns 's
version of a macro.
When the target is used as a source for another target, the other target
acquires the commands, sources, and attributes (except for
@@ -998,7 +1002,7 @@ Each source specifies a suffix to
.Nm make .
If no sources are specified, any previous specified suffices are deleted.
.Sh ENVIRONMENT
-.Nm Make
+.Nm make
utilizes the following environment variables, if they exist:
.Ev MACHINE ,
.Ev MAKE ,
@@ -1008,21 +1012,21 @@ and
.Ev PWD .
.Sh FILES
.Bl -tag -width /usr/share/mk -compact
-.It .depend
+.It Pa .depend
list of dependencies
-.It Makefile
+.It Pa Makefile
list of dependencies
-.It makefile
+.It Pa makefile
list of dependencies
-.It sys.mk
+.It Pa sys.mk
system makefile
-.It /usr/share/mk
+.It Pa /usr/share/mk
system makefile directory
.El
.Sh SEE ALSO
.Xr mkdep 1
.Sh HISTORY
A
-.Nm Make
+.Nm make
command appeared in
.At v7 .