core: don't hardcode "out" during findleaves.py invocations.
"out" can be $OUT_DIR
Bug: 7183057
Change-Id: I7b52d40de4398f481e47f6d6d719fb550d874f73
diff --git a/core/cleanspec.mk b/core/cleanspec.mk
index d4a8eed..500ce54 100644
--- a/core/cleanspec.mk
+++ b/core/cleanspec.mk
@@ -64,6 +64,6 @@
# ************************************************
subdir_cleanspecs := \
- $(shell build/tools/findleaves.py --prune=out --prune=.repo --prune=.git . CleanSpec.mk)
+ $(shell build/tools/findleaves.py --prune=$(OUT_DIR) --prune=.repo --prune=.git . CleanSpec.mk)
include $(subdir_cleanspecs)
subdir_cleanspecs :=
diff --git a/core/definitions.mk b/core/definitions.mk
index 7834baa..bf9901e 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -147,7 +147,7 @@
# $(1): directory to search under
# Ignores $(1)/Android.mk
define first-makefiles-under
-$(shell build/tools/findleaves.py --prune=out --prune=.repo --prune=.git \
+$(shell build/tools/findleaves.py --prune=$(OUT_DIR) --prune=.repo --prune=.git \
--mindepth=2 $(1) Android.mk)
endef
diff --git a/core/main.mk b/core/main.mk
index 25ec74e..47847bf 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -479,7 +479,7 @@
# Can't use first-makefiles-under here because
# --mindepth=2 makes the prunes not work.
subdir_makefiles := \
- $(shell build/tools/findleaves.py --prune=out --prune=.repo --prune=.git $(subdirs) Android.mk)
+ $(shell build/tools/findleaves.py --prune=$(OUT_DIR) --prune=.repo --prune=.git $(subdirs) Android.mk)
include $(subdir_makefiles)