Cherry-pick unbundled build changes from master
Change-Id: I82cab32f00b7b729d9b01c8e1532c8bf0ad2fb92
diff --git a/core/product.mk b/core/product.mk
index eca98ed..38d1148 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -29,13 +29,13 @@
endef
#
-# Returns the sorted concatenation of all PRODUCT_MAKEFILES
-# variables set in all AndroidProducts.mk files.
-# $(call ) isn't necessary.
+# Returns the sorted concatenation of PRODUCT_MAKEFILES
+# variables set in the given AndroidProducts.mk files.
+# $(1): the list of AndroidProducts.mk files.
#
-define get-all-product-makefiles
+define get-product-makefiles
$(sort \
- $(foreach f,$(_find-android-products-files), \
+ $(foreach f,$(1), \
$(eval PRODUCT_MAKEFILES :=) \
$(eval LOCAL_DIR := $(patsubst %/,%,$(dir $(f)))) \
$(eval include $(f)) \
@@ -47,6 +47,15 @@
endef
#
+# Returns the sorted concatenation of all PRODUCT_MAKEFILES
+# variables set in all AndroidProducts.mk files.
+# $(call ) isn't necessary.
+#
+define get-all-product-makefiles
+$(call get-product-makefiles,$(_find-android-products-files))
+endef
+
+#
# Functions for including product makefiles
#