diff options
author | luigi <luigi@FreeBSD.org> | 2001-06-21 08:49:46 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2001-06-21 08:49:46 +0000 |
commit | d0e44d05152d0b5324dbe315d646e3fd020d00eb (patch) | |
tree | 0ce981552baf5605f88497dc06167a9b03433de0 /release/picobsd/build/Makefile.conf | |
parent | eaafbef7b8981b37477c444f9653513886a2e97b (diff) | |
download | FreeBSD-src-d0e44d05152d0b5324dbe315d646e3fd020d00eb.zip FreeBSD-src-d0e44d05152d0b5324dbe315d646e3fd020d00eb.tar.gz |
Move handling of crunch* files into Makefile.conf, which is a
better place to handle dependencies.
Make another step at helping cross-compiling: when the user specifies
an alternate source tree, the script takes care of creating include
files and libraries for the new tree.
Furthermore, build and use a version of the "config" program which
matches the new sources.
It takes a long time to create libraries, and it might even not do
the right thing at once, there might be some dependencies that i
have forgotten. At any rate, with this code i have been able to
build a working picobsd image using -CURRENT sources on -STABLE
MFC after: 3 days
Diffstat (limited to 'release/picobsd/build/Makefile.conf')
-rw-r--r-- | release/picobsd/build/Makefile.conf | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/release/picobsd/build/Makefile.conf b/release/picobsd/build/Makefile.conf index 231487a..dad3964 100644 --- a/release/picobsd/build/Makefile.conf +++ b/release/picobsd/build/Makefile.conf @@ -1,24 +1,41 @@ # $FreeBSD$ # -# Makefile for building PICOBSD kernels +# Makefile for building PICOBSD kernels and running crunchgen +# +# Needs SRC pointing to the source tree, +# MY_TREE ponting to my tree +# BUILDDIR pointing to the build directory +# PICO_OBJ pointing to the object directory +# When building a kernel, also need ${name} from the environment +# and CONFIG may indicate an alternate config program SRC?=/usr/src -CONF?=$(SRC)/sys/i386/conf +CONF?=${SRC}/sys/i386/conf +CONFIG?=config CONFFILE=PICOBSD-${name} -COMPILE=$(SRC)/sys/compile/$(CONFFILE) -KERNFILE=$(COMPILE)/kernel +COMPILE=${SRC}/sys/compile/${CONFFILE} +KERNFILE=${COMPILE}/kernel -$(KERNFILE): ${COMPILE} do_a_make_in_the_kernel_directory_anyways +${KERNFILE}: ${COMPILE} do_a_make_in_the_kernel_directory_anyways 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} ${CONFFILE}; \ cd ${COMPILE}; make KERNEL=kernel -DNO_MODULES depend ) -$(CONF)/${CONFFILE}: PICOBSD - cp PICOBSD $(CONF)/${CONFFILE} +${CONF}/${CONFFILE}: PICOBSD + cp ${.OODATE} ${.TARGET} + if [ -f PICOBSD.hints ] ; then cp PICOBSD.hints ${CONF}/PICOBSD.hints ; fi + +# This part creates crunch1.conf and crunch.mk from crunch.conf +${BUILDDIR}/crunch.mk: ${BUILDDIR}/crunch1.conf + -(cd ${BUILDDIR}/crunch ; \ + crunchgen -p ${PICO_OBJ} -m ${.TARGET} ${.OODATE} ) +${BUILDDIR}/crunch1.conf: ${MY_TREE}/crunch.conf + (cd ${BUILDDIR}/crunch ; cat ${.OODATE} | \ + sed -e "s@/usr/src@${SRC}@" -e "s@CWD@${MY_TREE}@" > ${.TARGET} ) |