Merge "Use AndroidProducts.mk list from Soong's finder"

This commit is contained in:
android-build-prod (mdb)
2018-05-02 08:27:24 +00:00
committed by Gerrit Code Review

View File

@@ -23,21 +23,12 @@
# and the .mk suffix) of the product makefile, "<product_name>:" can be
# omitted.
# Search for AndroidProducts.mks in the given dir.
# $(1): the path to the dir
define _search-android-products-files-in-dir
$(sort $(shell test -d $(1) && find -L $(1) \
-maxdepth 6 \
-name .git -prune \
-o -name AndroidProducts.mk -print))
endef
#
# Returns the list of all AndroidProducts.mk files.
# $(call ) isn't necessary.
#
define _find-android-products-files
$(foreach d, device vendor product,$(call _search-android-products-files-in-dir,$(d))) \
$(file <$(OUT_DIR)/.module_paths/AndroidProducts.mk.list) \
$(SRC_TARGET_DIR)/product/AndroidProducts.mk
endef