From b893f4dc04645e261110cdca2f09d08c76ca3e34 Mon Sep 17 00:00:00 2001 From: Tom Marshall Date: Tue, 28 Oct 2014 16:12:15 -0700 Subject: [PATCH 1/2] build: recovery: Support adding device-specific items Change-Id: I25205e68282680932917016646dabd1abadbfce6 --- core/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/Makefile b/core/Makefile index 76c1b5e56b..312a3c1e7b 100644 --- a/core/Makefile +++ b/core/Makefile @@ -694,7 +694,12 @@ recovery_binary := $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery recovery_resources_common := $(call project-path-for,recovery)/res recovery_resources_extra := $(call project-path-for,recovery)/res-$(TARGET_RECOVERY_SCREEN_WIDTH) recovery_resources_private := $(strip $(wildcard $(TARGET_DEVICE_DIR)/recovery/res)) +ifneq ($(TARGET_RECOVERY_DEVICE_DIRS),) +recovery_root_private := $(strip \ + $(foreach d,$(TARGET_RECOVERY_DEVICE_DIRS), $(wildcard $(d)/recovery/root))) +else recovery_root_private := $(strip $(wildcard $(TARGET_DEVICE_DIR)/recovery/root)) +endif recovery_resource_deps := $(shell find $(recovery_resources_common) $(recovery_resources_extra) \ $(recovery_resources_private) $(recovery_root_private) -type f) ifneq ($(TARGET_RECOVERY_FSTAB),) From d559aacd7d2b4e6dc162f3d8489a00a9bd92f23a Mon Sep 17 00:00:00 2001 From: "Brint E. Kriebel" Date: Tue, 14 Oct 2014 12:43:28 -0700 Subject: [PATCH 2/2] product_config: Set CM_BUILD priority above TARGET_BUILD_APPS Even if we are doing TARGET_BUILD_APPS, we may want to use a cm target for building. Change-Id: Ic8053bc679fa8b726be90e611aeaacdf1850cabc --- core/product_config.mk | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/core/product_config.mk b/core/product_config.mk index e56afd9cf5..3886f3570f 100644 --- a/core/product_config.mk +++ b/core/product_config.mk @@ -179,19 +179,20 @@ include $(BUILD_SYSTEM)/node_fns.mk include $(BUILD_SYSTEM)/product.mk include $(BUILD_SYSTEM)/device.mk -ifneq ($(strip $(TARGET_BUILD_APPS)),) -# An unbundled app build needs only the core product makefiles. -all_product_configs := $(call get-product-makefiles,\ - $(SRC_TARGET_DIR)/product/AndroidProducts.mk) +# A CM build needs only the CM product makefiles. +ifneq ($(CM_BUILD),) + all_product_configs := $(shell ls device/*/$(CM_BUILD)/cm.mk) else - ifneq ($(CM_BUILD),) - all_product_configs := $(shell ls device/*/$(CM_BUILD)/cm.mk) + ifneq ($(strip $(TARGET_BUILD_APPS)),) + # An unbundled app build needs only the core product makefiles. + 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) - endif # CM_BUILD -endif + endif # TARGET_BUILD_APPS +endif # CM_BUILD ifeq ($(CM_BUILD),) # Find the product config makefile for the current product.