bmake.cat1 (50d2e745fa6eaec4ff8fc4112b6b86ba2e27ffe3) | bmake.cat1 (ef0b253881c9546ff88d3ed8480df7c791b3ddff) |
---|---|
1BMAKE(1) FreeBSD General Commands Manual BMAKE(1) 2 3[1mNAME[0m 4 [1mbmake [22m-- maintain program dependencies 5 6[1mSYNOPSIS[0m 7 [1mbmake [22m[[1m-BeikNnqrstWwX[22m] [[1m-C [4m[22mdirectory[24m] [[1m-D [4m[22mvariable[24m] [[1m-d [4m[22mflags[24m] 8 [[1m-f [4m[22mmakefile[24m] [[1m-I [4m[22mdirectory[24m] [[1m-J [4m[22mprivate[24m] [[1m-j [4m[22mmax_jobs[24m] --- 765 unchanged lines hidden (view full) --- 774 will normalize the inter-word spacing, removing all leading and 775 trailing space, and converting multiple consecutive spaces to single 776 spaces. 777 778 [1m:N[4m[22mpattern[0m 779 This is identical to `[1m:M[22m', but selects all words which do not match 780 [4mpattern[24m. 781 | 1BMAKE(1) FreeBSD General Commands Manual BMAKE(1) 2 3[1mNAME[0m 4 [1mbmake [22m-- maintain program dependencies 5 6[1mSYNOPSIS[0m 7 [1mbmake [22m[[1m-BeikNnqrstWwX[22m] [[1m-C [4m[22mdirectory[24m] [[1m-D [4m[22mvariable[24m] [[1m-d [4m[22mflags[24m] 8 [[1m-f [4m[22mmakefile[24m] [[1m-I [4m[22mdirectory[24m] [[1m-J [4m[22mprivate[24m] [[1m-j [4m[22mmax_jobs[24m] --- 765 unchanged lines hidden (view full) --- 774 will normalize the inter-word spacing, removing all leading and 775 trailing space, and converting multiple consecutive spaces to single 776 spaces. 777 778 [1m:N[4m[22mpattern[0m 779 This is identical to `[1m:M[22m', but selects all words which do not match 780 [4mpattern[24m. 781 |
782 [1m:O [22mOrder every word in variable alphabetically. To sort words in 783 reverse order use the `[1m:O:[-1..1][22m' combination of modifiers. | 782 [1m:O [22mOrder every word in variable alphabetically. |
784 | 783 |
784 [1m:Or [22mOrder every word in variable in reverse alphabetical order. 785 |
|
785 [1m:Ox [22mRandomize words in variable. The results will be different each 786 time you are referring to the modified variable; use the assignment 787 with expansion (`[1m:=[22m') to prevent such behavior. For example, 788 789 LIST= uno due tre quattro 790 RANDOM_LIST= ${LIST:Ox} 791 STATIC_RANDOM_LIST:= ${LIST:Ox} 792 --- 5 unchanged lines hidden (view full) --- 798 may produce output similar to: 799 800 quattro due tre uno 801 tre due quattro uno 802 due uno quattro tre 803 due uno quattro tre 804 805 [1m:Q [22mQuotes every shell meta-character in the variable, so that it can be | 786 [1m:Ox [22mRandomize words in variable. The results will be different each 787 time you are referring to the modified variable; use the assignment 788 with expansion (`[1m:=[22m') to prevent such behavior. For example, 789 790 LIST= uno due tre quattro 791 RANDOM_LIST= ${LIST:Ox} 792 STATIC_RANDOM_LIST:= ${LIST:Ox} 793 --- 5 unchanged lines hidden (view full) --- 799 may produce output similar to: 800 801 quattro due tre uno 802 tre due quattro uno 803 due uno quattro tre 804 due uno quattro tre 805 806 [1m:Q [22mQuotes every shell meta-character in the variable, so that it can be |
806 passed safely through recursive invocations of [1mbmake[22m. | 807 passed safely to the shell. |
807 | 808 |
809 [1m:q [22mQuotes every shell meta-character in the variable, and also doubles 810 `$' characters so that it can be passed safely through recursive 811 invocations of [1mbmake[22m. This is equivalent to: `:S/\$/&&/g:Q'. 812 |
|
808 [1m:R [22mReplaces each word in the variable with everything but its suffix. 809 810 [1m:range[=count][0m 811 The value is an integer sequence representing the words of the orig- 812 inal value, or the supplied [4mcount[24m. 813 814 [1m:gmtime[=utc][0m 815 The value is a format string for strftime(3), using gmtime(3). If a --- 82 unchanged lines hidden (view full) --- 898 ${"${NUMBERS:M42}" != "":?match:no}. 899 900 [4m:old_string=new_string[0m 901 This is the AT&T System V UNIX style variable substitution. It must 902 be the last modifier specified. If [4mold_string[24m or [4mnew_string[24m do not 903 contain the pattern matching character [4m%[24m then it is assumed that 904 they are anchored at the end of each word, so only suffixes or 905 entire words may be replaced. Otherwise [4m%[24m is the substring of | 813 [1m:R [22mReplaces each word in the variable with everything but its suffix. 814 815 [1m:range[=count][0m 816 The value is an integer sequence representing the words of the orig- 817 inal value, or the supplied [4mcount[24m. 818 819 [1m:gmtime[=utc][0m 820 The value is a format string for strftime(3), using gmtime(3). If a --- 82 unchanged lines hidden (view full) --- 903 ${"${NUMBERS:M42}" != "":?match:no}. 904 905 [4m:old_string=new_string[0m 906 This is the AT&T System V UNIX style variable substitution. It must 907 be the last modifier specified. If [4mold_string[24m or [4mnew_string[24m do not 908 contain the pattern matching character [4m%[24m then it is assumed that 909 they are anchored at the end of each word, so only suffixes or 910 entire words may be replaced. Otherwise [4m%[24m is the substring of |
906 [4mold_string[24m to be replaced in [4mnew_string[24m. | 911 [4mold_string[24m to be replaced in [4mnew_string[24m. If only [4mold_string[24m con- 912 tains the pattern matching character [4m%[24m, and [4mold_string[24m matches, then 913 the result is the [4mnew_string[24m. If only the [4mnew_string[24m contains the 914 pattern matching character [4m%[24m, then it is not treated specially and 915 it is printed as a literal [4m%[24m on match. If there is more than one 916 pattern matching character ([4m%[24m) in either the [4mnew_string[24m or 917 [4mold_string[24m, only the first instance is treated specially (as the 918 pattern character); all subsequent instances are treated as regular 919 characters |
907 908 Variable expansion occurs in the normal fashion inside both 909 [4mold_string[24m and [4mnew_string[24m with the single exception that a backslash 910 is used to prevent the expansion of a dollar sign (`$'), not a pre- 911 ceding dollar sign as is usual. 912 913 [1m:@[4m[22mtemp[24m[1m@[4m[22mstring[24m[1m@[0m 914 This is the loop expansion mechanism from the OSF Development Envi- --- 83 unchanged lines hidden (view full) --- 998 999 [4mindex[24m Selects a single word from the value. 1000 1001 [4mstart[24m[1m..[4m[22mend[0m 1002 Selects all words from [4mstart[24m to [4mend[24m, inclusive. For example, 1003 `[1m:[2..-1][22m' selects all words from the second word to the last 1004 word. If [4mstart[24m is greater than [4mend[24m, then the words are out- 1005 put in reverse order. For example, `[1m:[-1..1][22m' selects all | 920 921 Variable expansion occurs in the normal fashion inside both 922 [4mold_string[24m and [4mnew_string[24m with the single exception that a backslash 923 is used to prevent the expansion of a dollar sign (`$'), not a pre- 924 ceding dollar sign as is usual. 925 926 [1m:@[4m[22mtemp[24m[1m@[4m[22mstring[24m[1m@[0m 927 This is the loop expansion mechanism from the OSF Development Envi- --- 83 unchanged lines hidden (view full) --- 1011 1012 [4mindex[24m Selects a single word from the value. 1013 1014 [4mstart[24m[1m..[4m[22mend[0m 1015 Selects all words from [4mstart[24m to [4mend[24m, inclusive. For example, 1016 `[1m:[2..-1][22m' selects all words from the second word to the last 1017 word. If [4mstart[24m is greater than [4mend[24m, then the words are out- 1018 put in reverse order. For example, `[1m:[-1..1][22m' selects all |
1006 the words from last to first. | 1019 the words from last to first. If the list is already 1020 ordered, then this effectively reverses the list, but it is 1021 more efficient to use `[1m:Or[22m' instead of `[1m:O:[-1..1][22m'. |
1007 1008 [1m* [22mCauses subsequent modifiers to treat the value as a single 1009 word (possibly containing embedded white space). Analogous 1010 to the effect of "$*" in Bourne shell. 1011 1012 0 Means the same as `[1m:[*][22m'. 1013 1014 [1m@ [22mCauses subsequent modifiers to treat the value as a sequence 1015 of words delimited by white space. Analogous to the effect 1016 of "$@" in Bourne shell. 1017 1018 [1m# [22mReturns the number of words in the value. 1019 1020[1mINCLUDE STATEMENTS, CONDITIONALS AND FOR LOOPS[0m 1021 Makefile inclusion, conditional structures and for loops reminiscent of 1022 the C programming language are provided in [1mbmake[22m. All such structures 1023 are identified by a line beginning with a single dot (`.') character. | 1022 1023 [1m* [22mCauses subsequent modifiers to treat the value as a single 1024 word (possibly containing embedded white space). Analogous 1025 to the effect of "$*" in Bourne shell. 1026 1027 0 Means the same as `[1m:[*][22m'. 1028 1029 [1m@ [22mCauses subsequent modifiers to treat the value as a sequence 1030 of words delimited by white space. Analogous to the effect 1031 of "$@" in Bourne shell. 1032 1033 [1m# [22mReturns the number of words in the value. 1034 1035[1mINCLUDE STATEMENTS, CONDITIONALS AND FOR LOOPS[0m 1036 Makefile inclusion, conditional structures and for loops reminiscent of 1037 the C programming language are provided in [1mbmake[22m. All such structures 1038 are identified by a line beginning with a single dot (`.') character. |
1024 Files are included with either [1m.include [22m<[4mfile[24m> or [1m.include [22m"[4mfile[24m". Vari- | 1039 Files are included with either [1m.include <[4m[22mfile[24m[1m> [22mor [1m.include "[4m[22mfile[24m[1m"[22m. Vari- |
1025 ables between the angle brackets or double quotes are expanded to form 1026 the file name. If angle brackets are used, the included makefile is 1027 expected to be in the system makefile directory. If double quotes are 1028 used, the including makefile's directory and any directories specified 1029 using the [1m-I [22moption are searched before the system makefile directory. 1030 For compatibility with other versions of [1mbmake [22m`include file ...' is also 1031 accepted. 1032 --- 146 unchanged lines hidden (view full) --- 1179 is assumed that the expanded variable is being compared against 0 or an 1180 empty string in the case of a string comparison. 1181 1182 When [1mbmake [22mis evaluating one of these conditional expressions, and it 1183 encounters a (white-space separated) word it doesn't recognize, either 1184 the ``make'' or ``defined'' expression is applied to it, depending on the 1185 form of the conditional. If the form is `[1m.ifdef[22m', `[1m.ifndef[22m', or `[1m.if[22m' 1186 the ``defined'' expression is applied. Similarly, if the form is | 1040 ables between the angle brackets or double quotes are expanded to form 1041 the file name. If angle brackets are used, the included makefile is 1042 expected to be in the system makefile directory. If double quotes are 1043 used, the including makefile's directory and any directories specified 1044 using the [1m-I [22moption are searched before the system makefile directory. 1045 For compatibility with other versions of [1mbmake [22m`include file ...' is also 1046 accepted. 1047 --- 146 unchanged lines hidden (view full) --- 1194 is assumed that the expanded variable is being compared against 0 or an 1195 empty string in the case of a string comparison. 1196 1197 When [1mbmake [22mis evaluating one of these conditional expressions, and it 1198 encounters a (white-space separated) word it doesn't recognize, either 1199 the ``make'' or ``defined'' expression is applied to it, depending on the 1200 form of the conditional. If the form is `[1m.ifdef[22m', `[1m.ifndef[22m', or `[1m.if[22m' 1201 the ``defined'' expression is applied. Similarly, if the form is |
1187 `[1m.ifmake[22m' or `[1m.ifnmake[22m, [1mthe[22m' ``make'' expression is applied. | 1202 `[1m.ifmake[22m' or `[1m.ifnmake[22m', the ``make'' expression is applied. |
1188 1189 If the conditional evaluates to true the parsing of the makefile contin- 1190 ues as before. If it evaluates to false, the following lines are 1191 skipped. In both cases this continues until a `[1m.else[22m' or `[1m.endif[22m' is 1192 found. 1193 1194 For loops are typically used to apply a set of rules to a list of files. 1195 The syntax of a for loop is: --- 332 unchanged lines hidden (view full) --- 1528 Berkeley. It was designed to be a parallel distributed make running jobs 1529 on different machines using a daemon called ``customs''. 1530 1531 Historically the target/dependency ``FRC'' has been used to FoRCe 1532 rebuilding (since the target/dependency does not exist... unless someone 1533 creates an ``FRC'' file). 1534 1535[1mBUGS[0m | 1203 1204 If the conditional evaluates to true the parsing of the makefile contin- 1205 ues as before. If it evaluates to false, the following lines are 1206 skipped. In both cases this continues until a `[1m.else[22m' or `[1m.endif[22m' is 1207 found. 1208 1209 For loops are typically used to apply a set of rules to a list of files. 1210 The syntax of a for loop is: --- 332 unchanged lines hidden (view full) --- 1543 Berkeley. It was designed to be a parallel distributed make running jobs 1544 on different machines using a daemon called ``customs''. 1545 1546 Historically the target/dependency ``FRC'' has been used to FoRCe 1547 rebuilding (since the target/dependency does not exist... unless someone 1548 creates an ``FRC'' file). 1549 1550[1mBUGS[0m |
1536 The make syntax is difficult to parse without actually acting of the 1537 data. For instance finding the end of a variable use should involve 1538 scanning each the modifiers using the correct terminator for each field. 1539 In many places make just counts {} and () in order to find the end of a 1540 variable expansion. | 1551 The make syntax is difficult to parse without actually acting on the 1552 data. For instance, finding the end of a variable's use should involve 1553 scanning each of the modifiers, using the correct terminator for each 1554 field. In many places make just counts {} and () in order to find the 1555 end of a variable expansion. |
1541 1542 There is no way of escaping a space character in a filename. 1543 | 1556 1557 There is no way of escaping a space character in a filename. 1558 |
1544FreeBSD 11.1 June 22, 2017 FreeBSD 11.1 | 1559FreeBSD 11.3 June 5, 2020 FreeBSD 11.3 |