Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ee362ea authored by Ying Wang's avatar Ying Wang Committed by Android Git Automerger
Browse files

am 478d0fc6: Merge "Remove duplicate src:dest pairs in PRODUCT_COPY_FILES"

* commit '478d0fc6':
  Remove duplicate src:dest pairs in PRODUCT_COPY_FILES
parents 86ffa1cd 478d0fc6
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -23,8 +23,13 @@ define check-product-copy-files
$(if $(filter %.apk, $(1)),$(error \
$(if $(filter %.apk, $(1)),$(error \
    Prebuilt apk found in PRODUCT_COPY_FILES: $(1), use BUILD_PREBUILT instead!))
    Prebuilt apk found in PRODUCT_COPY_FILES: $(1), use BUILD_PREBUILT instead!))
endef
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), \
$(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 _src := $(call word-colon,1,$(cf))) \
    $(eval _dest := $(call word-colon,2,$(cf))) \
    $(eval _dest := $(call word-colon,2,$(cf))) \
    $(call check-product-copy-files,$(cf)) \
    $(call check-product-copy-files,$(cf)) \
@@ -36,6 +41,7 @@ $(foreach cf,$(PRODUCT_COPY_FILES), \
            $(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 += $(_dest))))
        $(eval unique_product_copy_files_destinations += $(_dest))))
unique_product_copy_files_pairs :=
unique_product_copy_files_destinations :=
unique_product_copy_files_destinations :=


# -----------------------------------------------------------------
# -----------------------------------------------------------------