bmake.cat1 (50d2e745fa6eaec4ff8fc4112b6b86ba2e27ffe3) bmake.cat1 (ef0b253881c9546ff88d3ed8480df7c791b3ddff)
1BMAKE(1) FreeBSD General Commands Manual BMAKE(1)
2
3NAME
4 bmake -- maintain program dependencies
5
6SYNOPSIS
7 bmake [-BeikNnqrstWwX] [-C directory] [-D variable] [-d flags]
8 [-f makefile] [-I directory] [-J private] [-j max_jobs]

--- 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 :Npattern
779 This is identical to `:M', but selects all words which do not match
780 pattern.
781
1BMAKE(1) FreeBSD General Commands Manual BMAKE(1)
2
3NAME
4 bmake -- maintain program dependencies
5
6SYNOPSIS
7 bmake [-BeikNnqrstWwX] [-C directory] [-D variable] [-d flags]
8 [-f makefile] [-I directory] [-J private] [-j max_jobs]

--- 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 :Npattern
779 This is identical to `:M', but selects all words which do not match
780 pattern.
781
782 :O Order every word in variable alphabetically. To sort words in
783 reverse order use the `:O:[-1..1]' combination of modifiers.
782 :O Order every word in variable alphabetically.
784
783
784 :Or Order every word in variable in reverse alphabetical order.
785
785 :Ox Randomize words in variable. The results will be different each
786 time you are referring to the modified variable; use the assignment
787 with expansion (`:=') 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 :Q Quotes every shell meta-character in the variable, so that it can be
786 :Ox Randomize words in variable. The results will be different each
787 time you are referring to the modified variable; use the assignment
788 with expansion (`:=') 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 :Q Quotes every shell meta-character in the variable, so that it can be
806 passed safely through recursive invocations of bmake.
807 passed safely to the shell.
807
808
809 :q Quotes every shell meta-character in the variable, and also doubles
810 `$' characters so that it can be passed safely through recursive
811 invocations of bmake. This is equivalent to: `:S/\$/&&/g:Q'.
812
808 :R Replaces each word in the variable with everything but its suffix.
809
810 :range[=count]
811 The value is an integer sequence representing the words of the orig-
812 inal value, or the supplied count.
813
814 :gmtime[=utc]
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 :old_string=new_string
901 This is the AT&T System V UNIX style variable substitution. It must
902 be the last modifier specified. If old_string or new_string do not
903 contain the pattern matching character % 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 % is the substring of
813 :R Replaces each word in the variable with everything but its suffix.
814
815 :range[=count]
816 The value is an integer sequence representing the words of the orig-
817 inal value, or the supplied count.
818
819 :gmtime[=utc]
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 :old_string=new_string
906 This is the AT&T System V UNIX style variable substitution. It must
907 be the last modifier specified. If old_string or new_string do not
908 contain the pattern matching character % 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 % is the substring of
906 old_string to be replaced in new_string.
911 old_string to be replaced in new_string. If only old_string con-
912 tains the pattern matching character %, and old_string matches, then
913 the result is the new_string. If only the new_string contains the
914 pattern matching character %, then it is not treated specially and
915 it is printed as a literal % on match. If there is more than one
916 pattern matching character (%) in either the new_string or
917 old_string, 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 old_string and new_string 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 :@temp@string@
914 This is the loop expansion mechanism from the OSF Development Envi-

--- 83 unchanged lines hidden (view full) ---

998
999 index Selects a single word from the value.
1000
1001 start..end
1002 Selects all words from start to end, inclusive. For example,
1003 `:[2..-1]' selects all words from the second word to the last
1004 word. If start is greater than end, then the words are out-
1005 put in reverse order. For example, `:[-1..1]' selects all
920
921 Variable expansion occurs in the normal fashion inside both
922 old_string and new_string 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 :@temp@string@
927 This is the loop expansion mechanism from the OSF Development Envi-

--- 83 unchanged lines hidden (view full) ---

1011
1012 index Selects a single word from the value.
1013
1014 start..end
1015 Selects all words from start to end, inclusive. For example,
1016 `:[2..-1]' selects all words from the second word to the last
1017 word. If start is greater than end, then the words are out-
1018 put in reverse order. For example, `:[-1..1]' 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 `:Or' instead of `:O:[-1..1]'.
1007
1008 * Causes 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 `:[*]'.
1013
1014 @ Causes 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 # Returns the number of words in the value.
1019
1020INCLUDE STATEMENTS, CONDITIONALS AND FOR LOOPS
1021 Makefile inclusion, conditional structures and for loops reminiscent of
1022 the C programming language are provided in bmake. All such structures
1023 are identified by a line beginning with a single dot (`.') character.
1022
1023 * Causes 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 `:[*]'.
1028
1029 @ Causes 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 # Returns the number of words in the value.
1034
1035INCLUDE STATEMENTS, CONDITIONALS AND FOR LOOPS
1036 Makefile inclusion, conditional structures and for loops reminiscent of
1037 the C programming language are provided in bmake. All such structures
1038 are identified by a line beginning with a single dot (`.') character.
1024 Files are included with either .include <file> or .include "file". Vari-
1039 Files are included with either .include <file> or .include "file". 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 -I option are searched before the system makefile directory.
1030 For compatibility with other versions of bmake `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 bmake is 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 `.ifdef', `.ifndef', or `.if'
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 -I option are searched before the system makefile directory.
1045 For compatibility with other versions of bmake `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 bmake is 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 `.ifdef', `.ifndef', or `.if'
1201 the ``defined'' expression is applied. Similarly, if the form is
1187 `.ifmake' or `.ifnmake, the' ``make'' expression is applied.
1202 `.ifmake' or `.ifnmake', 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 `.else' or `.endif' 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
1535BUGS
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 `.else' or `.endif' 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
1550BUGS
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