From 6585d6eb992bb9b65354ab1abfc8ceea096fc535 Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Sun, 7 Dec 2014 16:42:28 -0800 Subject: [PATCH] build: Parse TARGET_COPY_FILES_OVERRIDES late in the setup Change-Id: Ie3e4a168ff224e3b65e4627c0757e8813a02167f --- core/config.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/config.mk b/core/config.mk index 9442a640c..aa3a85e97 100644 --- a/core/config.mk +++ b/core/config.mk @@ -877,6 +877,17 @@ RSCOMPAT_NO_USAGEIO_API_LEVELS := 8 9 10 11 12 13 # Rules for QCOM targets include $(BUILD_SYSTEM)/qcom_target.mk +# We might want to skip items listed in PRODUCT_COPY_FILES based on +# various target flags. This is useful for replacing a binary module with one +# built from source. This should be a list of destination files under $OUT +# +TARGET_COPY_FILES_OVERRIDES := \ + $(addprefix %:, $(strip $(TARGET_COPY_FILES_OVERRIDES))) + +ifneq ($(TARGET_COPY_FILES_OVERRIDES),) + PRODUCT_COPY_FILES := $(filter-out $(TARGET_COPY_FILES_OVERRIDES), $(PRODUCT_COPY_FILES)) +endif + ifneq ($(CM_BUILD),) ## We need to be sure the global selinux policies are included ## last, to avoid accidental resetting by device configs -- 2.11.0