From: Shinichiro Hamaji Date: Wed, 27 Jan 2016 05:59:56 +0000 (+0900) Subject: Write clean_steps.mk with multiple commands X-Git-Tag: android-x86-7.1-r1~492^2~20^2^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=1326f65c2f2c812de0937fe78a1453073dc14a3b;p=android-x86%2Fbuild.git Write clean_steps.mk with multiple commands $(INTERNAL_CLEAN_STEPS) could be too big to be fit in a single command line. Bug: 26707439 Change-Id: Ieed6c772980d06c2418a9246b025bca7a6f568aa --- diff --git a/core/cleanbuild.mk b/core/cleanbuild.mk index 06ceecb7a..f7722d272 100644 --- a/core/cleanbuild.mk +++ b/core/cleanbuild.mk @@ -122,9 +122,17 @@ $(shell \ mkdir -p $(dir $(clean_steps_file)) && \ echo "CURRENT_CLEAN_BUILD_VERSION := $(INTERNAL_CLEAN_BUILD_VERSION)" > \ $(clean_steps_file) ;\ - echo "CURRENT_CLEAN_STEPS := $(INTERNAL_CLEAN_STEPS)" >> \ - $(clean_steps_file) \ + echo "CURRENT_CLEAN_STEPS := $(wordlist 1,500,$(INTERNAL_CLEAN_STEPS))" >> $(clean_steps_file) \ ) +define -cs-write-clean-steps-if-arg1-not-empty +$(if $(1),$(shell echo "CURRENT_CLEAN_STEPS += $(1)" >> $(clean_steps_file))) +endef +$(call -cs-write-clean-steps-if-arg1-not-empty,$(wordlist 501,1000,$(INTERNAL_CLEAN_STEPS))) +$(call -cs-write-clean-steps-if-arg1-not-empty,$(wordlist 1001,1500,$(INTERNAL_CLEAN_STEPS))) +$(call -cs-write-clean-steps-if-arg1-not-empty,$(wordlist 1501,2000,$(INTERNAL_CLEAN_STEPS))) +$(call -cs-write-clean-steps-if-arg1-not-empty,$(wordlist 2001,2500,$(INTERNAL_CLEAN_STEPS))) +$(call -cs-write-clean-steps-if-arg1-not-empty,$(wordlist 2501,3000,$(INTERNAL_CLEAN_STEPS))) +$(call -cs-write-clean-steps-if-arg1-not-empty,$(wordlist 3001,99999,$(INTERNAL_CLEAN_STEPS))) endif CURRENT_CLEAN_BUILD_VERSION :=