diff options
author | Bryan Drewery <bdrewery@FreeBSD.org> | 2015-11-05 22:09:00 +0000 |
---|---|---|
committer | Bryan Drewery <bdrewery@FreeBSD.org> | 2015-11-05 22:09:00 +0000 |
commit | e4fa4fafab1ab864114245261e4e4b54ddbaad82 (patch) | |
tree | 729c6b0cd4742f143e775bc5163439f11343df5c /Makefile.inc1 | |
parent | c973c8b228f3a1b351cd92c55ec0f80d9e65a821 (diff) | |
download | src-e4fa4fafab1ab864114245261e4e4b54ddbaad82.tar.gz src-e4fa4fafab1ab864114245261e4e4b54ddbaad82.zip |
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
Notes
Notes:
svn path=/head/; revision=290423
Diffstat (limited to 'Makefile.inc1')
-rw-r--r-- | Makefile.inc1 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index a83a19253084..3c5ff9320336 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -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} |