summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authornbm <nbm@FreeBSD.org>2000-07-18 13:43:38 +0000
committernbm <nbm@FreeBSD.org>2000-07-18 13:43:38 +0000
commitf270eba83cb0fa8a71f86e3dc629337bce525c9e (patch)
tree5257ea1275b3f7e2c8c6bd962f608218e155134d /release
parent6dc2b8f562a99f8dc9c76dd6faa054d42f309451 (diff)
downloadFreeBSD-src-f270eba83cb0fa8a71f86e3dc629337bce525c9e.zip
FreeBSD-src-f270eba83cb0fa8a71f86e3dc629337bce525c9e.tar.gz
Make a separate build directory in which to put all the generated
objects, to simplify working with PicoBSD. Add the ability to put make instructions in crunch.inc to pass to the build process. Now explicitly make the objects in our own object tree, since we want to build the objects with our own defines, and allow this to occur in a common object tree for all PicoBSD builds, if required. This is controlled by the COMM_OBJ variable, for those who don't want this - setting it to /usr/obj again will just pick up the objects from your last make buildworld, as before.
Diffstat (limited to 'release')
-rw-r--r--release/picobsd/custom/crunch1/Makefile24
-rw-r--r--release/picobsd/custom/crunch1/crunch.conf2
2 files changed, 20 insertions, 6 deletions
diff --git a/release/picobsd/custom/crunch1/Makefile b/release/picobsd/custom/crunch1/Makefile
index c0609d9..8b45327 100644
--- a/release/picobsd/custom/crunch1/Makefile
+++ b/release/picobsd/custom/crunch1/Makefile
@@ -3,15 +3,29 @@
#
SRC?=/usr/src
+COMMOBJ?= ${.OBJDIR}/../../common-obj
+
all: crunch
-crunch:
- @cat crunch.conf|sed -e "s@/usr/src@${SRC}@" >crunch1.conf
- @crunchgen ./crunch1.conf
- @${MAKE} -f crunch1.mk -DNOPAM all \
+crunch1.conf: crunch.conf
+ @cat ${.ALLSRC} | sed -e "s@/usr/src@${SRC}@" > ${.TARGET}
+
+crunch.mk: crunch1.conf crunch.inc
+ @crunchgen -h ${.CURDIR}/crunch.inc -m crunch.mk crunch1.conf
+
+crunch1.mk: crunch.mk
+ @sed -e "s@make depend@make obj \&\& make depend@" \
+ -e "s/@/usr/obj/@${COMMOBJ}@" crunch.mk > ${.TARGET}
+
+crunch: crunch1.mk
+ @if [! -d build ]; then mkdir build; fi
+ @cp crunch1.c build/
+ @(cd build && env MAKEOBJDIRPREFIX=${COMMOBJ} \
+ ${MAKE} -f ../crunch1.mk -DNOPAM all \
"CFLAGS=${CFLAGS} -DRELEASE_CRUNCH -DCRUNCHED_BINARY -DNOSECURE -DNOCRYPT" #2>&1 >/dev/null
clean:
+ rm -rf build
rm -f *.o *.stub *.lo *_stub.c *.mk \
crunch.cache \
crunch.mk \
@@ -24,7 +38,7 @@ clean:
install:
rm -f ${MFS_MOUNTPOINT}/sbin/*
- cp crunch1 ${MFS_MOUNTPOINT}/sbin/crunch
+ cp build/crunch1 ${MFS_MOUNTPOINT}/sbin/crunch
chmod 555 ${MFS_MOUNTPOINT}/sbin/crunch
for i in `crunchgen -l crunch1.conf` ; \
do \
diff --git a/release/picobsd/custom/crunch1/crunch.conf b/release/picobsd/custom/crunch1/crunch.conf
index 6fa52f4..cf78962 100644
--- a/release/picobsd/custom/crunch1/crunch.conf
+++ b/release/picobsd/custom/crunch1/crunch.conf
@@ -13,7 +13,7 @@ srcdirs /usr/src/usr.bin
srcdirs /usr/src/gnu/usr.bin
srcdirs /usr/src/usr.sbin
# sources for ns & vm
-srcdirs ../../tinyware
+srcdirs /usr/src/release/picobsd/tinyware
progs sh test ln login getty stty
progs w msg kget reboot
OpenPOWER on IntegriCloud