Author: kevans
Date: Tue Feb  6 14:04:39 2018
New Revision: 328929
URL: https://svnweb.freebsd.org/changeset/base/328929

Log:
  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.

Modified:
  stable/11/Makefile.inc1
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/Makefile.inc1
==============================================================================
--- stable/11/Makefile.inc1     Tue Feb  6 12:22:42 2018        (r328928)
+++ stable/11/Makefile.inc1     Tue Feb  6 14:04:39 2018        (r328929)
@@ -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
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to