From owner-freebsd-embedded@FreeBSD.ORG Wed Jan 11 20:49:34 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F720106566B for ; Wed, 11 Jan 2012 20:49:34 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta06.emeryville.ca.mail.comcast.net (qmta06.emeryville.ca.mail.comcast.net [76.96.30.56]) by mx1.freebsd.org (Postfix) with ESMTP id 581418FC08 for ; Wed, 11 Jan 2012 20:49:34 +0000 (UTC) Received: from omta06.emeryville.ca.mail.comcast.net ([76.96.30.51]) by qmta06.emeryville.ca.mail.comcast.net with comcast id LLNB1i00616AWCUA6LcQeA; Wed, 11 Jan 2012 20:36:24 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta06.emeryville.ca.mail.comcast.net with comcast id LLcN1i01H4NgCEG8SLcPGJ; Wed, 11 Jan 2012 20:36:23 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q0BKaKns027790 for ; Wed, 11 Jan 2012 13:36:20 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: freebsd-embedded@freebsd.org Content-Type: text/plain Date: Wed, 11 Jan 2012 13:36:20 -0700 Message-Id: <1326314180.2419.100.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.26.0 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Subject: make buildenv tweak X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2012 20:49:34 -0000 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}