| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: make.1,v 1.161 2009/09/08 17:29:20 sjg Exp $ | | 1 | .\" $NetBSD: make.1,v 1.162 2009/10/01 21:40:31 dsl 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 September 7, 2009 | | 32 | .Dd October 1, 2009 |
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 |
| @@ -1051,28 +1051,31 @@ Replaces each word in the variable with | | | @@ -1051,28 +1051,31 @@ Replaces each word in the variable with |
1051 | Remove adjacent duplicate words (like | | 1051 | Remove adjacent duplicate words (like |
1052 | .Xr uniq 1 ) . | | 1052 | .Xr uniq 1 ) . |
1053 | .Sm off | | 1053 | .Sm off |
1054 | .It Cm \&:\&? Ar true_string Cm \&: Ar false_string | | 1054 | .It Cm \&:\&? Ar true_string Cm \&: Ar false_string |
1055 | .Sm on | | 1055 | .Sm on |
1056 | If the variable name (not its value), when parsed as a .if conditional | | 1056 | If the variable name (not its value), when parsed as a .if conditional |
1057 | expression, evaluates to true, return as its value the | | 1057 | expression, evaluates to true, return as its value the |
1058 | .Ar true_string , | | 1058 | .Ar true_string , |
1059 | otherwise return the | | 1059 | otherwise return the |
1060 | .Ar false_string . | | 1060 | .Ar false_string . |
1061 | Since the variable name is used as the expression, \&:\&? must be the | | 1061 | Since the variable name is used as the expression, \&:\&? must be the |
1062 | first modifier after the variable name itself - which will, of course, | | 1062 | first modifier after the variable name itself - which will, of course, |
1063 | usually contain variable expansions. | | 1063 | usually contain variable expansions. |
1064 | If the expression is a single token, it will likely be treated as a check | | 1064 | A common error is trying to use expressions like |
1065 | for the name being defined. | | 1065 | .Dl ${NUMBERS:M42:?match:no} |
| | | 1066 | which actually tests defined(NUMBERS), |
| | | 1067 | to determine is any words match "42" you need to use something like: |
| | | 1068 | .Dl ${${NUMBERS:M42} != "":?match:no} . |
1066 | .It Ar :old_string=new_string | | 1069 | .It Ar :old_string=new_string |
1067 | This is the | | 1070 | This is the |
1068 | .At V | | 1071 | .At V |
1069 | style variable substitution. | | 1072 | style variable substitution. |
1070 | It must be the last modifier specified. | | 1073 | It must be the last modifier specified. |
1071 | If | | 1074 | If |
1072 | .Ar old_string | | 1075 | .Ar old_string |
1073 | or | | 1076 | or |
1074 | .Ar new_string | | 1077 | .Ar new_string |
1075 | do not contain the pattern matching character | | 1078 | do not contain the pattern matching character |
1076 | .Ar % | | 1079 | .Ar % |
1077 | then it is assumed that they are | | 1080 | then it is assumed that they are |
1078 | anchored at the end of each word, so only suffixes or entire | | 1081 | anchored at the end of each word, so only suffixes or entire |