summaryrefslogtreecommitdiffstats
path: root/core/cleanspec.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/cleanspec.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/cleanspec.mk')
-rw-r--r--core/cleanspec.mk27
1 files changed, 1 insertions, 26 deletions
diff --git a/core/cleanspec.mk b/core/cleanspec.mk
index 444ff98..d4a8eed 100644
--- a/core/cleanspec.mk
+++ b/core/cleanspec.mk
@@ -63,32 +63,7 @@ INTERNAL_CLEAN_BUILD_VERSION := 6
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
-# Get the path of the top of the tree.
-# for example:
-# /home/bob/master/framework/base => /home/bob/master
-# See function gettop in build/envsetup.sh.
-define get-top-dir
-$(if $(1),$(if $(wildcard $(1)/build/core/envsetup.mk),$(1),$(strip \
- $(call get-top-dir,$(patsubst %/,%,$(dir $(1)))))))
-endef
-
-ifneq ($(ONE_SHOT_MAKEFILE),)
-cs_subdirs := $(patsubst %/,%,$(dir $(ONE_SHOT_MAKEFILE)))
-abs_cs_subdirs := $(filter /%,$(cs_subdirs))
-ifneq ($(abs_cs_subdirs),)
-# Convert absolute path to relative path, e.g. when using mm.
-abs_top_path := $(call get-top-dir,$(word 1,$(abs_cs_subdirs)))
-cs_subdirs := $(filter-out /%,$(cs_subdirs)) \
- $(patsubst $(abs_top_path)/%,%,$(abs_cs_subdirs))
-
-abs_top_path :=
-abs_cs_subdirs :=
-endif
-else
-cs_subdirs := .
-endif
subdir_cleanspecs := \
- $(shell build/tools/findleaves.py --prune=out --prune=.repo --prune=.git $(cs_subdirs) CleanSpec.mk)
+ $(shell build/tools/findleaves.py --prune=out --prune=.repo --prune=.git . CleanSpec.mk)
include $(subdir_cleanspecs)
-cs_subdirs :=
subdir_cleanspecs :=