diff options
author | matusita <matusita@FreeBSD.org> | 2002-06-08 03:15:50 +0000 |
---|---|---|
committer | matusita <matusita@FreeBSD.org> | 2002-06-08 03:15:50 +0000 |
commit | 26d185af735befa7513d3641ac2eb14f67bd3f30 (patch) | |
tree | e9f3fc998556c390b0b1979739478593fd96a434 /release/Makefile | |
parent | 41b2a6dd7e2d9b13e64e478dac3ab62cc84aee86 (diff) | |
download | FreeBSD-src-26d185af735befa7513d3641ac2eb14f67bd3f30.zip FreeBSD-src-26d185af735befa7513d3641ac2eb14f67bd3f30.tar.gz |
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
Diffstat (limited to 'release/Makefile')
-rw-r--r-- | release/Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
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 |