From owner-svn-src-all@freebsd.org Thu Nov 5 22:09:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7145FA264D9; Thu, 5 Nov 2015 22:09:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2406114E9; Thu, 5 Nov 2015 22:09:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5M90qr048189; Thu, 5 Nov 2015 22:09:00 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5M90Qd048188; Thu, 5 Nov 2015 22:09:00 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511052209.tA5M90Qd048188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 5 Nov 2015 22:09:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290423 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 22:09:01 -0000 Author: bdrewery Date: Thu Nov 5 22:09:00 2015 New Revision: 290423 URL: https://svnweb.freebsd.org/changeset/base/290423 Log: Allow 'make buildenv' to default to the caller's shell by using SHELL. Also pass BUILDENV=1 into the sub-shell to allow modifying PS1 in .profile such as: if [ -n "${BUILDENV}" ]; then PS1="(buildenv) ${PS1}" fi SHELL defaults to 'sh' in share/mk/sys.mk, but is typically passed down by the shell invoking make as well. Rather than forcing all 'buildenv' users to use plain /bin/sh, let them use their favorite shell. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Discussed with: imp Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Nov 5 22:03:42 2015 (r290422) +++ head/Makefile.inc1 Thu Nov 5 22:09:00 2015 (r290423) @@ -27,7 +27,7 @@ # when NO_ROOT is set. (default: ${DESTDIR}/METALOG) # TARGET="machine" to crossbuild world for a different machine type # TARGET_ARCH= may be required when a TARGET supports multiple endians -# BUILDENV_SHELL= shell to launch for the buildenv target (def:/bin/sh) +# BUILDENV_SHELL= shell to launch for the buildenv target (def:${SHELL}) # WORLD_FLAGS= additional flags to pass to make(1) during buildworld # KERNEL_FLAGS= additional flags to pass to make(1) during buildkernel # SUBDIR_OVERRIDE="list of dirs" to build rather than everything. @@ -145,7 +145,7 @@ CLEANDIR= cleandir LOCAL_TOOL_DIRS?= -BUILDENV_SHELL?=/bin/sh +BUILDENV_SHELL?=${SHELL} SVN?= /usr/local/bin/svn SVNFLAGS?= -r HEAD @@ -783,7 +783,7 @@ buildenvvars: .endif buildenv: @echo Entering world for ${TARGET_ARCH}:${TARGET} - @cd ${.CURDIR} && env ${WMAKEENV} ${BUILDENV_SHELL} || true + @cd ${.CURDIR} && env ${WMAKEENV} BUILDENV=1 ${BUILDENV_SHELL} || true TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild32} toolchain: ${TOOLCHAIN_TGTS}