From 356c43e7d53fe6d703d4ef81308dca5145918523 Mon Sep 17 00:00:00 2001 From: joe Date: Sat, 23 Dec 2000 16:53:35 +0000 Subject: [PATCH] Determine the names of the picobsd releases automatically. Use the 'realclean' target in the crunch.mk file for cleaning the object build tree. --- release/picobsd/build/Makefile.crunch | 12 ++++-------- release/picobsd/build/clean | 24 ++++++++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/release/picobsd/build/Makefile.crunch b/release/picobsd/build/Makefile.crunch index 0879ef685e85..bd9994833a2e 100644 --- a/release/picobsd/build/Makefile.crunch +++ b/release/picobsd/build/Makefile.crunch @@ -17,14 +17,10 @@ crunch: clean: - rm -f *.o *.stub *.lo *_stub.c *.mk \ - crunch.cache \ - crunch.mk \ - crunch.c \ - crunch1* \ - crunch \ - .tmp_* \ - *.gz + if [ -f crunch1.mk ]; then \ + make -f crunch1.mk realclean ; \ + fi ; + rm -f crunch1* install: cp crunch1 ${MFS_MOUNTPOINT}/stand/crunch diff --git a/release/picobsd/build/clean b/release/picobsd/build/clean index 371ee6428b6f..1947d71164aa 100755 --- a/release/picobsd/build/clean +++ b/release/picobsd/build/clean @@ -5,9 +5,17 @@ # set -e -TARGETS="dial net isp router bridge" +# Get a list of targets. +TARGETS="" +for i in ../* ; do + if [ -d $i -a -f $i/PICOBSD ] ; then + TARGETS="$TARGETS `basename $i`" + fi +done + if [ $# -lt 1 ]; then - echo "What to clean? Possible targets are ${TARGETS} or 'all'" + echo "What to clean?" + echo "Possible targets are:${TARGETS} or 'all'" exit 1 fi @@ -27,16 +35,12 @@ rm -f kernel kernel.gz fs.PICOBSD *.o *core *.db \ cd .. rm -rf help/tmp_hlp echo "===================== $0 tools started ====================" -for i in `ls -d tinyware/[a-z]*` ; do - (cd ${i}; \ - if [ -f Makefile ]; then \ - make clean && make cleandepend;\ - fi) -done for j in $list ; do echo "===================== $0 $j started ======================" (cd ${j}/crunch1; \ - make -f ../../build/Makefile.crunch clean ; \ - ) + if [ -f crunch1.mk ]; then \ + make -f crunch1.mk realclean ; \ + fi ; \ + make -f ../../build/Makefile.crunch clean) echo "=============== $0 $j completed successfuly ==============" done