From 84344921ed20f582d6c867fcb292713027a3c6f0 Mon Sep 17 00:00:00 2001 From: luigi Date: Tue, 2 Oct 2001 16:53:50 +0000 Subject: Compile the kernel under ${BUILDDIR} instead of polluting the source tree. Unfortunately the latter cannot be completely readonly, because "config" still depends on the kernel config file being in sys/${ARCH}/conf (it seems to derive other pathnames from that one). --- release/picobsd/build/Makefile.conf | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'release') diff --git a/release/picobsd/build/Makefile.conf b/release/picobsd/build/Makefile.conf index 1a352d3..a358a84 100644 --- a/release/picobsd/build/Makefile.conf +++ b/release/picobsd/build/Makefile.conf @@ -10,11 +10,20 @@ # and CONFIG may indicate an alternate config program SRC?=/usr/src -CONF?=${SRC}/sys/i386/conf CONFIG?=config +# These 3 variables determine where the kernel is built. +# If config were smart enough, we could even place the config +# file in some other place than ${SRC}/sys/i386/conf, but +# at the moment (Oct.2001) this is not possible yet. +CONF=${SRC}/sys/i386/conf +#CONF=${BUILDDIR}/conf # XXX does not work yet CONFFILE=PICOBSD-${name} -COMPILE=${CONF}/../compile/${CONFFILE} + +# We can, however, compile the kernel somewhere else +#COMPILE=${CONF}/../compile/${CONFFILE} +COMPILE=${BUILDDIR}/${CONFFILE} + KERNFILE=${COMPILE}/kernel ${BUILDDIR}/kernel: ${KERNFILE} @@ -28,10 +37,11 @@ do_a_make_in_the_kernel_directory_anyways: (cd ${COMPILE}; make KERNEL=kernel -DNO_MODULES) ${COMPILE}: ${CONF}/${CONFFILE} - (cd ${CONF}; ${CONFIG} ${CONFFILE}; \ + (cd ${CONF}; ${CONFIG} -d ${COMPILE} ${CONFFILE}; \ cd ${COMPILE}; make KERNEL=kernel -DNO_MODULES depend ) ${CONF}/${CONFFILE}: PICOBSD + # -mkdir -p ${CONF} # XXX not needed yet. cp ${.OODATE} ${.TARGET} if [ -f PICOBSD.hints ] ; then cp PICOBSD.hints ${CONF}/PICOBSD.hints ; fi -- cgit v1.1