Date: Tue, 27 Aug 2013 23:09:35 +0000 (UTC) From: "Simon J. Gerraty" <sjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254980 - head/share/mk Message-ID: <201308272309.r7RN9ZJk029606@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sjg Date: Tue Aug 27 23:09:34 2013 New Revision: 254980 URL: http://svnweb.freebsd.org/changeset/base/254980 Log: Use .SHELL to tell bmake to use 'set -e' when running scripts since most FreeBSD makefiles it is in effect. Move the other bmake compatability knobs out of the POSIX block. Reviewed by: obrien Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Tue Aug 27 23:02:20 2013 (r254979) +++ head/share/mk/sys.mk Tue Aug 27 23:09:34 2013 (r254980) @@ -332,12 +332,6 @@ SHELL= ${__MAKE_SHELL} .SHELL: path=${__MAKE_SHELL} .endif -# 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 @@ -351,4 +345,24 @@ SHELL= ${__MAKE_SHELL} .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.cpu.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308272309.r7RN9ZJk029606>