forked from openkylin/platform_build
am cc2e90e6: am 0f1ca830: Merge "Rewrite the clean steps for TARGET_2ND_ARCH."
* commit 'cc2e90e653c55724f20410347d709b70b1eaf105': Rewrite the clean steps for TARGET_2ND_ARCH.
This commit is contained in:
commit
451dbd7c00
|
@ -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 :=
|
||||
|
|
Loading…
Reference in New Issue