Sat Dec 17 04:43:45 2011 UTC ()
The :@ example gives the impression that we encourage the ODE
convention of naming loop variables like .LINK., when in fact
single char variables are far more common in NetBSD.


(sjg)
diff -r1.197 -r1.198 src/usr.bin/make/make.1

cvs diff -r1.197 -r1.198 src/usr.bin/make/make.1 (expand / switch to unified diff)

--- src/usr.bin/make/make.1 2011/11/13 18:18:35 1.197
+++ src/usr.bin/make/make.1 2011/12/17 04:43:45 1.198
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: make.1,v 1.197 2011/11/13 18:18:35 dholland Exp $ 1.\" $NetBSD: make.1,v 1.198 2011/12/17 04:43:45 sjg Exp $
2.\" 2.\"
3.\" Copyright (c) 1990, 1993 3.\" Copyright (c) 1990, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors 14.\" 3. Neither the name of the University nor the names of its contributors
@@ -19,27 +19,27 @@ @@ -19,27 +19,27 @@
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE. 28.\" SUCH DAMAGE.
29.\" 29.\"
30.\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 30.\" from: @(#)make.1 8.4 (Berkeley) 3/19/94
31.\" 31.\"
32.Dd November 6, 2011 32.Dd December 16, 2011
33.Dt MAKE 1 33.Dt MAKE 1
34.Os 34.Os
35.Sh NAME 35.Sh NAME
36.Nm make 36.Nm make
37.Nd maintain program dependencies 37.Nd maintain program dependencies
38.Sh SYNOPSIS 38.Sh SYNOPSIS
39.Nm 39.Nm
40.Op Fl BeikNnqrstWX 40.Op Fl BeikNnqrstWX
41.Bk -words 41.Bk -words
42.Op Fl C Ar directory 42.Op Fl C Ar directory
43.Ek 43.Ek
44.Bk -words 44.Bk -words
45.Op Fl D Ar variable 45.Op Fl D Ar variable
@@ -1246,26 +1246,29 @@ Environment (ODE) make. @@ -1246,26 +1246,29 @@ Environment (ODE) make.
1246Unlike 1246Unlike
1247.Cm \&.for 1247.Cm \&.for
1248loops expansion occurs at the time of 1248loops expansion occurs at the time of
1249reference. 1249reference.
1250Assign 1250Assign
1251.Ar temp 1251.Ar temp
1252to each word in the variable and evaluate 1252to each word in the variable and evaluate
1253.Ar string . 1253.Ar string .
1254The ODE convention is that 1254The ODE convention is that
1255.Ar temp 1255.Ar temp
1256should start and end with a period. 1256should start and end with a period.
1257For example. 1257For example.
1258.Dl ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} 1258.Dl ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@}
 1259.Pp
 1260However a single character varaiable is often more readable:
 1261.Dl ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@}
1259.It Cm \&:U Ns Ar newval 1262.It Cm \&:U Ns Ar newval
1260If the variable is undefined 1263If the variable is undefined
1261.Ar newval 1264.Ar newval
1262is the value. 1265is the value.
1263If the variable is defined, the existing value is returned. 1266If the variable is defined, the existing value is returned.
1264This is another ODE make feature. 1267This is another ODE make feature.
1265It is handy for setting per-target CFLAGS for instance: 1268It is handy for setting per-target CFLAGS for instance:
1266.Dl ${_${.TARGET:T}_CFLAGS:U${DEF_CFLAGS}} 1269.Dl ${_${.TARGET:T}_CFLAGS:U${DEF_CFLAGS}}
1267If a value is only required if the variable is undefined, use: 1270If a value is only required if the variable is undefined, use:
1268.Dl ${VAR:D:Unewval} 1271.Dl ${VAR:D:Unewval}
1269.It Cm \&:D Ns Ar newval 1272.It Cm \&:D Ns Ar newval
1270If the variable is defined 1273If the variable is defined
1271.Ar newval 1274.Ar newval