Merge "Move dep on PRODUCT_COPY_FILES to main.mk"

This commit is contained in:
Anton Hansson 2018-07-20 10:12:37 +00:00 committed by Gerrit Code Review
commit 78e36736fe
3 changed files with 20 additions and 16 deletions

View file

@ -39,7 +39,6 @@ $(foreach cf,$(unique_product_copy_files_pairs), \
$(if $(filter init%rc,$(notdir $(_dest)))$(filter %/etc/init,$(dir $(_dest))),\ $(if $(filter init%rc,$(notdir $(_dest)))$(filter %/etc/init,$(dir $(_dest))),\
$(eval $(call copy-init-script-file-checked,$(_src),$(_fulldest))),\ $(eval $(call copy-init-script-file-checked,$(_src),$(_fulldest))),\
$(eval $(call copy-one-file,$(_src),$(_fulldest)))))) \ $(eval $(call copy-one-file,$(_src),$(_fulldest)))))) \
$(eval ALL_DEFAULT_INSTALLED_MODULES += $(_fulldest)) \
$(eval unique_product_copy_files_destinations += $(_dest)))) $(eval unique_product_copy_files_destinations += $(_dest))))
# Dump a list of overriden (and ignored PRODUCT_COPY_FILES entries) # Dump a list of overriden (and ignored PRODUCT_COPY_FILES entries)

View file

@ -901,7 +901,18 @@ $(if $(_erm_new_modules),$(eval $(1) += $(_erm_new_modules))\
$(call expand-required-modules,$(1),$(_erm_new_modules))) $(call expand-required-modules,$(1),$(_erm_new_modules)))
endef endef
# Determines the files a particular product installs. # Transforms paths relative to PRODUCT_OUT to absolute paths.
# $(1): list of relative paths
# $(2): optional suffix to append to paths
define resolve-product-relative-paths
$(subst $(_vendor_path_placeholder),$(TARGET_COPY_OUT_VENDOR),\
$(subst $(_product_path_placeholder),$(TARGET_COPY_OUT_PRODUCT),\
$(foreach p,$(1),$(call append-path,$(PRODUCT_OUT),$(p)$(2)))))
endef
# Lists most of the files a particular product installs, including:
# - PRODUCT_PACKAGES, and their LOCAL_REQUIRED_MODULES
# - PRODUCT_COPY_FILES
# The base list of modules to build for this product is specified # The base list of modules to build for this product is specified
# by the appropriate product definition file, which was included # by the appropriate product definition file, which was included
# by product_config.mk. # by product_config.mk.
@ -915,7 +926,8 @@ endef
# 32-bit variant, if it exits. See the select-bitness-of-required-modules definition. # 32-bit variant, if it exits. See the select-bitness-of-required-modules definition.
# $(1): product makefile # $(1): product makefile
define product-installed-files define product-installed-files
$(eval _pif_modules := $(PRODUCTS.$(strip $(1)).PRODUCT_PACKAGES)) \ $(eval _mk := $(strip $(1))) \
$(eval _pif_modules := $(PRODUCTS.$(_mk).PRODUCT_PACKAGES)) \
$(if $(BOARD_VNDK_VERSION),$(eval _pif_modules += vndk_package)) \ $(if $(BOARD_VNDK_VERSION),$(eval _pif_modules += vndk_package)) \
$(eval ### Filter out the overridden packages and executables before doing expansion) \ $(eval ### Filter out the overridden packages and executables before doing expansion) \
$(eval _pif_overrides := $(foreach p, $(_pif_modules), $(PACKAGES.$(p).OVERRIDES))) \ $(eval _pif_overrides := $(foreach p, $(_pif_modules), $(PACKAGES.$(p).OVERRIDES))) \
@ -932,7 +944,9 @@ define product-installed-files
$(eval _pif_modules += $(call get-32-bit-modules, $(_pif_modules_rest))) \ $(eval _pif_modules += $(call get-32-bit-modules, $(_pif_modules_rest))) \
$(eval _pif_modules += $(_pif_modules_rest)) \ $(eval _pif_modules += $(_pif_modules_rest)) \
$(call expand-required-modules,_pif_modules,$(_pif_modules)) \ $(call expand-required-modules,_pif_modules,$(_pif_modules)) \
$(call module-installed-files, $(_pif_modules)) $(call module-installed-files, $(_pif_modules)) \
$(call resolve-product-relative-paths,\
$(foreach cf,$(PRODUCTS.$(_mk).PRODUCT_COPY_FILES),$(call word-colon,2,$(cf))))
endef endef
# Fails the build if the given list is non-empty, and prints it entries (stripping PRODUCT_OUT). # Fails the build if the given list is non-empty, and prints it entries (stripping PRODUCT_OUT).
@ -971,15 +985,6 @@ else
product_FILES := product_FILES :=
endif endif
# Transforms paths relative to PRODUCT_OUT to absolute paths.
# $(1): list of relative paths
# $(2): optional suffix to append to paths
define resolve-product-relative-paths
$(subst $(_vendor_path_placeholder),$(TARGET_COPY_OUT_VENDOR),\
$(subst $(_product_path_placeholder),$(TARGET_COPY_OUT_PRODUCT),\
$(foreach p,$(1),$(PRODUCT_OUT)/$(p)$(2))))
endef
# Verify the artifact path requirements made by included products. # Verify the artifact path requirements made by included products.
$(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\ $(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\
$(eval requirements := $(PRODUCTS.$(makefile).ARTIFACT_PATH_REQUIREMENTS)) \ $(eval requirements := $(PRODUCTS.$(makefile).ARTIFACT_PATH_REQUIREMENTS)) \
@ -988,8 +993,6 @@ $(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\
$(eval path_patterns := $(call resolve-product-relative-paths,$(requirements),%)) \ $(eval path_patterns := $(call resolve-product-relative-paths,$(requirements),%)) \
$(eval whitelist_patterns := $(call resolve-product-relative-paths,$(whitelist))) \ $(eval whitelist_patterns := $(call resolve-product-relative-paths,$(whitelist))) \
$(eval files := $(call product-installed-files, $(makefile))) \ $(eval files := $(call product-installed-files, $(makefile))) \
$(eval files += $(foreach cf,$(PRODUCTS.$(makefile).PRODUCT_COPY_FILES),\
$(call append-path,$(PRODUCT_OUT),$(call word-colon,2,$(cf))))) \
$(eval files := $(filter-out $(TARGET_OUT_FAKE)/% $(HOST_OUT)/%,$(files))) \ $(eval files := $(filter-out $(TARGET_OUT_FAKE)/% $(HOST_OUT)/%,$(files))) \
$(eval # RROs become REQUIRED by the source module, but are always placed on the vendor partition.) \ $(eval # RROs become REQUIRED by the source module, but are always placed on the vendor partition.) \
$(eval files := $(filter-out %__auto_generated_rro.apk,$(files))) \ $(eval files := $(filter-out %__auto_generated_rro.apk,$(files))) \

View file

@ -24,4 +24,6 @@ PRODUCT_BRAND := generic
PRODUCT_SHIPPING_API_LEVEL := 28 PRODUCT_SHIPPING_API_LEVEL := 28
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST := system/etc/seccomp_policy/mediacodec.policy PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST := \
root/init.zygote64_32.rc \
system/etc/seccomp_policy/mediacodec.policy \