diff options
author | kevans <kevans@FreeBSD.org> | 2018-02-06 14:04:39 +0000 |
---|---|---|
committer | kevans <kevans@FreeBSD.org> | 2018-02-06 14:04:39 +0000 |
commit | 8748e0f6883f63d0ca33f52aed7505b615983f96 (patch) | |
tree | afb85e68616d333c90fd3d31d99e6a9a3550ddce | |
parent | 2d2f45b04c5995edbbc9c01db53a7d8c2e2cfec4 (diff) | |
download | FreeBSD-src-8748e0f6883f63d0ca33f52aed7505b615983f96.zip FreeBSD-src-8748e0f6883f63d0ca33f52aed7505b615983f96.tar.gz |
MFC r325116,r325515: Stop masking errors during buildenv
MFC r325116(imp): Return proper status from buildenv.
make buildenv BUILDENV_SHELL=<some command> more useful. Remove '||
true' from the command line so that errors are properly
returned. There appears to be no reason for it, and it dates back to
the original commit by ru@.
MFC r325515 (imp): Note interactive shell errors for make buildenv and add a
warning for people tempted to add back the || true to get rid of them.
-rw-r--r-- | Makefile.inc1 | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index f1970a6..0aa8658 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -853,13 +853,20 @@ buildenvvars: .PHONY .endif .endif BUILDENV_DIR?= ${.CURDIR} +# +# Note: make will report any errors the shell reports. This can +# be odd if the last command in an interactive shell generates an +# error or is terminated by SIGINT. These reported errors look bad, +# but are harmless. Allowing them also allows BUIDLENV_SHELL to +# be a complex command whose status will be returned to the caller. +# Some scripts in tools rely on this behavior to report build errors. +# buildenv: .PHONY @echo Entering world for ${TARGET_ARCH}:${TARGET} .if ${BUILDENV_SHELL:M*zsh*} @echo For ZSH you must run: export CPUTYPE=${TARGET_CPUTYPE} .endif - @cd ${BUILDENV_DIR} && env ${WMAKEENV} BUILDENV=1 ${BUILDENV_SHELL} \ - || true + @cd ${BUILDENV_DIR} && env ${WMAKEENV} BUILDENV=1 ${BUILDENV_SHELL} TOOLCHAIN_TGTS= ${WMAKE_TGTS:Neverything:Nbuild${libcompat}} toolchain: ${TOOLCHAIN_TGTS} .PHONY |