From 26d185af735befa7513d3641ac2eb14f67bd3f30 Mon Sep 17 00:00:00 2001 From: matusita Date: Sat, 8 Jun 2002 03:15:50 +0000 Subject: Explicitly set TARGET and TARGET_ARCH in a chroot sandbox. In fact, these variable are set as environment variables since we run "make TARGET=xxx TARGET_ARCH=xxx"; TARGET and TARGET_ARCH are declared in the command line arguments. However, if you are not make(1) guy, it is hard to understand that TARGET/TARGET_ARCH are appropriately set in a chroot environment (as environment variables). Now, the only environment variable need to be set explicitly is 'PATH'. If we set PATH in /mk script, we can make pristine sandbox for release build (i.e., "env -i /usr/sbin/chroot ${CHROOT} /mk" will work). Valuable comments about this issue from: ru Tested on (virtually): snapshots.jp.FreeBSD.org MFC after: 2 weeks --- release/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/release/Makefile b/release/Makefile index af3b4ed..ba0eb39 100644 --- a/release/Makefile +++ b/release/Makefile @@ -384,6 +384,12 @@ rerelease release: .if defined(KERNEL_FLAGS) echo "export KERNEL_FLAGS=\"${KERNEL_FLAGS}\"" >> ${CHROOTDIR}/mk .endif +.if defined(TARGET) + echo "export TARGET=\"${TARGET}\"" >> ${CHROOTDIR}/mk +.endif +.if defined(TARGET_ARCH) + echo "export TARGET_ARCH=\"${TARGET_ARCH}\"" >> ${CHROOTDIR}/mk +.endif # Don't remove this, or the build will fall over! echo "export RELEASEDIR=${_R}" >> ${CHROOTDIR}/mk echo "export PATH=$${PATH}:${LOCALDIR}" >> ${CHROOTDIR}/mk -- cgit v1.1