diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2015-11-05 22:09:00 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2015-11-05 22:09:00 +0000 |
commit | f85ce54a015b0eb2e4b4be6460d30ab9fc356030 (patch) | |
tree | 729c6b0cd4742f143e775bc5163439f11343df5c /Makefile.inc1 | |
parent | c369925ae6daac7ea494e356603f170667c72775 (diff) | |
download | FreeBSD-src-f85ce54a015b0eb2e4b4be6460d30ab9fc356030.zip FreeBSD-src-f85ce54a015b0eb2e4b4be6460d30ab9fc356030.tar.gz |
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
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 a83a192..3c5ff93 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} |