| @@ -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. |
1246 | Unlike | | 1246 | Unlike |
1247 | .Cm \&.for | | 1247 | .Cm \&.for |
1248 | loops expansion occurs at the time of | | 1248 | loops expansion occurs at the time of |
1249 | reference. | | 1249 | reference. |
1250 | Assign | | 1250 | Assign |
1251 | .Ar temp | | 1251 | .Ar temp |
1252 | to each word in the variable and evaluate | | 1252 | to each word in the variable and evaluate |
1253 | .Ar string . | | 1253 | .Ar string . |
1254 | The ODE convention is that | | 1254 | The ODE convention is that |
1255 | .Ar temp | | 1255 | .Ar temp |
1256 | should start and end with a period. | | 1256 | should start and end with a period. |
1257 | For example. | | 1257 | For example. |
1258 | .Dl ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} | | 1258 | .Dl ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} |
| | | 1259 | .Pp |
| | | 1260 | However 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 |
1260 | If the variable is undefined | | 1263 | If the variable is undefined |
1261 | .Ar newval | | 1264 | .Ar newval |
1262 | is the value. | | 1265 | is the value. |
1263 | If the variable is defined, the existing value is returned. | | 1266 | If the variable is defined, the existing value is returned. |
1264 | This is another ODE make feature. | | 1267 | This is another ODE make feature. |
1265 | It is handy for setting per-target CFLAGS for instance: | | 1268 | It 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}} |
1267 | If a value is only required if the variable is undefined, use: | | 1270 | If 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 |
1270 | If the variable is defined | | 1273 | If the variable is defined |
1271 | .Ar newval | | 1274 | .Ar newval |