Add new variable SCAN_EXCLUDE_DIRS; specifies directories to exclude when searching source tree.
These directories are excluded in addition to OUT_DIR.
This can be useful if your build system has other output directories
beyond what OUT_DIR is set to.
Change-Id: I6d98a85bcc8c89279e939406a7fec32547e8922f
diff --git a/core/definitions.mk b/core/definitions.mk
index 57fc434..946a2a9 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -150,7 +150,7 @@
# $(1): directory to search under
# Ignores $(1)/Android.mk
define first-makefiles-under
-$(shell build/tools/findleaves.py --prune=$(OUT_DIR) --prune=.repo --prune=.git \
+$(shell build/tools/findleaves.py $(FIND_LEAVES_EXCLUDES) \
--mindepth=2 $(1) Android.mk)
endef