[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH 2/2] Buildsystem: make softclean



Buildsystem: make softclean, Objektdateien usw. loeschen, makefiles aber
             beibehalten.

Signed-off-by: Antoine Kaufmann <toni@xxxxxxxxxx>
---
 buildmk.sh |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/buildmk.sh b/buildmk.sh
index 8665913..b9d4194 100644
--- a/buildmk.sh
+++ b/buildmk.sh
@@ -225,11 +225,16 @@ done
 # Code für make clean
 cat <<EOF >> Makefile
 
-clean:
+clean_objs:
 	rm -f *.o *.a *.mod *.ppu link.res ppas.sh `basename \`pwd\``
+
+softclean: clean_objs
+	for file in *; do if [ -f "\$\$file/Makefile" -a \( ! -f "\$\$file/.nobuild" -o -f "\$\$file/.ignorenobuild" \) ]; then \$(MAKE) -sC "\$\$file" softclean; fi done
+
+clean: clean_objs
 	for file in *; do if [ -f "\$\$file/Makefile" -a \( ! -f "\$\$file/.nobuild" -o -f "\$\$file/.ignorenobuild" \) ]; then \$(MAKE) -sC "\$\$file" clean; rm "\$\$file/Makefile"; fi done  
 
-.SILENT: all makefiles subdirs obj clean clean_root updateroot image-floppy image-hd test-qemu test-qemu-hd
+.SILENT: all makefiles subdirs obj clean softclean clean_objs clean_root updateroot image-floppy image-hd test-qemu test-qemu-hd
 EOF
 
 if [ "$LOST_BUILDMK_ROOT" == "`pwd`" ]; then
-- 
1.6.4.4