diff options
-rw-r--r-- | core/product.mk | 1 | ||||
-rw-r--r-- | core/product_config.mk | 16 | ||||
-rw-r--r-- | core/tasks/product-graph.mk | 1 |
3 files changed, 18 insertions, 0 deletions
diff --git a/core/product.mk b/core/product.mk index d0eaf83..be0e219 100644 --- a/core/product.mk +++ b/core/product.mk @@ -84,6 +84,7 @@ _product_var_list := \ PRODUCT_DEFAULT_PROPERTY_OVERRIDES \ PRODUCT_CHARACTERISTICS \ PRODUCT_COPY_FILES \ + PRODUCT_COPY_FILES_OVERRIDES \ PRODUCT_OTA_PUBLIC_KEYS \ PRODUCT_EXTRA_RECOVERY_KEYS \ PRODUCT_PACKAGE_OVERLAYS \ 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 := \ diff --git a/core/tasks/product-graph.mk b/core/tasks/product-graph.mk index 9641f3f..94a1dc7 100644 --- a/core/tasks/product-graph.mk +++ b/core/tasks/product-graph.mk @@ -105,6 +105,7 @@ $(OUT_DIR)/products/$(strip $(1)).txt: $(this_makefile) $(hide) echo 'PRODUCT_DEFAULT_PROPERTY_OVERRIDES=$$(PRODUCTS.$(strip $(1)).PRODUCT_DEFAULT_PROPERTY_OVERRIDES)' >> $$@ $(hide) echo 'PRODUCT_CHARACTERISTICS=$$(PRODUCTS.$(strip $(1)).PRODUCT_CHARACTERISTICS)' >> $$@ $(hide) echo 'PRODUCT_COPY_FILES=$$(PRODUCTS.$(strip $(1)).PRODUCT_COPY_FILES)' >> $$@ + $(hide) echo 'PRODUCT_COPY_FILES_OVERRIDES=$$(PRODUCTS.$(strip $(1)).PRODUCT_COPY_FILES_OVERRIDES)' >> $$@ $(hide) echo 'PRODUCT_OTA_PUBLIC_KEYS=$$(PRODUCTS.$(strip $(1)).PRODUCT_OTA_PUBLIC_KEYS)' >> $$@ $(hide) echo 'PRODUCT_EXTRA_RECOVERY_KEYS=$$(PRODUCTS.$(strip $(1)).PRODUCT_EXTRA_RECOVERY_KEYS)' >> $$@ $(hide) echo 'PRODUCT_PACKAGE_OVERLAYS=$$(PRODUCTS.$(strip $(1)).PRODUCT_PACKAGE_OVERLAYS)' >> $$@ |