OSDN Git Service

Merge "Allow to explicitly compile the core build configuration"
[android-x86/build.git] / core / product.mk
index a9a24d2..eca98ed 100644 (file)
@@ -23,7 +23,8 @@
 # $(call ) isn't necessary.
 #
 define _find-android-products-files
-$(shell test -d vendor && find vendor -maxdepth 6 -name AndroidProducts.mk) \
+$(shell test -d device && find device -maxdepth 6 -name AndroidProducts.mk) \
+  $(shell test -d vendor && find vendor -maxdepth 6 -name AndroidProducts.mk) \
   $(SRC_TARGET_DIR)/product/AndroidProducts.mk
 endef
 
@@ -100,6 +101,14 @@ define inherit-product
   $(eval ALL_PRODUCTS := $(sort $(ALL_PRODUCTS) $(word 1,$(_include_stack))))
 endef
 
+
+#
+# Do inherit-product only if $(1) exists
+#
+define inherit-product-if-exists
+  $(if $(wildcard $(1)),$(call inherit-product,$(1)),)
+endef
+
 #
 # $(1): product makefile list
 #