Browse code

- added clean-all and proper-all (like clean and proper but work on all the modules, not only the one currently configured)

Andrei Pelinescu-Onciul authored on 28/06/2008 20:45:10
Showing 3 changed files
... ...
@@ -326,8 +326,10 @@ Clean:
326 326
 make clean   (clean the modules too)
327 327
 make proper  (clean also the dependencies and the config)
328 328
 make distclean (the same as proper)
329
-make mantainer-clean (clean everything, including auto generated files,
330
- tags, *.dbg a.s.o)
329
+make mantainer-clean (clean everything, including make's config, auto 
330
+ generated files, tags, *.dbg a.s.o)
331
+make clean-all (clean all the modules in modules/*)
332
+make proper-all (like make proper but for all the  modules in modules/*)
331 333
 
332 334
 Compile:
333 335
 
... ...
@@ -48,8 +48,8 @@
48 48
 #  2008-06-23  added 2 new targets: README and man (re-generate the README
49 49
 #              or manpages for all the modules) (andrei)
50 50
 #  2008-06-25  make cfg support (use a pre-built cfg.: config.mak) (andrei)
51
-#  2008-06-28  added install-modules-man & error checks for 
52
-#              install-utils & doc (andrei)
51
+#  2008-06-28  added clean-all, proper-all, install-modules-man and error 
52
+#               checks for install-utils & doc (andrei)
53 53
 
54 54
 auto_gen=lex.yy.c cfg.tab.c #lexx, yacc etc
55 55
 auto_gen_others=cfg.tab.h  # auto generated, non-c
... ...
@@ -234,13 +234,13 @@ export extra_defs
234 234
 # - exclude_modules
235 235
 
236 236
 ifneq ($(modules_configured),1) 
237
+modules_all=$(filter-out modules/CVS,$(wildcard modules/*))
237 238
 ifneq ($(group_include),)
238 239
 	modules=$(filter-out $(addprefix modules/, \
239 240
 			$(exclude_modules) $(static_modules)), \
240 241
 			$(addprefix modules/, $(include_modules) ))
241 242
 else	
242 243
 	# Standard, old resultant set
243
-	modules_all=$(filter-out CVS, $(wildcard modules/*))
244 244
 	modules_noinc=$(filter-out $(addprefix modules/, \
245 245
 			$(exclude_modules) $(static_modules)), $(modules_all))
246 246
 	modules=$(filter-out $(modules_noinc), \
... ...
@@ -732,8 +732,19 @@ clean_libs:
732 732
 # cleaning in libs always when cleaning ser
733 733
 clean:	clean_libs
734 734
 
735
+#try to clean everything (including all the modules, even ones that are not
736
+# configured/compiled normally
737
+.PHONY: clean-all
738
+clean-all: modules=$(modules_all)
739
+clean-all: clean
740
+
735 741
 proper realclean distclean: clean_cfg 
736 742
 
743
+.PHONY: proper-all realclean-all distclean-all
744
+proper-all realclean-all distclean-all: modules=$(modules_all)
745
+proper-all realclean-all distclean-all: proper
746
+
747
+
737 748
 .PHONY: clean_cfg
738 749
 clean_cfg:
739 750
 	rm -f config.mak
... ...
@@ -13,7 +13,8 @@
13 13
 #  2008-06-26  initial version (andrei) 
14 14
 #
15 15
 
16
-clean_targets:=	clean proper distclean realclean mantainer-clean clean_libs
16
+clean_targets:=	clean proper distclean realclean mantainer-clean clean_libs \
17
+				clean-all proper-all distclean-all realclean-all
17 18
 doc_targets:=	modules-doc modules-readme README modules-man man \
18 19
 		install-doc install-modules-doc install-man install-ser-man \
19 20
 		install-modules-man