summaryrefslogtreecommitdiffstats
path: root/core/product_config.mk
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2013-12-13 12:47:42 -0500
committerAdnan Begovic <adnan@cyngn.com>2015-10-06 16:28:39 -0700
commitee64593e61a6cb2449a51b45d7598a6869e6c138 (patch)
tree98e6a81a428ac471e1164488f71ec1452dd8f851 /core/product_config.mk
parent7ff9caac6cf42387c4f9a61a5a1896fa4c9ef810 (diff)
downloadbuild-ee64593e61a6cb2449a51b45d7598a6869e6c138.zip
build-ee64593e61a6cb2449a51b45d7598a6869e6c138.tar.gz
build-ee64593e61a6cb2449a51b45d7598a6869e6c138.tar.bz2
build: Add support for PRODUCT_COPY_FILES_OVERRIDES
* We may have a case where prebuilts need to be built from source instead based on an externalized config. * New directive takes a list of destination files to remove from PRODUCT_COPY_FILES so that other instructions can be supplied. Change-Id: I7feff16440e54d1676ffddbbd96d5947efa43ede
Diffstat (limited to 'core/product_config.mk')
-rw-r--r--core/product_config.mk16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/product_config.mk b/core/product_config.mk
index 58437e9..6036f2e 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -349,6 +349,22 @@ PRODUCT_COPY_FILES += \
endif
_boot_animation :=
+# We might want to skip items listed in PRODUCT_COPY_FILES for
+# various reasons. This is useful for replacing a binary module with one
+# built from source. This should be a list of destination files under $OUT
+PRODUCT_COPY_FILES_OVERRIDES := \
+ $(addprefix %:, $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_COPY_FILES_OVERRIDES)))
+
+ifneq ($(PRODUCT_COPY_FILES_OVERRIDES),)
+ PRODUCT_COPY_FILES := $(filter-out $(PRODUCT_COPY_FILES_OVERRIDES), $(PRODUCT_COPY_FILES))
+endif
+
+.PHONY: listcopies
+listcopies:
+ @echo "Copy files: $(PRODUCT_COPY_FILES)"
+ @echo "Overrides: $(PRODUCT_COPY_FILES_OVERRIDES)"
+
+
# A list of property assignments, like "key = value", with zero or more
# whitespace characters on either side of the '='.
PRODUCT_PROPERTY_OVERRIDES := \