diff options
author | marcel <marcel@FreeBSD.org> | 2012-10-06 20:01:05 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2012-10-06 20:01:05 +0000 |
commit | 52e7fd7c5436658853af57ebcba4109961c9126c (patch) | |
tree | 70de730ba0fbf9e81dd585c1575a057d03a31be8 /tools | |
parent | b84b597f7acedbe94a9dac4963137a33677e7e19 (diff) | |
download | FreeBSD-src-52e7fd7c5436658853af57ebcba4109961c9126c.zip FreeBSD-src-52e7fd7c5436658853af57ebcba4109961c9126c.tar.gz |
Add support for bmake. This includes:
1. Don't do upgrade_checks when using bmake. As long as we have WITH_BMAKE,
there's a bootstrap complication in ths respect. Avoid it. Make the
necessary changes to have upgrade_checks work wth bmake anyway.
2. Remove the use of -E. It's not needed in our build because we use ?= for
the respective variables, which means that we'll take the environment
value (if any) anyway.
3. Properly declare phony targets as phony as bmake is a lot smarter (and
thus agressive) about build avoidance.
4. Make sure CLEANFILES is complete and use it on .NOPATH. bmake is a lot
smarter about build avoidance and should not find files we generate in
the source tree. We should not have files in the repository we want to
generate, but this is an easier way to cross this hurdle.
5. Have behavior under bmake the same as it is under make with respect to
halting when sub-commands fail. Add "set -e" to compound commands so
that bmake is informed when sub-commands fail.
6. Make sure crunchgen uses the same make as the rest of the build. This
is important when the make utility isn't called make (but bmake for
example).
7. While here, add support for using MAKEOBJDIR to set the object tree
location. It's the second alternative bmake looks for when determining
the actual object directory (= .OBJDIR).
Submitted by: Simon Gerraty <sjg@juniper.net>
Submitted by: John Van Horne <jvanhorne@juniper.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/build/make_check/Makefile | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/tools/build/make_check/Makefile b/tools/build/make_check/Makefile index 346b4bb..3a0f6ad 100644 --- a/tools/build/make_check/Makefile +++ b/tools/build/make_check/Makefile @@ -56,8 +56,10 @@ all: @echo "ok 14 shell # Test shell detected no regression." @${SMAKE} shell_1 || ${SMAKE} failure @echo "ok 15 shell_1 # Test shell_1 detected no regression." +.if !defined(.PARSEDIR) @${SMAKE} shell_2 || ${SMAKE} failure @echo "ok 16 shell_2 # Test shell_2 detected no regression." +.endif .if make(C_check) C_check: @@ -92,17 +94,34 @@ lhs_expn: # to determine its value; that was not always the case. .undef notdef notdef: -.if defined(notdef) && ${notdef:U} +.if defined(notdef) && ${notdef:M/} .endif .endif .if make(modifiers) -# See if make(1) supports the C modifier. +.if defined(.PARSEDIR) +# check if bmake can expand plain variables +.MAKE.EXPAND_VARIABLES= yes +x!= ${SMAKE} -V .CURDIR:H modifiers: +.if ${.CURDIR:H} != "$x" + @false +.endif +.else +# See if make(1) supports the C modifier. +modifiers: dollarV @if ${SMAKE} -V .CURDIR:C/.// 2>&1 >/dev/null | \ grep -q "Unknown modifier 'C'"; then \ false; \ fi + +# check that make -V '${VAR}' works +V_expn != V_OK=ok ${SMAKE} -r -f /dev/null -V '$${V_OK}' +dollarV: +.if ${V_expn} == "" + @false +.endif +.endif .endif .if make(arith_expr) |