Date: Wed, 11 Jan 2012 13:36:20 -0700 From: Ian Lepore <freebsd@damnhippie.dyndns.org> To: freebsd-embedded@freebsd.org Subject: make buildenv tweak Message-ID: <1326314180.2419.100.camel@revolution.hippie.lan>
index | next in thread | raw e-mail
The following little patch enhances 'make buildenv' quite a bit for me.
Once I have a cross-build environment built out that I'm going to be
working in for a while, I hand-copy a statically-linked bash into
chroot/bin/ and export BUILDENV_SHELL=/bin/bash and life is good. Of
course it also works with /bin/csh if that's your favorite.
Index: Makefile.inc1
===================================================================
RCS file: /local/base/FreeBSD-CVS/src/Makefile.inc1,v
retrieving revision 1.721
diff -u -p -r1.721 Makefile.inc1
--- Makefile.inc1 6 Jan 2012 00:34:27 -0000 1.721
+++ Makefile.inc1 11 Jan 2012 20:24:22 -0000
@@ -19,6 +19,7 @@
# list
# 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)
#
# The intended user-driven targets are:
@@ -556,9 +557,10 @@ buildworld_epilogue:
buildenvvars:
@echo ${WMAKEENV:Q}
+BUILDENV_SHELL?=/bin/sh
buildenv:
@echo Entering world for ${TARGET_ARCH}:${TARGET}
- @cd ${.CURDIR} && env ${WMAKEENV} sh || true
+ @cd ${.CURDIR} && env ${WMAKEENV} ${BUILDENV_SHELL} || true
TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild32}
toolchain: ${TOOLCHAIN_TGTS}
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1326314180.2419.100.camel>
