From bd8ac3284d1b87805fc35c167e405c10652f66a3 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Fri, 12 May 2017 19:28:46 -0700 Subject: [PATCH] Move clean/clobber to soong_ui So that we don't have to load up all the makefile state just to remove the output directory. Starting from a completely empty out directory: kati: 16s soong_ui: 2.0s From a minimal out directory (m -j blueprint_tools): kati: 3.8s soong_ui: 0.4s Test: m -j clean Test: m -j clobber Change-Id: Iec1ce032c7cc7ed102430080e857fc421b66309c --- core/config.mk | 2 +- core/main.mk | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/core/config.mk b/core/config.mk index 583909d57..86915a6ba 100644 --- a/core/config.mk +++ b/core/config.mk @@ -847,7 +847,7 @@ endef # These goals don't need to collect and include Android.mks/CleanSpec.mks # in the source tree. -dont_bother_goals := clean clobber dataclean installclean \ +dont_bother_goals := dataclean installclean \ help out \ snod systemimage-nodeps \ stnod systemtarball-nodeps \ diff --git a/core/main.mk b/core/main.mk index 6089cec39..5bc8b3bb9 100644 --- a/core/main.mk +++ b/core/main.mk @@ -1270,14 +1270,6 @@ endif # samplecode in $(MAKECMDGOALS) .PHONY: findbugs findbugs: $(INTERNAL_FINDBUGS_HTML_TARGET) $(INTERNAL_FINDBUGS_XML_TARGET) -.PHONY: clean -clean: - @rm -rf $(OUT_DIR)/* - @echo "Entire build directory removed." - -.PHONY: clobber -clobber: clean - # The rules for dataclean and installclean are defined in cleanbuild.mk. #xxx scrape this from ALL_MODULE_NAME_TAGS