瀏覽代碼

- 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 17 年之前
父節點
當前提交
299781b1c1
共有 3 個文件被更改,包括 20 次插入6 次删除
  1. 4 2
      INSTALL
  2. 14 3
      Makefile
  3. 2 1
      Makefile.targets

+ 4 - 2
INSTALL

@@ -326,8 +326,10 @@ Clean:
 make clean   (clean the modules too)
 make clean   (clean the modules too)
 make proper  (clean also the dependencies and the config)
 make proper  (clean also the dependencies and the config)
 make distclean (the same as proper)
 make distclean (the same as proper)
-make mantainer-clean (clean everything, including auto generated files,
- tags, *.dbg a.s.o)
+make mantainer-clean (clean everything, including make's config, auto 
+ generated files, tags, *.dbg a.s.o)
+make clean-all (clean all the modules in modules/*)
+make proper-all (like make proper but for all the  modules in modules/*)
 
 
 Compile:
 Compile:
 
 

+ 14 - 3
Makefile

@@ -48,8 +48,8 @@
 #  2008-06-23  added 2 new targets: README and man (re-generate the README
 #  2008-06-23  added 2 new targets: README and man (re-generate the README
 #              or manpages for all the modules) (andrei)
 #              or manpages for all the modules) (andrei)
 #  2008-06-25  make cfg support (use a pre-built cfg.: config.mak) (andrei)
 #  2008-06-25  make cfg support (use a pre-built cfg.: config.mak) (andrei)
-#  2008-06-28  added install-modules-man & error checks for 
-#              install-utils & doc (andrei)
+#  2008-06-28  added clean-all, proper-all, install-modules-man and error 
+#               checks for install-utils & doc (andrei)
 
 
 auto_gen=lex.yy.c cfg.tab.c #lexx, yacc etc
 auto_gen=lex.yy.c cfg.tab.c #lexx, yacc etc
 auto_gen_others=cfg.tab.h  # auto generated, non-c
 auto_gen_others=cfg.tab.h  # auto generated, non-c
@@ -234,13 +234,13 @@ export extra_defs
 # - exclude_modules
 # - exclude_modules
 
 
 ifneq ($(modules_configured),1) 
 ifneq ($(modules_configured),1) 
+modules_all=$(filter-out modules/CVS,$(wildcard modules/*))
 ifneq ($(group_include),)
 ifneq ($(group_include),)
 	modules=$(filter-out $(addprefix modules/, \
 	modules=$(filter-out $(addprefix modules/, \
 			$(exclude_modules) $(static_modules)), \
 			$(exclude_modules) $(static_modules)), \
 			$(addprefix modules/, $(include_modules) ))
 			$(addprefix modules/, $(include_modules) ))
 else	
 else	
 	# Standard, old resultant set
 	# Standard, old resultant set
-	modules_all=$(filter-out CVS, $(wildcard modules/*))
 	modules_noinc=$(filter-out $(addprefix modules/, \
 	modules_noinc=$(filter-out $(addprefix modules/, \
 			$(exclude_modules) $(static_modules)), $(modules_all))
 			$(exclude_modules) $(static_modules)), $(modules_all))
 	modules=$(filter-out $(modules_noinc), \
 	modules=$(filter-out $(modules_noinc), \
@@ -732,8 +732,19 @@ clean_libs:
 # cleaning in libs always when cleaning ser
 # cleaning in libs always when cleaning ser
 clean:	clean_libs
 clean:	clean_libs
 
 
+#try to clean everything (including all the modules, even ones that are not
+# configured/compiled normally
+.PHONY: clean-all
+clean-all: modules=$(modules_all)
+clean-all: clean
+
 proper realclean distclean: clean_cfg 
 proper realclean distclean: clean_cfg 
 
 
+.PHONY: proper-all realclean-all distclean-all
+proper-all realclean-all distclean-all: modules=$(modules_all)
+proper-all realclean-all distclean-all: proper
+
+
 .PHONY: clean_cfg
 .PHONY: clean_cfg
 clean_cfg:
 clean_cfg:
 	rm -f config.mak
 	rm -f config.mak

+ 2 - 1
Makefile.targets

@@ -13,7 +13,8 @@
 #  2008-06-26  initial version (andrei) 
 #  2008-06-26  initial version (andrei) 
 #
 #
 
 
-clean_targets:=	clean proper distclean realclean mantainer-clean clean_libs
+clean_targets:=	clean proper distclean realclean mantainer-clean clean_libs \
+				clean-all proper-all distclean-all realclean-all
 doc_targets:=	modules-doc modules-readme README modules-man man \
 doc_targets:=	modules-doc modules-readme README modules-man man \
 		install-doc install-modules-doc install-man install-ser-man \
 		install-doc install-modules-doc install-man install-ser-man \
 		install-modules-man
 		install-modules-man