changeset 936:daeca9f37d08

adapeted "clean" target to the large number of files
author thomask
date Sun, 26 Mar 2006 12:39:49 +0000
parents 89f09dbb06b6
children 47023508cb9e
files Makefile Makefile.parallel
diffstat 2 files changed, 33 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sun Mar 26 12:38:56 2006 +0000
+++ b/Makefile	Sun Mar 26 12:39:49 2006 +0000
@@ -43,7 +43,7 @@
 
 # executeable: remove zero or more files (e.g.: rm -f a b c)
 ifndef RM
-RM	:= rm -f
+RM	:= rm -f --
 endif
 
 # executeable: change to a given dir (e.g. cd some/other/dir)
@@ -161,6 +161,7 @@
 
 nocompile_clean :
 	$(eval z_rm = $(shell find nocompile -type f  -name "*\\.o" | grep -v ".svn"))
+	$(RM) $(z_rm)
 
 # used in some complex test cases
 define analyse_nocompile
@@ -189,6 +190,7 @@
 
 compile_clean :
 	$(eval z_rm = $(shell find compile -type f  -name "*\\.o" | grep -v ".svn"))
+	$(RM) $(z_rm)
 
 # used in some complex test cases
 define analyse_compile
@@ -328,7 +330,17 @@
 complex_clean : $(sort $(subst $(complex_todo),clean,$(complex_makefiles)))
 	
 clean : complex_clean nocompile_clean compile_clean norun_clean run_clean
-	$(RM) $(z_rm) $(OBJ_DIR)/?*.*
+	$(RM) $(OBJ_DIR)/[A-E]*.*
+	$(RM) $(OBJ_DIR)/[F-J]*.*
+	$(RM) $(OBJ_DIR)/[K-O]*.*
+	$(RM) $(OBJ_DIR)/[P-T]*.*
+	$(RM) $(OBJ_DIR)/[U-Z]*.*
+	$(RM) $(OBJ_DIR)/[a-e]*.*
+	$(RM) $(OBJ_DIR)/[f-j]*.*
+	$(RM) $(OBJ_DIR)/[k-o]*.*
+	$(RM) $(OBJ_DIR)/[p-t]*.*
+	$(RM) $(OBJ_DIR)/[u-z]*.*
+	$(RM) $(OBJ_DIR)/?*.*
 	$(RM) run.sh norun.sh compile.sh nocompile.sh
 
 # the empty line above has to remain, otherwise some weired problems can arise
--- a/Makefile.parallel	Sun Mar 26 12:38:56 2006 +0000
+++ b/Makefile.parallel	Sun Mar 26 12:39:49 2006 +0000
@@ -45,7 +45,7 @@
 endif
 
 ifndef RM
-RM := rm -f
+RM := rm -f --
 endif
 
 find := find
@@ -76,7 +76,7 @@
 % : %.c
 	$(CC) $(CFLAGS) $< -o $@
 	
-tools : $(dstress) $(crashRun)
+tools :: $(dstress) $(crashRun)
 
 version :
 	@$(date)
@@ -124,10 +124,21 @@
 #
 #
 clean ::
-	$(RM) -- $(shell $(find) run -name "*exe")
-	$(RM) -- $(shell $(find) norun -name "*exe")
-	$(RM) -- $(shell $(find) compile -name "*exe")
-	$(RM) -- $(shell $(find) nocompile -name "*exe")
-	$(RM) -- obj/?*.*
-	$(RM) -- $(dstress) $(crashRun)
+	$(RM) $(shell $(find) run -name "*exe")
+	$(RM) $(shell $(find) norun -name "*exe")
+	$(RM) $(shell $(find) compile -name "*exe")
+	$(RM) $(shell $(find) nocompile -name "*exe")
+	$(RM) obj/[A-E]*.*
+	$(RM) obj/[F-J]*.*
+	$(RM) obj/[K-O]*.*
+	$(RM) obj/[P-T]*.*
+	$(RM) obj/[U-Z]*.*
+	$(RM) obj/[a-e]*.*
+	$(RM) obj/[f-j]*.*
+	$(RM) obj/[k-o]*.*
+	$(RM) obj/[p-t]*.*
+	$(RM) obj/[u-z]*.*
+	$(RM) obj/?*.*
+	$(RM) run.sh norun.sh compile.sh nocompile.sh
+	$(RM) $(dstress) $(crashRun)