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
# ************************************************
subdir_cleanspecs := \
- $(shell build/tools/findleaves.py --prune=$(OUT_DIR) --prune=.repo --prune=.git . CleanSpec.mk)
+ $(shell build/tools/findleaves.py $(FIND_LEAVES_EXCLUDES) . CleanSpec.mk)
include $(subdir_cleanspecs)
subdir_cleanspecs :=
# are specific to the user's build configuration.
include $(BUILD_SYSTEM)/envsetup.mk
+# Pruned directory options used when using findleaves.py
+# See envsetup.mk for a description of SCAN_EXCLUDE_DIRS
+FIND_LEAVES_EXCLUDES := $(addprefix --prune=, $(OUT_DIR) $(SCAN_EXCLUDE_DIRS) .repo .git)
+
# The build system exposes several variables for where to find the kernel
# headers:
# TARGET_DEVICE_KERNEL_HEADERS is automatically created for the current
# $(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
# the bottom for the full list
# OUT_DIR is also set to "out" if it's not already set.
# this allows you to set it to somewhere else if you like
+# SCAN_EXCLUDE_DIRS is an optional, whitespace separated list of
+# directories that will also be excluded from full checkout tree
+# searches for source or make files, in addition to OUT_DIR.
+# This can be useful if you set OUT_DIR to be a different directory
+# than other outputs of your build system.
# Set up version information.
include $(BUILD_SYSTEM)/version_defaults.mk
# 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)))