Skip to content

Instantly share code, notes, and snippets.

@WanghongLin
Created May 29, 2015 11:18
Show Gist options
  • Save WanghongLin/f881e509f2bafbe98571 to your computer and use it in GitHub Desktop.
Save WanghongLin/f881e509f2bafbe98571 to your computer and use it in GitHub Desktop.
android build inherited product copy file override parent product copy file
Index: build/core/Makefile
===================================================================
--- build/core/Makefile (revision 214)
+++ build/core/Makefile (working copy)
@@ -19,6 +19,11 @@
# The filter part means "only eval the copy-one-file rule if this
# src:dest pair is the first one to match the same dest"
#$(1): the src:dest pair
+
+# make the product copy files in inherit override the parent
+reverse = $(shell printf "%s\n" $(strip $1) | tac)
+$(eval PRODUCT_COPY_FILES:=$(call reverse, $(PRODUCT_COPY_FILES)))
+
ifeq ($(filter rtd298x_tv013,$(TARGET_PRODUCT)),)
define check-product-copy-files
$(if $(filter %.apk, $(1)),$(error \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment