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/main.mk b/core/main.mk
index 9d6e233..17099a3 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -513,7 +513,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_DIR) --prune=.repo --prune=.git $(subdirs) Android.mk)
+	$(shell build/tools/findleaves.py $(FIND_LEAVES_EXCLUDES) $(subdirs) Android.mk)
 
 $(foreach mk, $(subdir_makefiles), $(info including $(mk) ...)$(eval include $(mk)))