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
This commit is contained in:
Simon J. Gerraty 2013-08-27 23:09:34 +00:00
parent b81c4e6563
commit a0f1aa8316
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=254980

View File

@ -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>