Revert "Use the Finder's results for faster searching"
This reverts commit 4e3ea546d7f0d95def0a5788a143e9d82cfcf515.
Reason for revert: New Build Breakage: aosp-master/build_test @ 4283735
Change-Id: Icf62c628c1d0cb0b1fd4b401ae1a866f7f88c477
diff --git a/core/cleanspec.mk b/core/cleanspec.mk
index af28954..4441e2a 100644
--- a/core/cleanspec.mk
+++ b/core/cleanspec.mk
@@ -64,6 +64,6 @@
# ************************************************
subdir_cleanspecs := \
- $(file <$(OUT_DIR)/.module_paths/CleanSpec.mk.list)
+ $(shell build/tools/findleaves.py $(FIND_LEAVES_EXCLUDES) . CleanSpec.mk)
include $(subdir_cleanspecs)
subdir_cleanspecs :=
diff --git a/core/main.mk b/core/main.mk
index 66b8951..ef690e0 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -403,7 +403,7 @@
# Include all of the makefiles in the system
#
-subdir_makefiles := $(SOONG_ANDROID_MK) $(file <$(OUT_DIR)/.module_paths/Android.mk.list)
+subdir_makefiles := $(SOONG_ANDROID_MK) $(call first-makefiles-under,$(TOP))
subdir_makefiles_total := $(words $(subdir_makefiles))
.KATI_READONLY := subdir_makefiles_total