summaryrefslogtreecommitdiffstats
path: root/core/product_config.mk
diff options
context:
space:
mode:
authorRicardo Cerqueira <github@cerqueira.org>2011-11-25 15:30:36 +0000
committerAdnan Begovic <adnan@cyngn.com>2015-10-06 16:07:42 -0700
commit119d3bb8667485d3fca648e01cabc7c08bb160b6 (patch)
treed865b722d04b2164f7e2bc941aa65f22a1227c4e /core/product_config.mk
parentb25f91401f31f75b752827b15f97f46809063732 (diff)
downloadbuild-119d3bb8667485d3fca648e01cabc7c08bb160b6.zip
build-119d3bb8667485d3fca648e01cabc7c08bb160b6.tar.gz
build-119d3bb8667485d3fca648e01cabc7c08bb160b6.tar.bz2
build: Preliminary support for CM product builds
If building a cm_* product, skip crawling the filesystem for AndroidProduct makefiles (and, of course, parsing their contents) and aim directly for the device/cm/<product> device configuration Change-Id: I2a5e70dda973a6fcdbba0d5e26b35b99d3f1aea2 Change how we search for CM makefiles. build: Fix fastpath code for CM_BUILD * We need to adjust to the new validations Change-Id: I9066d4f437beb9597027ee6bbb52504b5e7e84c5
Diffstat (limited to 'core/product_config.mk')
-rw-r--r--core/product_config.mk17
1 files changed, 14 insertions, 3 deletions
diff --git a/core/product_config.mk b/core/product_config.mk
index a87d0c6..1cafc89 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -184,11 +184,16 @@ ifneq ($(strip $(TARGET_BUILD_APPS)),)
all_product_configs := $(call get-product-makefiles,\
$(SRC_TARGET_DIR)/product/AndroidProducts.mk)
else
-# Read in all of the product definitions specified by the AndroidProducts.mk
-# files in the tree.
-all_product_configs := $(get-all-product-makefiles)
+ ifneq ($(CM_BUILD),)
+ all_product_configs := $(shell ls device/*/$(CM_BUILD)/cm.mk)
+ else
+ # Read in all of the product definitions specified by the AndroidProducts.mk
+ # files in the tree.
+ all_product_configs := $(get-all-product-makefiles)
+ endif
endif
+ifeq ($(CM_BUILD),)
# Find the product config makefile for the current product.
# all_product_configs consists items like:
# <product_name>:<path_to_the_product_makefile>
@@ -207,12 +212,18 @@ $(foreach f, $(all_product_configs),\
$(eval all_product_makefiles += $(f))\
$(if $(filter $(TARGET_PRODUCT),$(basename $(notdir $(f)))),\
$(eval current_product_makefile += $(f)),)))
+
_cpm_words :=
_cpm_word1 :=
_cpm_word2 :=
+else
+ current_product_makefile := $(strip $(all_product_configs))
+ all_product_makefiles := $(strip $(all_product_configs))
+endif
current_product_makefile := $(strip $(current_product_makefile))
all_product_makefiles := $(strip $(all_product_makefiles))
+
ifneq (,$(filter product-graph dump-products, $(MAKECMDGOALS)))
# Import all product makefiles.
$(call import-products, $(all_product_makefiles))