[Midnightbsd-cvs] src [7712] trunk/share/mk/sys.mk: protect bmake specific code here.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu Aug 11 22:54:06 EDT 2016


Revision: 7712
          http://svnweb.midnightbsd.org/src/?rev=7712
Author:   laffer1
Date:     2016-08-11 22:54:06 -0400 (Thu, 11 Aug 2016)
Log Message:
-----------
protect bmake specific code here.

Modified Paths:
--------------
    trunk/share/mk/sys.mk

Modified: trunk/share/mk/sys.mk
===================================================================
--- trunk/share/mk/sys.mk	2016-08-12 02:45:56 UTC (rev 7711)
+++ trunk/share/mk/sys.mk	2016-08-12 02:54:06 UTC (rev 7712)
@@ -367,12 +367,6 @@
 # XXX hint for bsd.port.mk
 OBJFORMAT?=	elf
 
-# Tell bmake to expand -V VAR by default
-.MAKE.EXPAND_VARIABLES= yes
-
-# Tell bmake the makefile preference
-.MAKE.MAKEFILE_PREFERENCE= BSDmakefile makefile Makefile
-
 .if !defined(.PARSEDIR)
 # We are not bmake, which is more aggressive about searching .PATH
 # It is sometime necessary to curb its enthusiasm with .NOPATH
@@ -383,8 +377,27 @@
 # Toggle on warnings
 .WARN: dirsyntax
 .endif
+.endif
 
+.if defined(.PARSEDIR)
+# Tell bmake to expand -V VAR by default
+.MAKE.EXPAND_VARIABLES= yes
+
+# Tell bmake the makefile preference
+.MAKE.MAKEFILE_PREFERENCE= BSDmakefile makefile Makefile
+
+# By default bmake does *not* use set -e
+# when running target scripts, this is a problem for many makefiles here.
+# So define a shell that will do what FreeBSD expects.
+.ifndef WITHOUT_SHELL_ERRCTL
+.SHELL: name=sh \
+ 	quiet="set -" echo="set -v" filter="set -" \
+ 	hasErrCtl=yes check="set -e" ignore="set +e" \
+ 	echoFlag=v errFlag=e \
+ 	path=${__MAKE_SHELL:U/bin/sh}
 .endif
 
+.endif
+
 .include <bsd.compat.mk>
 .include <bsd.cpu.mk>



More information about the Midnightbsd-cvs mailing list