Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Feb 2018 14:04:39 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r328929 - stable/11
Message-ID:  <201802061404.w16E4dPl089448@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802061404.w16E4dPl089448>