Only copy once even if the first matched src:dest pair appears more than once.
Change-Id: I9bef6172a1123518e97e04190fb857f9ee2c7582
This commit is contained in:
parent
63ae1fa6bb
commit
462d26bd32
1 changed files with 11 additions and 8 deletions
|
@ -15,15 +15,18 @@ endif
|
||||||
# <dest file> is relative to $(PRODUCT_OUT), so it should look like,
|
# <dest file> is relative to $(PRODUCT_OUT), so it should look like,
|
||||||
# e.g., "system/etc/file.xml".
|
# e.g., "system/etc/file.xml".
|
||||||
# The filter part means "only eval the copy-one-file rule if this
|
# The filter part means "only eval the copy-one-file rule if this
|
||||||
# src:dest pair is the first one to match %:dest"
|
# src:dest pair is the first one to match the same dest"
|
||||||
|
unique_product_copy_files_destinations := $(sort \
|
||||||
|
$(foreach cf,$(PRODUCT_COPY_FILES), $(call word-colon,2,$(cf))))
|
||||||
$(foreach cf,$(PRODUCT_COPY_FILES), \
|
$(foreach cf,$(PRODUCT_COPY_FILES), \
|
||||||
$(eval _src := $(call word-colon,1,$(cf))) \
|
$(eval _src := $(call word-colon,1,$(cf))) \
|
||||||
$(eval _dest := $(call word-colon,2,$(cf))) \
|
$(eval _dest := $(call word-colon,2,$(cf))) \
|
||||||
$(eval _fulldest := $(call append-path,$(PRODUCT_OUT),$(_dest))) \
|
$(if $(filter $(unique_product_copy_files_destinations),$(_dest)), \
|
||||||
$(if $(filter $(_src):$(_dest),$(firstword $(filter %:$(_dest),$(PRODUCT_COPY_FILES)))), \
|
$(eval _fulldest := $(call append-path,$(PRODUCT_OUT),$(_dest))) \
|
||||||
$(eval $(call copy-one-file,$(_src),$(_fulldest))),) \
|
$(eval $(call copy-one-file,$(_src),$(_fulldest))) \
|
||||||
$(eval ALL_DEFAULT_INSTALLED_MODULES += $(_fulldest)) \
|
$(eval ALL_DEFAULT_INSTALLED_MODULES += $(_fulldest)) \
|
||||||
)
|
$(eval unique_product_copy_files_destinations := $(filter-out $(_dest), \
|
||||||
|
$(unique_product_copy_files_destinations)))))
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# docs/index.html
|
# docs/index.html
|
||||||
|
|
Loading…
Reference in a new issue