summaryrefslogtreecommitdiffstats
path: root/core/cleanbuild.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2014-06-18 22:58:30 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-06-18 22:58:30 +0000
commit451dbd7c006177edb56fc5036ae8c3c110c5f2fd (patch)
treeef708e8b64b798eaea01be0e3a01e418615b687c /core/cleanbuild.mk
parent0d073451e7a453ccfb952505b27ec1effdc3a674 (diff)
parentcc2e90e653c55724f20410347d709b70b1eaf105 (diff)
downloadbuild-451dbd7c006177edb56fc5036ae8c3c110c5f2fd.zip
build-451dbd7c006177edb56fc5036ae8c3c110c5f2fd.tar.gz
build-451dbd7c006177edb56fc5036ae8c3c110c5f2fd.tar.bz2
am cc2e90e6: am 0f1ca830: Merge "Rewrite the clean steps for TARGET_2ND_ARCH."
* commit 'cc2e90e653c55724f20410347d709b70b1eaf105': Rewrite the clean steps for TARGET_2ND_ARCH.
Diffstat (limited to 'core/cleanbuild.mk')
-rw-r--r--core/cleanbuild.mk22
1 files changed, 22 insertions, 0 deletions
diff --git a/core/cleanbuild.mk b/core/cleanbuild.mk
index fc56604..0932aa1 100644
--- a/core/cleanbuild.mk
+++ b/core/cleanbuild.mk
@@ -81,6 +81,28 @@ else
$(info Clean step: $(INTERNAL_CLEAN_STEP.$(step))) \
$(shell $(INTERNAL_CLEAN_STEP.$(step))) \
)
+
+ # Rewrite the clean step for the second arch.
+ ifdef TARGET_2ND_ARCH
+ # $(1): the clean step cmd
+ # $(2): the prefix to search for
+ # $(3): the prefix to replace with
+ define -cs-rewrite-cleanstep
+ $(if $(filter $(2)/%,$(1)),\
+ $(eval _crs_new_cmd := $(patsubst $(2)/%,$(3)/%,$(1)))\
+ $(info Clean step: $(_crs_new_cmd))\
+ $(shell $(_crs_new_cmd)))
+ endef
+ $(foreach step,$(steps), \
+ $(call -cs-rewrite-cleanstep,$(INTERNAL_CLEAN_STEP.$(step)),$(TARGET_OUT_INTERMEDIATES),$($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES))\
+ $(call -cs-rewrite-cleanstep,$(INTERNAL_CLEAN_STEP.$(step)),$(TARGET_OUT_SHARED_LIBRARIES),$($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES))\
+ $(call -cs-rewrite-cleanstep,$(INTERNAL_CLEAN_STEP.$(step)),$(TARGET_OUT_VENDOR_SHARED_LIBRARIES),$($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES))\
+ $(call -cs-rewrite-cleanstep,$(INTERNAL_CLEAN_STEP.$(step)),$($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES),$(TARGET_OUT_INTERMEDIATES))\
+ $(call -cs-rewrite-cleanstep,$(INTERNAL_CLEAN_STEP.$(step)),$($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES),$(TARGET_OUT_SHARED_LIBRARIES))\
+ $(call -cs-rewrite-cleanstep,$(INTERNAL_CLEAN_STEP.$(step)),$($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES),$(TARGET_OUT_VENDOR_SHARED_LIBRARIES))\
+ )
+ endif
+ _crs_new_cmd :=
steps :=
endif
CURRENT_CLEAN_BUILD_VERSION :=