Mercurial > projects > dstress
comparison Makefile @ 936:daeca9f37d08
adapeted "clean" target to the large number of files
author | thomask |
---|---|
date | Sun, 26 Mar 2006 12:39:49 +0000 |
parents | 534a591a0225 |
children | 38e8bc3a9a50 |
comparison
equal
deleted
inserted
replaced
935:89f09dbb06b6 | 936:daeca9f37d08 |
---|---|
41 FIND := find | 41 FIND := find |
42 endif | 42 endif |
43 | 43 |
44 # executeable: remove zero or more files (e.g.: rm -f a b c) | 44 # executeable: remove zero or more files (e.g.: rm -f a b c) |
45 ifndef RM | 45 ifndef RM |
46 RM := rm -f | 46 RM := rm -f -- |
47 endif | 47 endif |
48 | 48 |
49 # executeable: change to a given dir (e.g. cd some/other/dir) | 49 # executeable: change to a given dir (e.g. cd some/other/dir) |
50 ifndef CD | 50 ifndef CD |
51 CD := cd | 51 CD := cd |
159 chmod +x nocompile.sh | 159 chmod +x nocompile.sh |
160 ./nocompile.sh 2>> $(LOG) | 160 ./nocompile.sh 2>> $(LOG) |
161 | 161 |
162 nocompile_clean : | 162 nocompile_clean : |
163 $(eval z_rm = $(shell find nocompile -type f -name "*\\.o" | grep -v ".svn")) | 163 $(eval z_rm = $(shell find nocompile -type f -name "*\\.o" | grep -v ".svn")) |
164 $(RM) $(z_rm) | |
164 | 165 |
165 # used in some complex test cases | 166 # used in some complex test cases |
166 define analyse_nocompile | 167 define analyse_nocompile |
167 @if $(ifeq__) $(z_return) 0 ; then \ | 168 @if $(ifeq__) $(z_return) 0 ; then \ |
168 $(ECHO) "Torture-Sub-1/31-XPASS: $(z_name)"; $(RM) $@; \ | 169 $(ECHO) "Torture-Sub-1/31-XPASS: $(z_name)"; $(RM) $@; \ |
187 chmod +x compile.sh | 188 chmod +x compile.sh |
188 ./compile.sh 2>> $(LOG) | 189 ./compile.sh 2>> $(LOG) |
189 | 190 |
190 compile_clean : | 191 compile_clean : |
191 $(eval z_rm = $(shell find compile -type f -name "*\\.o" | grep -v ".svn")) | 192 $(eval z_rm = $(shell find compile -type f -name "*\\.o" | grep -v ".svn")) |
193 $(RM) $(z_rm) | |
192 | 194 |
193 # used in some complex test cases | 195 # used in some complex test cases |
194 define analyse_compile | 196 define analyse_compile |
195 @if $(ifeq__) $(z_return) 0 ; then \ | 197 @if $(ifeq__) $(z_return) 0 ; then \ |
196 $(ECHO) "Torture-Sub-1/31-PASS: $(z_name)"; $(TOUCH) $@; \ | 198 $(ECHO) "Torture-Sub-1/31-PASS: $(z_name)"; $(TOUCH) $@; \ |
326 # remove targets and all temp objects | 328 # remove targets and all temp objects |
327 # | 329 # |
328 complex_clean : $(sort $(subst $(complex_todo),clean,$(complex_makefiles))) | 330 complex_clean : $(sort $(subst $(complex_todo),clean,$(complex_makefiles))) |
329 | 331 |
330 clean : complex_clean nocompile_clean compile_clean norun_clean run_clean | 332 clean : complex_clean nocompile_clean compile_clean norun_clean run_clean |
331 $(RM) $(z_rm) $(OBJ_DIR)/?*.* | 333 $(RM) $(OBJ_DIR)/[A-E]*.* |
334 $(RM) $(OBJ_DIR)/[F-J]*.* | |
335 $(RM) $(OBJ_DIR)/[K-O]*.* | |
336 $(RM) $(OBJ_DIR)/[P-T]*.* | |
337 $(RM) $(OBJ_DIR)/[U-Z]*.* | |
338 $(RM) $(OBJ_DIR)/[a-e]*.* | |
339 $(RM) $(OBJ_DIR)/[f-j]*.* | |
340 $(RM) $(OBJ_DIR)/[k-o]*.* | |
341 $(RM) $(OBJ_DIR)/[p-t]*.* | |
342 $(RM) $(OBJ_DIR)/[u-z]*.* | |
343 $(RM) $(OBJ_DIR)/?*.* | |
332 $(RM) run.sh norun.sh compile.sh nocompile.sh | 344 $(RM) run.sh norun.sh compile.sh nocompile.sh |
333 | 345 |
334 # the empty line above has to remain, otherwise some weired problems can arise | 346 # the empty line above has to remain, otherwise some weired problems can arise |