diff options
author | Dan Willemsen <dwillemsen@google.com> | 2017-05-12 19:28:46 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2017-05-15 14:18:10 -0700 |
commit | 85e55ceff2108d3fc1c7aaa76faa25912ffd9c5e (patch) | |
tree | 13ec30a80fc6cada0cd122840b1009213d03785a | |
parent | 3eb44160e0b90d974d1415829dae87726838e44e (diff) | |
download | build-85e55ceff2108d3fc1c7aaa76faa25912ffd9c5e.tar.gz |
Move auto installclean to soong_ui
This way kati doesn't need to keep state for which build got run last,
and we have to run kati less often. This was forcing another kati run
for an empty out directory, and a kati run (or two) every time you
switched products that shared a device.
Bug: 35970961
Test: m clean; m -j blueprint_tools; m -j blueprint_tools; m -j blueprint_tools
Test: lunch aosp_arm-eng; m -j blueprint_tools; lunch full-eng; m -j blueprint_tools; <repeat>
Change-Id: I825a0868fb7059016a940c76244527432e3e7cff
-rw-r--r-- | core/cleanbuild.mk | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/core/cleanbuild.mk b/core/cleanbuild.mk index 3a909337b0..b7109f60bc 100644 --- a/core/cleanbuild.mk +++ b/core/cleanbuild.mk @@ -144,52 +144,6 @@ INTERNAL_CLEAN_BUILD_VERSION := endif # if not ONE_SHOT_MAKEFILE dont_bother NO_ANDROID_CLEANSPEC -# Since products and build variants (unfortunately) share the same -# PRODUCT_OUT staging directory, things can get out of sync if different -# build configurations are built in the same tree. The following logic -# will notice when the configuration has changed and remove the files -# necessary to keep things consistent. - -previous_build_config_file := $(PRODUCT_OUT)/previous_build_config.mk -current_build_config_file := $(PRODUCT_OUT)/current_build_config.mk - -current_build_config := \ - $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT) -force_installclean := false - -# Read the current state from the file, if present. -# Will set PREVIOUS_BUILD_CONFIG. -# -PREVIOUS_BUILD_CONFIG := --include $(previous_build_config_file) -PREVIOUS_BUILD_CONFIG := $(strip $(PREVIOUS_BUILD_CONFIG)) - -ifdef PREVIOUS_BUILD_CONFIG - ifneq ($(current_build_config),$(PREVIOUS_BUILD_CONFIG)) - $(info *** Build configuration changed: "$(PREVIOUS_BUILD_CONFIG)" -> "$(current_build_config)") - ifneq ($(DISABLE_AUTO_INSTALLCLEAN),true) - force_installclean := true - else - $(info DISABLE_AUTO_INSTALLCLEAN is set; skipping auto-clean. Your tree may be in an inconsistent state.) - endif - endif -endif # else, this is the first build, so no need to clean. - -# Write the new state to the file. -# -$(shell \ - mkdir -p $(dir $(current_build_config_file)) && \ - echo "PREVIOUS_BUILD_CONFIG := $(current_build_config)" > \ - $(current_build_config_file) \ - ) -$(shell cmp $(current_build_config_file) $(previous_build_config_file) > /dev/null 2>&1 || \ - mv -f $(current_build_config_file) $(previous_build_config_file)) - -PREVIOUS_BUILD_CONFIG := -previous_build_config_file := -current_build_config_file := -current_build_config := - # # installclean logic # @@ -272,14 +226,6 @@ installclean: dataclean $(hide) rm -rf $(FILES) @echo "Deleted images and staging directories." -ifeq ($(force_installclean),true) - $(info *** Forcing "make installclean"...) - $(info *** rm -rf $(dataclean_files) $(installclean_files)) - $(shell rm -rf $(dataclean_files) $(installclean_files)) - $(info *** Done with the cleaning, now starting the real build.) -endif -force_installclean := - ########################################################### .PHONY: clean-jack-files |