summaryrefslogtreecommitdiffstats
path: root/core/cleanbuild.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2013-02-22 18:15:29 -0800
committerYing Wang <wangying@google.com>2013-02-22 18:15:29 -0800
commit50e52fa11e802b4b4a8bf83072323ee48a75436d (patch)
tree93162c6db734d8d4420119d6a4951793c4e43cc0 /core/cleanbuild.mk
parente84420c3e46722132020acd9301c99d486316e83 (diff)
downloadbuild-50e52fa11e802b4b4a8bf83072323ee48a75436d.zip
build-50e52fa11e802b4b4a8bf83072323ee48a75436d.tar.gz
build-50e52fa11e802b4b4a8bf83072323ee48a75436d.tar.bz2
Don't run cleanspecs if you are using mm/mmm.
There is lurky bug in the previous logic I believe: in rare cases, people saw almost all cleansteps rerun. Anyway, it's very rare that you need to run cleansteps when you run mm/mmm. Change-Id: I42e84b3bf01590712ba1b167fe9a500f4ae1ddde
Diffstat (limited to 'core/cleanbuild.mk')
-rw-r--r--core/cleanbuild.mk12
1 files changed, 5 insertions, 7 deletions
diff --git a/core/cleanbuild.mk b/core/cleanbuild.mk
index b6b95af..63cbf63 100644
--- a/core/cleanbuild.mk
+++ b/core/cleanbuild.mk
@@ -13,6 +13,9 @@
# limitations under the License.
#
+# Don't bother with the cleanspecs if you are running mm/mmm
+ifndef ONE_SHOT_MAKEFILE
+
INTERNAL_CLEAN_STEPS :=
# Builds up a list of clean steps. Creates a unique
@@ -78,18 +81,13 @@ else
$(info Clean step: $(INTERNAL_CLEAN_STEP.$(step))) \
$(shell $(INTERNAL_CLEAN_STEP.$(step))) \
)
- # If we are running mm/mmm, we should copy over the other clean steps too.
- ifneq ($(ONE_SHOT_MAKEFILE),)
- INTERNAL_CLEAN_STEPS := $(strip $(CURRENT_CLEAN_STEPS) $(steps))
- endif
steps :=
endif
CURRENT_CLEAN_BUILD_VERSION :=
CURRENT_CLEAN_STEPS :=
# Write the new state to the file.
-# Don't write the file if we are running mm/mmm but without a preexisting clean_steps_file.
-ifneq (,$(wildcard $(clean_steps_file))$(filter ||,|$(ONE_SHOT_MAKEFILE)|))
+#
$(shell \
mkdir -p $(dir $(clean_steps_file)) && \
echo "CURRENT_CLEAN_BUILD_VERSION := $(INTERNAL_CLEAN_BUILD_VERSION)" > \
@@ -97,12 +95,12 @@ $(shell \
echo "CURRENT_CLEAN_STEPS := $(INTERNAL_CLEAN_STEPS)" >> \
$(clean_steps_file) \
)
-endif
clean_steps_file :=
INTERNAL_CLEAN_STEPS :=
INTERNAL_CLEAN_BUILD_VERSION :=
+endif # ifndef ONE_SHOT_MAKEFILE
# Since products and build variants (unfortunately) share the same
# PRODUCT_OUT staging directory, things can get out of sync if different