bmake.1 (67350cb56a69468c118bd4ccf6e361b7ebfa9eb4) | bmake.1 (ef0b253881c9546ff88d3ed8480df7c791b3ddff) |
---|---|
1.\" $NetBSD: make.1,v 1.273 2018/05/27 01:14:51 christos Exp $ | 1.\" $NetBSD: make.1,v 1.282 2020/06/06 20:28:42 wiz Exp $ |
2.\" 3.\" Copyright (c) 1990, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 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 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 28.\" SUCH DAMAGE. 29.\" 30.\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 31.\" | 2.\" 3.\" Copyright (c) 1990, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 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 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 28.\" SUCH DAMAGE. 29.\" 30.\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 31.\" |
32.Dd May 26, 2018 | 32.Dd June 5, 2020 |
33.Dt BMAKE 1 34.Os 35.Sh NAME 36.Nm bmake 37.Nd maintain program dependencies 38.Sh SYNOPSIS 39.Nm 40.Op Fl BeikNnqrstWwX --- 226 unchanged lines hidden (view full) --- 267It is more efficient to correct the scripts rather than turn backwards 268compatibility on. 269.It Fl k 270Continue processing after errors are encountered, but only on those targets 271that do not depend on the target whose creation caused the error. 272.It Fl m Ar directory 273Specify a directory in which to search for sys.mk and makefiles included 274via the | 33.Dt BMAKE 1 34.Os 35.Sh NAME 36.Nm bmake 37.Nd maintain program dependencies 38.Sh SYNOPSIS 39.Nm 40.Op Fl BeikNnqrstWwX --- 226 unchanged lines hidden (view full) --- 267It is more efficient to correct the scripts rather than turn backwards 268compatibility on. 269.It Fl k 270Continue processing after errors are encountered, but only on those targets 271that do not depend on the target whose creation caused the error. 272.It Fl m Ar directory 273Specify a directory in which to search for sys.mk and makefiles included 274via the |
275.Ao Ar file Ac Ns -style | 275.Li \&< Ns Ar file Ns Li \&> Ns -style |
276include statement. 277The 278.Fl m 279option can be used multiple times to form a search path. 280This path will override the default system include path: /usr/share/mk. 281Furthermore the system include path will be appended to the search path used 282for | 276include statement. 277The 278.Fl m 279option can be used multiple times to form a search path. 280This path will override the default system include path: /usr/share/mk. 281Furthermore the system include path will be appended to the search path used 282for |
283.Qo Ar file Qc Ns -style | 283.Li \*q Ns Ar file Ns Li \*q Ns -style |
284include statements (see the 285.Fl I 286option). 287.Pp 288If a file or directory name in the 289.Fl m 290argument (or the 291.Ev MAKESYSPATH --- 899 unchanged lines hidden (view full) --- 1191. 1192.It Cm \&:N Ns Ar pattern 1193This is identical to 1194.Ql Cm \&:M , 1195but selects all words which do not match 1196.Ar pattern . 1197.It Cm \&:O 1198Order every word in variable alphabetically. | 284include statements (see the 285.Fl I 286option). 287.Pp 288If a file or directory name in the 289.Fl m 290argument (or the 291.Ev MAKESYSPATH --- 899 unchanged lines hidden (view full) --- 1191. 1192.It Cm \&:N Ns Ar pattern 1193This is identical to 1194.Ql Cm \&:M , 1195but selects all words which do not match 1196.Ar pattern . 1197.It Cm \&:O 1198Order every word in variable alphabetically. |
1199To sort words in 1200reverse order use the 1201.Ql Cm \&:O:[-1..1] 1202combination of modifiers. | 1199.It Cm \&:Or 1200Order every word in variable in reverse alphabetical order. |
1203.It Cm \&:Ox 1204Randomize words in variable. 1205The results will be different each time you are referring to the 1206modified variable; use the assignment with expansion 1207.Pq Ql Cm \&:= 1208to prevent such behavior. 1209For example, 1210.Bd -literal -offset indent --- 18 unchanged lines hidden (view full) --- 1229Quotes every shell meta-character in the variable, so that it can be passed 1230safely to the shell. 1231.It Cm \&:q 1232Quotes every shell meta-character in the variable, and also doubles 1233.Sq $ 1234characters so that it can be passed 1235safely through recursive invocations of 1236.Nm . | 1201.It Cm \&:Ox 1202Randomize words in variable. 1203The results will be different each time you are referring to the 1204modified variable; use the assignment with expansion 1205.Pq Ql Cm \&:= 1206to prevent such behavior. 1207For example, 1208.Bd -literal -offset indent --- 18 unchanged lines hidden (view full) --- 1227Quotes every shell meta-character in the variable, so that it can be passed 1228safely to the shell. 1229.It Cm \&:q 1230Quotes every shell meta-character in the variable, and also doubles 1231.Sq $ 1232characters so that it can be passed 1233safely through recursive invocations of 1234.Nm . |
1237This is equivalent to: | 1235This is equivalent to: |
1238.Sq \&:S/\e\&$/&&/g:Q . 1239.It Cm \&:R 1240Replaces each word in the variable with everything but its suffix. 1241.It Cm \&:range[=count] 1242The value is an integer sequence representing the words of the original 1243value, or the supplied 1244.Va count . 1245.It Cm \&:gmtime[=utc] --- 178 unchanged lines hidden (view full) --- 1424anchored at the end of each word, so only suffixes or entire 1425words may be replaced. 1426Otherwise 1427.Ar % 1428is the substring of 1429.Ar old_string 1430to be replaced in 1431.Ar new_string . | 1236.Sq \&:S/\e\&$/&&/g:Q . 1237.It Cm \&:R 1238Replaces each word in the variable with everything but its suffix. 1239.It Cm \&:range[=count] 1240The value is an integer sequence representing the words of the original 1241value, or the supplied 1242.Va count . 1243.It Cm \&:gmtime[=utc] --- 178 unchanged lines hidden (view full) --- 1422anchored at the end of each word, so only suffixes or entire 1423words may be replaced. 1424Otherwise 1425.Ar % 1426is the substring of 1427.Ar old_string 1428to be replaced in 1429.Ar new_string . |
1430If only 1431.Ar old_string 1432contains the pattern matching character 1433.Ar % , 1434and 1435.Ar old_string 1436matches, then the result is the 1437.Ar new_string . 1438If only the 1439.Ar new_string 1440contains the pattern matching character 1441.Ar % , 1442then it is not treated specially and it is printed as a literal 1443.Ar % 1444on match. 1445If there is more than one pattern matching character 1446.Ar ( % ) 1447in either the 1448.Ar new_string 1449or 1450.Ar old_string , 1451only the first instance is treated specially (as the pattern character); 1452all subsequent instances are treated as regular characters |
|
1432.Pp 1433Variable expansion occurs in the normal fashion inside both 1434.Ar old_string 1435and 1436.Ar new_string 1437with the single exception that a backslash is used to prevent the 1438expansion of a dollar sign 1439.Pq Ql \&$ , --- 146 unchanged lines hidden (view full) --- 1586If 1587.Ar start 1588is greater than 1589.Ar end , 1590then the words are output in reverse order. 1591For example, 1592.Ql Cm \&:[-1..1] 1593selects all the words from last to first. | 1453.Pp 1454Variable expansion occurs in the normal fashion inside both 1455.Ar old_string 1456and 1457.Ar new_string 1458with the single exception that a backslash is used to prevent the 1459expansion of a dollar sign 1460.Pq Ql \&$ , --- 146 unchanged lines hidden (view full) --- 1607If 1608.Ar start 1609is greater than 1610.Ar end , 1611then the words are output in reverse order. 1612For example, 1613.Ql Cm \&:[-1..1] 1614selects all the words from last to first. |
1615If the list is already ordered, then this effectively reverses 1616the list, but it is more efficient to use 1617.Ql Cm \&:Or 1618instead of 1619.Ql Cm \&:O:[-1..1] . |
|
1594.\" :[*] 1595.It Cm \&* 1596Causes subsequent modifiers to treat the value as a single word 1597(possibly containing embedded white space). 1598Analogous to the effect of 1599\&"$*\&" 1600in Bourne shell. 1601.\" :[0] --- 16 unchanged lines hidden (view full) --- 1618Makefile inclusion, conditional structures and for loops reminiscent 1619of the C programming language are provided in 1620.Nm . 1621All such structures are identified by a line beginning with a single 1622dot 1623.Pq Ql \&. 1624character. 1625Files are included with either | 1620.\" :[*] 1621.It Cm \&* 1622Causes subsequent modifiers to treat the value as a single word 1623(possibly containing embedded white space). 1624Analogous to the effect of 1625\&"$*\&" 1626in Bourne shell. 1627.\" :[0] --- 16 unchanged lines hidden (view full) --- 1644Makefile inclusion, conditional structures and for loops reminiscent 1645of the C programming language are provided in 1646.Nm . 1647All such structures are identified by a line beginning with a single 1648dot 1649.Pq Ql \&. 1650character. 1651Files are included with either |
1626.Cm \&.include Aq Ar file | 1652.Cm \&.include \&< Ns Ar file Ns Cm \&> |
1627or | 1653or |
1628.Cm \&.include Pf \*q Ar file Ns \*q . | 1654.Cm \&.include \&\*q Ns Ar file Ns Cm \&\*q . |
1629Variables between the angle brackets or double quotes are expanded 1630to form the file name. 1631If angle brackets are used, the included makefile is expected to be in 1632the system makefile directory. 1633If double quotes are used, the including makefile's directory and any 1634directories specified using the 1635.Fl I 1636option are searched before the system --- 767 unchanged lines hidden (view full) --- 2404.Dq FRC 2405has been used to FoRCe rebuilding (since the target/dependency 2406does not exist... unless someone creates an 2407.Dq FRC 2408file). 2409.Sh BUGS 2410The 2411make | 1655Variables between the angle brackets or double quotes are expanded 1656to form the file name. 1657If angle brackets are used, the included makefile is expected to be in 1658the system makefile directory. 1659If double quotes are used, the including makefile's directory and any 1660directories specified using the 1661.Fl I 1662option are searched before the system --- 767 unchanged lines hidden (view full) --- 2430.Dq FRC 2431has been used to FoRCe rebuilding (since the target/dependency 2432does not exist... unless someone creates an 2433.Dq FRC 2434file). 2435.Sh BUGS 2436The 2437make |
2412syntax is difficult to parse without actually acting of the data. 2413For instance finding the end of a variable use should involve scanning each 2414the modifiers using the correct terminator for each field. | 2438syntax is difficult to parse without actually acting on the data. 2439For instance, finding the end of a variable's use should involve scanning 2440each of the modifiers, using the correct terminator for each field. |
2415In many places 2416make 2417just counts {} and () in order to find the end of a variable expansion. 2418.Pp 2419There is no way of escaping a space character in a filename. | 2441In many places 2442make 2443just counts {} and () in order to find the end of a variable expansion. 2444.Pp 2445There is no way of escaping a space character in a filename. |