diff options
author | Ying Wang <wangying@google.com> | 2012-09-05 18:15:11 -0700 |
---|---|---|
committer | android code review <noreply-gerritcodereview@google.com> | 2012-09-05 18:15:12 -0700 |
commit | 478d0fc6a311b236fddc9d18c9a1b922f8ecf1ea (patch) | |
tree | 7e1f7b4e3f2b240d05ba831ccb12524bef4f2262 | |
parent | 5da7ec4fbdc8c2ac30f7dafb33327e9bfa337d5b (diff) | |
parent | 619fccf9f34bee6bebc2710dff798fde6ebca7e4 (diff) | |
download | build-478d0fc6a311b236fddc9d18c9a1b922f8ecf1ea.tar.gz |
Merge "Remove duplicate src:dest pairs in PRODUCT_COPY_FILES"
-rw-r--r-- | core/Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/Makefile b/core/Makefile index d9f9a25df2..3ed33dc864 100644 --- a/core/Makefile +++ b/core/Makefile @@ -23,8 +23,13 @@ define check-product-copy-files $(if $(filter %.apk, $(1)),$(error \ Prebuilt apk found in PRODUCT_COPY_FILES: $(1), use BUILD_PREBUILT instead!)) endef -unique_product_copy_files_destinations := +# filter out the duplicate <source file>:<dest file> pairs. +unique_product_copy_files_pairs := $(foreach cf,$(PRODUCT_COPY_FILES), \ + $(if $(filter $(unique_product_copy_files_pairs),$(cf)),,\ + $(eval unique_product_copy_files_pairs += $(cf)))) +unique_product_copy_files_destinations := +$(foreach cf,$(unique_product_copy_files_pairs), \ $(eval _src := $(call word-colon,1,$(cf))) \ $(eval _dest := $(call word-colon,2,$(cf))) \ $(call check-product-copy-files,$(cf)) \ @@ -36,6 +41,7 @@ $(foreach cf,$(PRODUCT_COPY_FILES), \ $(eval $(call copy-one-file,$(_src),$(_fulldest)))) \ $(eval ALL_DEFAULT_INSTALLED_MODULES += $(_fulldest)) \ $(eval unique_product_copy_files_destinations += $(_dest)))) +unique_product_copy_files_pairs := unique_product_copy_files_destinations := # ----------------------------------------------------------------- |