-codebases : $(ALLCODEBASES)
- @echo $(words $(ALLCODEBASES)) codebase OK
-.PHONY: codebases
-
-### extract codebase
-# usage: extract_single_module package
-define extract_single_module
- mkdir -p CODEBASES
- $(if $($($(1).module)-SVNPATH), cd CODEBASES && svn export $($($(1).module)-SVNPATH) $(1), cd CODEBASES && cvs -d $($($(1).module)-CVSROOT) export -r $($($(1).module)-TAG) -d $(1) $($(1).module))
-endef
-
-# usage: extract_multi_module package
-define extract_multi_module
- mkdir -p CODEBASES/$(1) && cd CODEBASES/$(1) && (\
- $(foreach m,$($(1)-MODULES), $(if $($(m)-SVNPATH), svn export $($(m)-SVNPATH) $(m);, cvs -d $($(m)-CVSROOT) export -r $($(m)-TAG) $(m);)))
-endef
-
-CODEBASES/%: package=$(notdir $@)
-CODEBASES/%: multi_module=$(word 2,$($(package)-MODULES))
-CODEBASES/%:
- @(echo -n "XXXXXXXXXXXXXXX -- BEG CODEBASE $(package) : $@ " ; date)
- $(if $(multi_module),\
- $(call extract_multi_module,$(package)),\
- $(call extract_single_module,$(package)))
- @(echo -n "XXXXXXXXXXXXXXX -- END CODEBASE $(package) : $@ " ; date)
+### code extraction
+ALLMODULES:=$(foreach module, $(ALL.modules), MODULES/$(module))
+.SECONDARY: $(ALLMODULES)
+modules: $(ALLMODULES)
+ @echo $(words $(ALLMODULES)) modules OK "(fetched from scm)"
+.PHONY: modules