summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2018-03-01 23:45:44 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2018-03-01 23:45:44 +0000
commit2358deb6549648fd9a27a65544f9944b312426c2 (patch)
tree4f69166b1e9da30c9673caf26585d824fb6facac
parentade1697bee1de85ba84665fc7f1c633c0bfc1faa (diff)
Import bmake-20180222vendor/NetBSD/bmake/20180222
From ChangeLog * VERSION: 20180222 Merge with NetBSD make, pick up o parse.c: avoid calling sysconf for every call to loadfile * VERSION: 20180218 Merge with NetBSD make, pick up o var.c: Var_Set handle NULL value anytime. * VERSION: 20180212 Merge with NetBSD make, pick up o parse.c: do not treat .info as warning with -W * VERSION: 20171207 Merge with NetBSD make, pick up o var.c: Var_Append use Var_Set if var not previously set so that VAR_CMD is handled correctly. Add a suitable unit-test. * VERSION: 20171126 * aclocal.m4: use AC_LINK_IFELSE for AC_C___ATTRIBUTE__ since AC_TRY_COMPILE puts input inside main() which upsets modern compilers. * VERSION: 20171118 Merge with NetBSD make, pick up o var.c: do not append to variable set on command line add unit-test to catch this.
Notes
svn path=/vendor/NetBSD/bmake/dist/; revision=330258 svn path=/vendor/NetBSD/bmake/20180222/; revision=330259; tag=vendor/NetBSD/bmake/20180222
-rw-r--r--ChangeLog41
-rw-r--r--Makefile.config.in2
-rw-r--r--VERSION2
-rw-r--r--aclocal.m413
-rw-r--r--bmake.cat11076
-rwxr-xr-xconfigure34
-rw-r--r--configure.in4
-rw-r--r--job.c8
-rw-r--r--make.h3
-rw-r--r--meta.c4
-rw-r--r--mk/ChangeLog18
-rw-r--r--mk/FILES1
-rw-r--r--mk/auto.obj.mk10
-rw-r--r--mk/dpadd.mk20
-rw-r--r--mk/final.mk6
-rw-r--r--mk/gendirdeps.mk6
-rw-r--r--mk/install-mk4
-rw-r--r--mk/ldorder.mk127
-rw-r--r--mk/lib.mk19
-rw-r--r--mk/own.mk4
-rw-r--r--mk/prog.mk12
-rw-r--r--mk/sys.mk4
-rw-r--r--mk/sys.vars.mk4
-rwxr-xr-xos.sh5
-rw-r--r--parse.c17
-rw-r--r--stresep.c14
-rw-r--r--unit-tests/varcmd.exp2
-rw-r--r--unit-tests/varcmd.mk15
-rw-r--r--var.c17
29 files changed, 870 insertions, 622 deletions
diff --git a/ChangeLog b/ChangeLog
index 36476d8ccdd4..ee8011d7e362 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,44 @@
+2018-02-22 Simon J. Gerraty <sjg@bad.crufty.net>
+
+ * VERSION: 20180222
+ Merge with NetBSD make, pick up
+ o parse.c: avoid calling sysconf for every call to loadfile
+
+2018-02-18 Simon J. Gerraty <sjg@bad.crufty.net>
+
+ * VERSION: 20180218
+ Merge with NetBSD make, pick up
+ o var.c: Var_Set handle NULL value anytime.
+
+2018-02-12 Simon J. Gerraty <sjg@bad.crufty.net>
+
+ * VERSION: 20180212
+ Merge with NetBSD make, pick up
+ o parse.c: do not treat .info as warning with -W
+
+2017-12-07 Simon J. Gerraty <sjg@bad.crufty.net>
+
+ * VERSION: 20171207
+ Merge with NetBSD make, pick up
+ o var.c: Var_Append use Var_Set if var not previously set
+ so that VAR_CMD is handled correctly.
+ Add a suitable unit-test.
+
+2017-11-26 Simon J. Gerraty <sjg@bad.crufty.net>
+
+ * VERSION (_MAKE_VERSION): 20171126
+
+ * aclocal.m4: use AC_LINK_IFELSE for AC_C___ATTRIBUTE__
+ since AC_TRY_COMPILE puts input inside main()
+ which upsets modern compilers.
+
+2017-11-18 Simon J. Gerraty <sjg@bad.crufty.net>
+
+ * VERSION: 20171118
+ Merge with NetBSD make, pick up
+ o var.c: do not append to variable set on command line
+ add unit-test to catch this.
+
2017-10-28 Simon J. Gerraty <sjg@bad.crufty.net>
* VERSION: 20171028
diff --git a/Makefile.config.in b/Makefile.config.in
index 7b417cef2604..323417bc1bcb 100644
--- a/Makefile.config.in
+++ b/Makefile.config.in
@@ -15,7 +15,7 @@ LDFLAGS= @LDFLAGS@
LIBOBJS= @LIBOBJS@
LDADD= @LIBS@
USE_META= @use_meta@
-FILEMON_H= @filemon_h@
+FILEMON_H?= @filemon_h@
BMAKE_PATH_MAX?= @bmake_path_max@
# used if MAXPATHLEN not defined
CPPFLAGS+= -DBMAKE_PATH_MAX=${BMAKE_PATH_MAX}
diff --git a/VERSION b/VERSION
index 5117e28f593c..6550722f3e6a 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
# keep this compatible with sh and make
-_MAKE_VERSION=20171028
+_MAKE_VERSION=20180222
diff --git a/aclocal.m4 b/aclocal.m4
index 2adafba3dac5..d8ba02078ec0 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,5 +1,5 @@
dnl RCSid:
-dnl $Id: aclocal.m4,v 1.5 2003/03/06 21:21:30 sjg Exp $
+dnl $Id: aclocal.m4,v 1.6 2017/11/26 22:39:20 sjg Exp $
dnl
dnl
@@ -55,10 +55,9 @@ dnl
AC_DEFUN(AC_C___ATTRIBUTE__, [
AC_MSG_CHECKING(for __attribute__)
AC_CACHE_VAL(ac_cv___attribute__, [
-AC_TRY_COMPILE([
+AC_LINK_IFELSE([
#include <stdlib.h>
-],
-[
+
static void foo(void) __attribute__ ((noreturn));
static void
@@ -66,6 +65,12 @@ foo(void)
{
exit(1);
}
+
+int
+main(int argc, char **argv)
+{
+ foo();
+}
],
ac_cv___attribute__=yes,
ac_cv___attribute__=no)])
diff --git a/bmake.cat1 b/bmake.cat1
index 1b6294219f00..4f1893db18cc 100644
--- a/bmake.cat1
+++ b/bmake.cat1
@@ -1,73 +1,73 @@
-BMAKE(1) NetBSD General Commands Manual BMAKE(1)
+BMAKE(1) FreeBSD General Commands Manual BMAKE(1)
-NNAAMMEE
- bbmmaakkee -- maintain program dependencies
+NAME
+ bmake -- maintain program dependencies
-SSYYNNOOPPSSIISS
- bbmmaakkee [--BBeeiikkNNnnqqrrssttWWwwXX] [--CC _d_i_r_e_c_t_o_r_y] [--DD _v_a_r_i_a_b_l_e] [--dd _f_l_a_g_s]
- [--ff _m_a_k_e_f_i_l_e] [--II _d_i_r_e_c_t_o_r_y] [--JJ _p_r_i_v_a_t_e] [--jj _m_a_x___j_o_b_s]
- [--mm _d_i_r_e_c_t_o_r_y] [--TT _f_i_l_e] [--VV _v_a_r_i_a_b_l_e] [--vv _v_a_r_i_a_b_l_e]
- [_v_a_r_i_a_b_l_e_=_v_a_l_u_e] [_t_a_r_g_e_t _._._.]
+SYNOPSIS
+ bmake [-BeikNnqrstWwX] [-C directory] [-D variable] [-d flags]
+ [-f makefile] [-I directory] [-J private] [-j max_jobs]
+ [-m directory] [-T file] [-V variable] [-v variable]
+ [variable=value] [target ...]
-DDEESSCCRRIIPPTTIIOONN
- bbmmaakkee is a program designed to simplify the maintenance of other pro-
+DESCRIPTION
+ bmake is a program designed to simplify the maintenance of other pro-
grams. Its input is a list of specifications as to the files upon which
- programs and other files depend. If no --ff _m_a_k_e_f_i_l_e makefile option is
- given, bbmmaakkee will try to open `_m_a_k_e_f_i_l_e' then `_M_a_k_e_f_i_l_e' in order to find
- the specifications. If the file `_._d_e_p_e_n_d' exists, it is read (see
+ programs and other files depend. If no -f makefile makefile option is
+ given, bmake will try to open `makefile' then `Makefile' in order to find
+ the specifications. If the file `.depend' exists, it is read (see
mkdep(1)).
This manual page is intended as a reference document only. For a more
- thorough description of bbmmaakkee and makefiles, please refer to _P_M_a_k_e _- _A
- _T_u_t_o_r_i_a_l.
+ thorough description of bmake and makefiles, please refer to PMake - A
+ Tutorial.
- bbmmaakkee will prepend the contents of the _M_A_K_E_F_L_A_G_S environment variable to
+ bmake will prepend the contents of the MAKEFLAGS environment variable to
the command line arguments before parsing them.
The options are as follows:
- --BB Try to be backwards compatible by executing a single shell per
+ -B Try to be backwards compatible by executing a single shell per
command and by executing the commands to make the sources of a
dependency line in sequence.
- --CC _d_i_r_e_c_t_o_r_y
- Change to _d_i_r_e_c_t_o_r_y before reading the makefiles or doing any-
- thing else. If multiple --CC options are specified, each is inter-
- preted relative to the previous one: --CC _/ --CC _e_t_c is equivalent to
- --CC _/_e_t_c.
+ -C directory
+ Change to directory before reading the makefiles or doing any-
+ thing else. If multiple -C options are specified, each is inter-
+ preted relative to the previous one: -C / -C etc is equivalent to
+ -C /etc.
- --DD _v_a_r_i_a_b_l_e
- Define _v_a_r_i_a_b_l_e to be 1, in the global context.
+ -D variable
+ Define variable to be 1, in the global context.
- --dd _[_-_]_f_l_a_g_s
- Turn on debugging, and specify which portions of bbmmaakkee are to
+ -d [-]flags
+ Turn on debugging, and specify which portions of bmake are to
print debugging information. Unless the flags are preceded by
- `-' they are added to the _M_A_K_E_F_L_A_G_S environment variable and will
+ `-' they are added to the MAKEFLAGS environment variable and will
be processed by any child make processes. By default, debugging
information is printed to standard error, but this can be changed
- using the _F debugging flag. The debugging output is always
+ using the F debugging flag. The debugging output is always
unbuffered; in addition, if debugging is enabled but debugging
output is not directed to standard output, then the standard out-
- put is line buffered. _F_l_a_g_s is one or more of the following:
+ put is line buffered. Flags is one or more of the following:
- _A Print all possible debugging information; equivalent to
+ A Print all possible debugging information; equivalent to
specifying all of the debugging flags.
- _a Print debugging information about archive searching and
+ a Print debugging information about archive searching and
caching.
- _C Print debugging information about current working direc-
+ C Print debugging information about current working direc-
tory.
- _c Print debugging information about conditional evaluation.
+ c Print debugging information about conditional evaluation.
- _d Print debugging information about directory searching and
+ d Print debugging information about directory searching and
caching.
- _e Print debugging information about failed commands and
+ e Print debugging information about failed commands and
targets.
- _F[++]_f_i_l_e_n_a_m_e
+ F[+]filename
Specify where debugging output is written. This must be
the last flag, because it consumes the remainder of the
argument. If the character immediately after the `F'
@@ -80,80 +80,80 @@ DDEESSCCRRIIPPTTIIOONN
named file. If the file name ends `.%d' then the `%d' is
replaced by the pid.
- _f Print debugging information about loop evaluation.
+ f Print debugging information about loop evaluation.
- _g_1 Print the input graph before making anything.
+ g1 Print the input graph before making anything.
- _g_2 Print the input graph after making everything, or before
+ g2 Print the input graph after making everything, or before
exiting on error.
- _g_3 Print the input graph before exiting on error.
+ g3 Print the input graph before exiting on error.
- _j Print debugging information about running multiple
+ j Print debugging information about running multiple
shells.
- _l Print commands in Makefiles regardless of whether or not
+ l Print commands in Makefiles regardless of whether or not
they are prefixed by `@' or other "quiet" flags. Also
known as "loud" behavior.
- _M Print debugging information about "meta" mode decisions
+ M Print debugging information about "meta" mode decisions
about targets.
- _m Print debugging information about making targets, includ-
+ m Print debugging information about making targets, includ-
ing modification dates.
- _n Don't delete the temporary command scripts created when
+ n Don't delete the temporary command scripts created when
running commands. These temporary scripts are created in
the directory referred to by the TMPDIR environment vari-
- able, or in _/_t_m_p if TMPDIR is unset or set to the empty
+ able, or in /tmp if TMPDIR is unset or set to the empty
string. The temporary scripts are created by mkstemp(3),
- and have names of the form _m_a_k_e_X_X_X_X_X_X. _N_O_T_E: This can
- create many files in TMPDIR or _/_t_m_p, so use with care.
+ and have names of the form makeXXXXXX. NOTE: This can
+ create many files in TMPDIR or /tmp, so use with care.
- _p Print debugging information about makefile parsing.
+ p Print debugging information about makefile parsing.
- _s Print debugging information about suffix-transformation
+ s Print debugging information about suffix-transformation
rules.
- _t Print debugging information about target list mainte-
+ t Print debugging information about target list mainte-
nance.
- _V Force the --VV option to print raw values of variables,
+ V Force the -V option to print raw values of variables,
overriding the default behavior set via
- _._M_A_K_E_._E_X_P_A_N_D___V_A_R_I_A_B_L_E_S.
+ .MAKE.EXPAND_VARIABLES.
- _v Print debugging information about variable assignment.
+ v Print debugging information about variable assignment.
- _x Run shell commands with --xx so the actual commands are
+ x Run shell commands with -x so the actual commands are
printed as they are executed.
- --ee Specify that environment variables override macro assignments
+ -e Specify that environment variables override macro assignments
within makefiles.
- --ff _m_a_k_e_f_i_l_e
- Specify a makefile to read instead of the default `_m_a_k_e_f_i_l_e'. If
- _m_a_k_e_f_i_l_e is `--', standard input is read. Multiple makefiles may
+ -f makefile
+ Specify a makefile to read instead of the default `makefile'. If
+ makefile is `-', standard input is read. Multiple makefiles may
be specified, and are read in the order specified.
- --II _d_i_r_e_c_t_o_r_y
+ -I directory
Specify a directory in which to search for makefiles and included
makefiles. The system makefile directory (or directories, see
- the --mm option) is automatically included as part of this list.
+ the -m option) is automatically included as part of this list.
- --ii Ignore non-zero exit of shell commands in the makefile. Equiva-
- lent to specifying `--' before each command line in the makefile.
+ -i Ignore non-zero exit of shell commands in the makefile. Equiva-
+ lent to specifying `-' before each command line in the makefile.
- --JJ _p_r_i_v_a_t_e
- This option should _n_o_t be specified by the user.
+ -J private
+ This option should not be specified by the user.
- When the _j option is in use in a recursive build, this option is
+ When the j option is in use in a recursive build, this option is
passed by a make to child makes to allow all the make processes
in the build to cooperate to avoid overloading the system.
- --jj _m_a_x___j_o_b_s
- Specify the maximum number of jobs that bbmmaakkee may have running at
- any one time. The value is saved in _._M_A_K_E_._J_O_B_S. Turns compati-
- bility mode off, unless the _B flag is also specified. When com-
+ -j max_jobs
+ Specify the maximum number of jobs that bmake may have running at
+ any one time. The value is saved in .MAKE.JOBS. Turns compati-
+ bility mode off, unless the B flag is also specified. When com-
patibility mode is off, all commands associated with a target are
executed in a single shell invocation as opposed to the tradi-
tional one shell invocation per line. This can break traditional
@@ -162,90 +162,90 @@ DDEESSCCRRIIPPTTIIOONN
It is more efficient to correct the scripts rather than turn
backwards compatibility on.
- --kk Continue processing after errors are encountered, but only on
+ -k Continue processing after errors are encountered, but only on
those targets that do not depend on the target whose creation
caused the error.
- --mm _d_i_r_e_c_t_o_r_y
+ -m directory
Specify a directory in which to search for sys.mk and makefiles
- included via the <_f_i_l_e>-style include statement. The --mm option
+ included via the <file>-style include statement. The -m option
can be used multiple times to form a search path. This path will
override the default system include path: /usr/share/mk. Fur-
thermore the system include path will be appended to the search
- path used for "_f_i_l_e"-style include statements (see the --II
+ path used for "file"-style include statements (see the -I
option).
- If a file or directory name in the --mm argument (or the
+ If a file or directory name in the -m argument (or the
MAKESYSPATH environment variable) starts with the string ".../"
- then bbmmaakkee will search for the specified file or directory named
+ then bmake will search for the specified file or directory named
in the remaining part of the argument string. The search starts
with the current directory of the Makefile and then works upward
towards the root of the file system. If the search is success-
ful, then the resulting directory replaces the ".../" specifica-
- tion in the --mm argument. If used, this feature allows bbmmaakkee to
+ tion in the -m argument. If used, this feature allows bmake to
easily search in the current source tree for customized sys.mk
files (e.g., by using ".../mk/sys.mk" as an argument).
- --nn Display the commands that would have been executed, but do not
+ -n Display the commands that would have been executed, but do not
actually execute them unless the target depends on the .MAKE spe-
cial source (see below).
- --NN Display the commands which would have been executed, but do not
+ -N Display the commands which would have been executed, but do not
actually execute any of them; useful for debugging top-level
makefiles without descending into subdirectories.
- --qq Do not execute any commands, but exit 0 if the specified targets
+ -q Do not execute any commands, but exit 0 if the specified targets
are up-to-date and 1, otherwise.
- --rr Do not use the built-in rules specified in the system makefile.
+ -r Do not use the built-in rules specified in the system makefile.
- --ss Do not echo any commands as they are executed. Equivalent to
- specifying `@@' before each command line in the makefile.
+ -s Do not echo any commands as they are executed. Equivalent to
+ specifying `@' before each command line in the makefile.
- --TT _t_r_a_c_e_f_i_l_e
- When used with the --jj flag, append a trace record to _t_r_a_c_e_f_i_l_e
+ -T tracefile
+ When used with the -j flag, append a trace record to tracefile
for each job started and completed.
- --tt Rather than re-building a target as specified in the makefile,
+ -t Rather than re-building a target as specified in the makefile,
create it or update its modification time to make it appear up-
to-date.
- --VV _v_a_r_i_a_b_l_e
- Print the value of _v_a_r_i_a_b_l_e. Do not build any targets. Multiple
+ -V variable
+ Print the value of variable. Do not build any targets. Multiple
instances of this option may be specified; the variables will be
printed one per line, with a blank line for each null or unde-
fined variable. The value printed is extracted from the global
context after all makefiles have been read. By default, the raw
variable contents (which may include additional unexpanded vari-
- able references) are shown. If _v_a_r_i_a_b_l_e contains a `$' then the
+ able references) are shown. If variable contains a `$' then the
value will be recursively expanded to its complete resultant text
before printing. The expanded value will also be printed if
- _._M_A_K_E_._E_X_P_A_N_D___V_A_R_I_A_B_L_E_S is set to true and the --ddVV option has not
+ .MAKE.EXPAND_VARIABLES is set to true and the -dV option has not
been used to override it. Note that loop-local and target-local
variables, as well as values taken temporarily by global vari-
ables during makefile processing, are not accessible via this
- option. The --ddvv debug mode can be used to see these at the cost
+ option. The -dv debug mode can be used to see these at the cost
of generating substantial extraneous output.
- --vv _v_a_r_i_a_b_l_e
- Like --VV but the variable is always expanded to its complete
+ -v variable
+ Like -V but the variable is always expanded to its complete
value.
- --WW Treat any warnings during makefile parsing as errors.
+ -W Treat any warnings during makefile parsing as errors.
- --ww Print entering and leaving directory messages, pre and post pro-
+ -w Print entering and leaving directory messages, pre and post pro-
cessing.
- --XX Don't export variables passed on the command line to the environ-
+ -X Don't export variables passed on the command line to the environ-
ment individually. Variables passed on the command line are
- still exported via the _M_A_K_E_F_L_A_G_S environment variable. This
+ still exported via the MAKEFLAGS environment variable. This
option may be useful on systems which have a small limit on the
size of command arguments.
- _v_a_r_i_a_b_l_e_=_v_a_l_u_e
- Set the value of the variable _v_a_r_i_a_b_l_e to _v_a_l_u_e. Normally, all
+ variable=value
+ Set the value of the variable variable to value. Normally, all
values passed on the command line are also exported to sub-makes
- in the environment. The --XX flag disables this behavior. Vari-
+ in the environment. The -X flag disables this behavior. Vari-
able assignments should follow options for POSIX compatibility
but no ordering is enforced.
@@ -257,28 +257,28 @@ DDEESSCCRRIIPPTTIIOONN
them with a backslash (`\'). The trailing newline character and initial
whitespace on the following line are compressed into a single space.
-FFIILLEE DDEEPPEENNDDEENNCCYY SSPPEECCIIFFIICCAATTIIOONNSS
+FILE DEPENDENCY SPECIFICATIONS
Dependency lines consist of one or more targets, an operator, and zero or
more sources. This creates a relationship where the targets ``depend''
on the sources and are usually created from them. The exact relationship
between the target and the source is determined by the operator that sep-
arates them. The three operators are as follows:
- :: A target is considered out-of-date if its modification time is less
+ : A target is considered out-of-date if its modification time is less
than those of any of its sources. Sources for a target accumulate
over dependency lines when this operator is used. The target is
- removed if bbmmaakkee is interrupted.
+ removed if bmake is interrupted.
- !! Targets are always re-created, but not until all sources have been
+ ! Targets are always re-created, but not until all sources have been
examined and re-created as necessary. Sources for a target accumu-
late over dependency lines when this operator is used. The target
- is removed if bbmmaakkee is interrupted.
+ is removed if bmake is interrupted.
- :::: If no sources are specified, the target is always re-created. Oth-
+ :: If no sources are specified, the target is always re-created. Oth-
erwise, a target is considered out-of-date if any of its sources
has been modified more recently than the target. Sources for a
target do not accumulate over dependency lines when this operator
- is used. The target will not be removed if bbmmaakkee is interrupted.
+ is used. The target will not be removed if bmake is interrupted.
Targets and sources may contain the shell wildcard values `?', `*', `[]',
and `{}'. The values `?', `*', and `[]' may only be used as part of the
@@ -287,37 +287,37 @@ FFIILLEE DDEEPPEENNDDEENNCCYY SSPPEECCIIFFIICCAATTIIOO
existing files. Expansion is in directory order, not alphabetically as
done in the shell.
-SSHHEELLLL CCOOMMMMAANNDDSS
+SHELL COMMANDS
Each target may have associated with it one or more lines of shell com-
mands, normally used to create the target. Each of the lines in this
- script _m_u_s_t be preceded by a tab. (For historical reasons, spaces are
+ script must be preceded by a tab. (For historical reasons, spaces are
not accepted.) While targets can appear in many dependency lines if
desired, by default only one of these rules may be followed by a creation
- script. If the `::::' operator is used, however, all rules may include
+ script. If the `::' operator is used, however, all rules may include
scripts and the scripts are executed in the order found.
Each line is treated as a separate shell command, unless the end of line
is escaped with a backslash (`\') in which case that line and the next
are combined. If the first characters of the command are any combination
- of `@@', `++', or `--', the command is treated specially. A `@@' causes the
- command not to be echoed before it is executed. A `++' causes the command
- to be executed even when --nn is given. This is similar to the effect of
+ of `@', `+', or `-', the command is treated specially. A `@' causes the
+ command not to be echoed before it is executed. A `+' causes the command
+ to be executed even when -n is given. This is similar to the effect of
the .MAKE special source, except that the effect can be limited to a sin-
- gle line of a script. A `--' in compatibility mode causes any non-zero
+ gle line of a script. A `-' in compatibility mode causes any non-zero
exit status of the command line to be ignored.
- When bbmmaakkee is run in jobs mode with --jj _m_a_x___j_o_b_s, the entire script for
+ When bmake is run in jobs mode with -j max_jobs, the entire script for
the target is fed to a single instance of the shell. In compatibility
(non-jobs) mode, each command is run in a separate process. If the com-
mand contains any shell meta characters (`#=|^(){};&<>*?[]:$`\\n') it
- will be passed to the shell; otherwise bbmmaakkee will attempt direct execu-
- tion. If a line starts with `--' and the shell has ErrCtl enabled then
+ will be passed to the shell; otherwise bmake will attempt direct execu-
+ tion. If a line starts with `-' and the shell has ErrCtl enabled then
failure of the command line will be ignored as in compatibility mode.
- Otherwise `--' affects the entire job; the script will stop at the first
+ Otherwise `-' affects the entire job; the script will stop at the first
command line that fails, but the target will not be deemed to have
failed.
- Makefiles should be written so that the mode of bbmmaakkee operation does not
+ Makefiles should be written so that the mode of bmake operation does not
change their behavior. For example, any command which needs to use
``cd'' or ``chdir'' without potentially changing the directory for subse-
quent commands should be put in parentheses so it executes in a subshell.
@@ -334,35 +334,35 @@ SSHHEELLLL CCOOMMMMAANNDDSS
(cd ${.CURDIR} && ${MAKE} $@); \
echo Back in `pwd`
- Since bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R' before executing any targets, each
+ Since bmake will chdir(2) to `.OBJDIR' before executing any targets, each
child process starts with that as its current working directory.
-VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS
+VARIABLE ASSIGNMENTS
Variables in make are much like variables in the shell, and, by tradi-
tion, consist of all upper-case letters.
- VVaarriiaabbllee aassssiiggnnmmeenntt mmooddiiffiieerrss
+ Variable assignment modifiers
The five operators that can be used to assign values to variables are as
follows:
- == Assign the value to the variable. Any previous value is overrid-
+ = Assign the value to the variable. Any previous value is overrid-
den.
- ++== Append the value to the current value of the variable.
+ += Append the value to the current value of the variable.
- ??== Assign the value to the variable if it is not already defined.
+ ?= Assign the value to the variable if it is not already defined.
- ::== Assign with expansion, i.e. expand the value before assigning it
+ := Assign with expansion, i.e. expand the value before assigning it
to the variable. Normally, expansion is not done until the vari-
- able is referenced. _N_O_T_E: References to undefined variables are
- _n_o_t expanded. This can cause problems when variable modifiers
+ able is referenced. NOTE: References to undefined variables are
+ not expanded. This can cause problems when variable modifiers
are used.
- !!== Expand the value and pass it to the shell for execution and
+ != Expand the value and pass it to the shell for execution and
assign the result to the variable. Any newlines in the result
are replaced with spaces.
- Any white-space before the assigned _v_a_l_u_e is removed; if the value is
+ Any white-space before the assigned value is removed; if the value is
being appended, a single space is inserted between the previous contents
of the variable and the appended value.
@@ -412,12 +412,12 @@ VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS
${b} contains ``${j} ${j} ${j}'' which expands to ``3 3 3'' since
after the loop completes ${j} contains ``3''.
- VVaarriiaabbllee ccllaasssseess
+ Variable classes
The four different classes of variables (in order of increasing prece-
dence) are:
Environment variables
- Variables defined as part of bbmmaakkee's environment.
+ Variables defined as part of bmake's environment.
Global variables
Variables defined in the makefile or in included makefiles.
@@ -432,91 +432,91 @@ VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS
target to target. It is not currently possible to define new local vari-
ables. The seven local variables are as follows:
- _._A_L_L_S_R_C The list of all sources for this target; also known as
- `_>'.
+ .ALLSRC The list of all sources for this target; also known as
+ `>'.
- _._A_R_C_H_I_V_E The name of the archive file; also known as `_!'.
+ .ARCHIVE The name of the archive file; also known as `!'.
- _._I_M_P_S_R_C In suffix-transformation rules, the