From b607f7bd4c270c8bef16db46966992528ce25ebc Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Fri, 8 Feb 2013 18:01:04 -0800 Subject: 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 --- core/main.mk | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'core/main.mk') 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) -- cgit v1.1