# -----------------------------------------------------------------
# Define rules to copy PRODUCT_COPY_FILES defined by the product.
# PRODUCT_COPY_FILES contains words like :[:].
# is relative to $(PRODUCT_OUT), so it should look like,
# e.g., system/etc/file.xml.
# 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
define check-product-copy-files
$(if $(filter %.apk, $(1)),$(error
Prebuilt apk found in PRODUCT_COPY_FILES: $(1), use BUILD_PREBUILT instead!))
endef
# filter out the duplicate : 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))
$(if $(filter $(unique_product_copy_files_destinations),$(_dest)),
$(info PRODUCT_COPY_FILES $(cf) ignored.),
$(eval _fulldest := $(call append-path,$(PRODUCT_OUT),$(_dest)))
$(if $(filter %.xml,$(_dest)),
$(eval $(call copy-xml-file-checked,$(_src),$(_fulldest))),
$(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 :=
# Can't use first-makefiles-under here because
# --mindepth=2 makes the prunes not work.
subdir_makefiles :=
$(shell build/tools/findleaves.py --prune=out --prune=.repo --prune=.git $(subdirs) Android.mk)
include $(subdir_makefiles)
endif # ONE_SHOT_MAKEFILE
# Now with all Android.mks loaded we can do post cleaning steps.
include $(BUILD_SYSTEM)/post_clean.mk
ifeq ($(stash_product_vars),true)
$(call assert-product-vars, __STASHED)
endif
build/core/main.mk:533: *** Some files have been added to ALL_PREBUILT.
build/core/main.mk:534: *
build/core/main.mk:535: * ALL_PREBUILT is a deprecated mechanism that
build/core/main.mk:536: * should not be used for new files.
build/core/main.mk:537: * As an alternative, use PRODUCT_COPY_FILES in
build/core/main.mk:538: * the appropriate product definition.
build/core/main.mk:539: * build/target/product/core.mk is the product
build/core/main.mk:540: * definition used in all products.
build/core/main.mk:541: *
build/core/main.mk:542: * unexpected usb_modeswitch.h in ALL_PREBUILT
build/core/main.mk:542: * unexpected usb_modeswitch.sh in ALL_PREBUILT
build/core/main.mk:542: * unexpected usb_modeswitch.tcl in ALL_PREBUILT
build/core/main.mk:543: *
build/core/main.mk:544: *** ALL_PREBUILT contains unexpected files。 停止。
錯誤發生在 /build/core/main.mk
include $(BUILD_SYSTEM)/legacy_prebuilts.mk
ifneq ($(filter-out $(GRANDFATHERED_ALL_PREBUILT),$(strip $(notdir $(ALL_PREBUILT)))),)
$(warning *** Some files have been added to ALL_PREBUILT.)
$(warning *)
$(warning * ALL_PREBUILT is a deprecated mechanism that)
$(warning * should not be used for new files.)
$(warning * As an alternative, use PRODUCT_COPY_FILES in)
$(warning * the appropriate product definition.)
$(warning * build/target/product/core.mk is the product)
$(warning * definition used in all products.)
$(warning *)
$(foreach bad_prebuilt,$(filter-out $(GRANDFATHERED_ALL_PREBUILT),$(strip $(notdir $(ALL_PREBUILT)))),$(warning * unexpected $(bad_prebuilt) in ALL_PREBUILT))
$(warning *)
$(error ALL_PREBUILT contains unexpected files)
endif
# This is the list of modules grandfathered to use ALL_PREBUILT
# DO NOT ADD ANY NEW MODULE TO THIS FILE
#
# ALL_PREBUILT modules are hard to control and audit and we don't want
# to add any new such module in the system
GRANDFATHERED_ALL_PREBUILT :=
akmd2
am
ap_gain.bin
...