summaryrefslogtreecommitdiffstats
path: root/core/main.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2013-02-08 18:01:04 -0800
committerYing Wang <wangying@google.com>2013-02-08 18:13:15 -0800
commitb607f7bd4c270c8bef16db46966992528ce25ebc (patch)
tree85b24208072f2485127d726f17f1362a5f97f2db /core/main.mk
parent6c506a8716fa495c0611beaa5ad0acee15689d04 (diff)
downloadbuild-b607f7bd4c270c8bef16db46966992528ce25ebc.zip
build-b607f7bd4c270c8bef16db46966992528ce25ebc.tar.gz
build-b607f7bd4c270c8bef16db46966992528ce25ebc.tar.bz2
mma and mmma
augmented mm/mmm: Their usages are the same as mm/mmm. They build not only all modules in given path(s), but also their dependencies. With them, to run mm/mmm you don't need to run a full build first now: Just run mma/mmma first. Note that mma/mmma need to load all the makefiles in the source tree so they are much slower than mm/mmm. You should run mma/mmma the first time, and then mm/mmm for incremental build. Bug: 8163814 Change-Id: I554a97c0a23343b65c50870406225eb0064e0651
Diffstat (limited to 'core/main.mk')
-rw-r--r--core/main.mk19
1 files changed, 14 insertions, 5 deletions
diff --git a/core/main.mk b/core/main.mk
index 9b4d478..b401ed2 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -725,6 +725,20 @@ cacheimage: $(INSTALLED_CACHEIMAGE_TARGET)
.PHONY: bootimage
bootimage: $(INSTALLED_BOOTIMAGE_TARGET)
+# phony target that include any targets in $(ALL_MODULES)
+.PHONY: all_modules
+ifndef BUILD_MODULES_IN_PATHS
+all_modules: $(ALL_MODULES)
+else
+# BUILD_MODULES_IN_PATHS is a list of paths relative to the top of the tree
+module_path_patterns := $(foreach p, $(BUILD_MODULES_IN_PATHS),\
+ $(if $(filter %/,$(p)),$(p)%,$(p)/%))
+my_all_modules := $(sort $(foreach m, $(ALL_MODULES),$(if $(filter\
+ $(module_path_patterns), $(addsuffix /,$(ALL_MODULES.$(m).PATH))),$(m))))
+all_modules: $(my_all_modules)
+endif
+
+
# Build files and then package it into the rom formats
.PHONY: droidcore
droidcore: files \
@@ -801,13 +815,8 @@ droid: droidcore dist_files
endif # TARGET_BUILD_APPS
endif # droid in $(MAKECMDGOALS)
-
.PHONY: droid
-# phony target that include any targets in $(ALL_MODULES)
-.PHONY: all_modules
-all_modules: $(ALL_MODULES)
-
.PHONY: docs
docs: $(ALL_DOCS)