Skip to content

Commit

Permalink
Run clean steps in only given paths when using mm/mmm
Browse files Browse the repository at this point in the history
To speed up mm/mmm start time.
At the same time, we should copy over the other clean steps.

Bug: 7186768
Change-Id: I250e64256343afe788d79817af36eafaadb47028
  • Loading branch information
Ying Wang committed Sep 26, 2012
1 parent bf36578 commit 6ea58cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions core/cleanbuild.mk
Expand Up @@ -78,6 +78,10 @@ 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 :=
Expand Down
8 changes: 7 additions & 1 deletion core/cleanspec.mk
Expand Up @@ -63,7 +63,13 @@ INTERNAL_CLEAN_BUILD_VERSION := 6
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************

ifneq ($(ONE_SHOT_MAKEFILE),)
cs_subdirs := $(dir $(ONE_SHOT_MAKEFILE))
else
cs_subdirs := .
endif
subdir_cleanspecs := \
$(shell build/tools/findleaves.py --prune=out --prune=.repo --prune=.git . CleanSpec.mk)
$(shell build/tools/findleaves.py --prune=out --prune=.repo --prune=.git $(cs_subdirs) CleanSpec.mk)
include $(subdir_cleanspecs)
cs_subdirs :=
subdir_cleanspecs :=

0 comments on commit 6ea58cb

Please sign in to comment.