diff options
author | Ying Wang <wangying@google.com> | 2014-07-08 22:11:06 -0700 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2014-07-08 22:11:06 -0700 |
commit | 3abc2a392664fd08288d39513fc41182af7fefaf (patch) | |
tree | 604670ff0dc915c04ffba46cf5d07891681557cd /core/post_clean.mk | |
parent | 45a45d611fa96307d194bf95b8e48e870495f870 (diff) | |
download | build-3abc2a392664fd08288d39513fc41182af7fefaf.zip build-3abc2a392664fd08288d39513fc41182af7fefaf.tar.gz build-3abc2a392664fd08288d39513fc41182af7fefaf.tar.bz2 |
Copy over aidl info for modules not loaded by the current build
That way we don't lose the record if user is running mm/mmm.
Change-Id: I1e1a8b99b4f659b73f73d89f409a24aa36464066
Diffstat (limited to 'core/post_clean.mk')
-rw-r--r-- | core/post_clean.mk | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/core/post_clean.mk b/core/post_clean.mk index 746ec2f..9f15b6d 100644 --- a/core/post_clean.mk +++ b/core/post_clean.mk @@ -59,12 +59,16 @@ current_all_packages_config := previous_aidl_config := $(TARGET_OUT_COMMON_INTERMEDIATES)/previous_aidl_config.mk current_aidl_config := $(TARGET_OUT_COMMON_INTERMEDIATES)/current_aidl_config.mk -$(shell rm -rf $(current_aidl_config) && mkdir -p $(dir $(current_aidl_config))) +$(shell rm -rf $(current_aidl_config) \ + && mkdir -p $(dir $(current_aidl_config))\ + && touch $(current_aidl_config)) -include $(previous_aidl_config) intermediates_to_clean := +modules_with_aidl_files := $(foreach p, $(ALL_MODULES), \ $(if $(ALL_MODULES.$(p).AIDL_FILES),\ + $(eval modules_with_aidl_files += $(p))\ $(shell echo 'AIDL_FILES.$(p) := $(ALL_MODULES.$(p).AIDL_FILES)' >> $(current_aidl_config)))\ $(if $(filter-out $(ALL_MODULES.$(p).AIDL_FILES),$(AIDL_FILES.$(p))),\ $(eval intermediates_to_clean += $(ALL_MODULES.$(p).INTERMEDIATE_SOURCE_DIR)))) @@ -75,8 +79,17 @@ $(shell rm -rf $(intermediates_to_clean)) intermediates_to_clean := endif +# For modules not loaded by the current build (e.g. you are running mm/mmm), +# we copy the info from the previous bulid. +$(foreach p, $(filter-out $(modules_with_aidl_files),$(MODULES_WITH_AIDL_FILES)),\ + $(shell echo 'AIDL_FILES.$(p) := $(AIDL_FILES.$(p))' >> $(current_aidl_config))) +MODULES_WITH_AIDL_FILES := $(sort $(MODULES_WITH_AIDL_FILES) $(modules_with_aidl_files)) +$(shell echo 'MODULES_WITH_AIDL_FILES := $(MODULES_WITH_AIDL_FILES)' >> $(current_aidl_config)) + # Now current becomes previous. $(shell mv -f $(current_aidl_config) $(previous_aidl_config)) +MODULES_WITH_AIDL_FILES := +modules_with_aidl_files := previous_aidl_config := current_aidl_config := |