From owner-svn-src-head@FreeBSD.ORG Tue Aug 27 23:09:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 495CC497; Tue, 27 Aug 2013 23:09:35 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 35A102A1D; Tue, 27 Aug 2013 23:09:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RN9ZWL029609; Tue, 27 Aug 2013 23:09:35 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RN9ZJk029606; Tue, 27 Aug 2013 23:09:35 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201308272309.r7RN9ZJk029606@svn.freebsd.org> From: "Simon J. Gerraty" Date: Tue, 27 Aug 2013 23:09:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254980 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 23:09:35 -0000 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