Merge "Support manifest fragments."
am: e543e409d2
Change-Id: I5b6ca6b1c5de82f2dc065c6bc499c6a8b3b7c7c8
This commit is contained in:
commit
b1f4a0d379
4 changed files with 61 additions and 4 deletions
|
@ -2538,6 +2538,7 @@ $(BUILT_TARGET_FILES_PACKAGE): \
|
|||
$(HOST_OUT_EXECUTABLES)/imgdiff \
|
||||
$(HOST_OUT_EXECUTABLES)/bsdiff \
|
||||
$(BUILD_IMAGE_SRCS) \
|
||||
$(HOST_OUT_EXECUTABLES)/assemble_vintf \
|
||||
$(BUILT_VENDOR_MANIFEST) \
|
||||
$(BUILT_VENDOR_MATRIX) \
|
||||
| $(ACP)
|
||||
|
@ -2825,10 +2826,16 @@ ifdef INSTALLED_SYSTEMOTHERIMAGE_TARGET
|
|||
$(hide) $(call fs_config,$(zip_root)/SYSTEM_OTHER,system/) > $(zip_root)/META/system_other_filesystem_config.txt
|
||||
endif
|
||||
@# Metadata for compatibility verification.
|
||||
$(hide) cp $(BUILT_SYSTEM_MANIFEST) $(zip_root)/META/system_manifest.xml
|
||||
$(hide) cp $(BUILT_SYSTEM_COMPATIBILITY_MATRIX) $(zip_root)/META/system_matrix.xml
|
||||
$(hide) $(HOST_OUT_EXECUTABLES)/assemble_vintf \
|
||||
-i $(BUILT_SYSTEM_MANIFEST) $$(find $(zip_root)/SYSTEM/etc/vintf/manifest -type f -name "*.xml" | \
|
||||
sed "s/^/-i /" | tr '\n' ' ') \
|
||||
-o $(zip_root)/META/system_manifest.xml
|
||||
ifdef BUILT_VENDOR_MANIFEST
|
||||
$(hide) cp $(BUILT_VENDOR_MANIFEST) $(zip_root)/META/vendor_manifest.xml
|
||||
$(hide) $(HOST_OUT_EXECUTABLES)/assemble_vintf \
|
||||
-i $(BUILT_VENDOR_MANIFEST) $$(find $(zip_root)/VENDOR/etc/vintf/manifest -type f -name "*.xml" | \
|
||||
sed "s/^/-i /" | tr '\n' ' ') \
|
||||
-o $(zip_root)/META/vendor_manifest.xml
|
||||
endif
|
||||
ifdef BUILT_VENDOR_MATRIX
|
||||
$(hide) cp $(BUILT_VENDOR_MATRIX) $(zip_root)/META/vendor_matrix.xml
|
||||
|
|
|
@ -439,6 +439,30 @@ $(my_all_targets) : | $(my_installed_symlinks)
|
|||
|
||||
endif # !LOCAL_UNINSTALLABLE_MODULE
|
||||
|
||||
###########################################################
|
||||
## VINTF manifest fragment goals
|
||||
###########################################################
|
||||
|
||||
my_vintf_installed:=
|
||||
my_vintf_pairs:=
|
||||
ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
|
||||
ifndef LOCAL_IS_HOST_MODULE
|
||||
ifneq ($(strip $(LOCAL_VINTF_FRAGMENTS)),)
|
||||
|
||||
my_vintf_pairs := $(foreach xml,$(LOCAL_VINTF_FRAGMENTS),$(LOCAL_PATH)/$(xml):$(TARGET_OUT$(partition_tag)_ETC)/vintf/manifest/$(notdir $(xml)))
|
||||
my_vintf_installed := $(foreach xml,$(my_vintf_pairs),$(call word-colon,2,$(xml)))
|
||||
|
||||
# Only set up copy rules once, even if another arch variant shares it
|
||||
my_vintf_new_pairs := $(filter-out $(ALL_VINTF_MANIFEST_FRAGMENTS_LIST),$(my_vintf_pairs))
|
||||
my_vintf_new_installed := $(call copy-many-vintf-manifest-files-checked,$(my_vintf_pairs))
|
||||
|
||||
ALL_VINTF_MANIFEST_FRAGMENTS_LIST += $(my_vintf_new_pairs)
|
||||
|
||||
$(my_all_targets) : $(my_vintf_installed)
|
||||
endif # LOCAL_VINTF_FRAGMENTS
|
||||
endif # !LOCAL_IS_HOST_MODULE
|
||||
endif # !LOCAL_UNINSTALLABLE_MODULE
|
||||
|
||||
###########################################################
|
||||
## CHECK_BUILD goals
|
||||
###########################################################
|
||||
|
@ -643,11 +667,11 @@ ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
|
|||
ALL_MODULES.$(my_register_name).INSTALLED := \
|
||||
$(strip $(ALL_MODULES.$(my_register_name).INSTALLED) \
|
||||
$(LOCAL_INSTALLED_MODULE) $(my_init_rc_installed) $(my_installed_symlinks) \
|
||||
$(my_installed_test_data))
|
||||
$(my_installed_test_data) $(my_vintf_installed))
|
||||
ALL_MODULES.$(my_register_name).BUILT_INSTALLED := \
|
||||
$(strip $(ALL_MODULES.$(my_register_name).BUILT_INSTALLED) \
|
||||
$(LOCAL_BUILT_MODULE):$(LOCAL_INSTALLED_MODULE) \
|
||||
$(my_init_rc_pairs) $(my_test_data_pairs))
|
||||
$(my_init_rc_pairs) $(my_test_data_pairs) $(my_vintf_pairs))
|
||||
endif
|
||||
ifdef LOCAL_PICKUP_FILES
|
||||
# Files or directories ready to pick up by the build system
|
||||
|
|
|
@ -267,6 +267,7 @@ LOCAL_USE_AAPT2:=$(USE_AAPT2)
|
|||
LOCAL_USE_R8:=
|
||||
LOCAL_USE_VNDK:=
|
||||
LOCAL_VENDOR_MODULE:=
|
||||
LOCAL_VINTF_FRAGMENTS:=
|
||||
LOCAL_VTSC_FLAGS:=
|
||||
LOCAL_VTS_INCLUDES:=
|
||||
LOCAL_VTS_MODE:=
|
||||
|
|
|
@ -99,6 +99,9 @@ HOST_CROSS_DISPLAY := host cross
|
|||
# All installed initrc files
|
||||
ALL_INIT_RC_INSTALLED_PAIRS :=
|
||||
|
||||
# All installed vintf manifest fragments for a partition at
|
||||
ALL_VINTF_MANIFEST_FRAGMENTS_LIST:=
|
||||
|
||||
###########################################################
|
||||
## Debugging; prints a variable list to stdout
|
||||
###########################################################
|
||||
|
@ -2663,6 +2666,28 @@ $(2): $(1) $(XMLLINT)
|
|||
$$(copy-file-to-target)
|
||||
endef
|
||||
|
||||
# Copy the file only if it is a well-formed manifest file. For use viea $(eval)
|
||||
# $(1): source file
|
||||
# $(2): destination file
|
||||
define copy-vintf-manifest-checked
|
||||
$(2): $(1) $(HOST_OUT_EXECUTABLES)/assemble_vintf
|
||||
@echo "Copy xml: $$@"
|
||||
$(hide) $(HOST_OUT_EXECUTABLES)/assemble_vintf -i $$< >/dev/null # Don't print the xml file to stdout.
|
||||
$$(copy-file-to-target)
|
||||
endef
|
||||
|
||||
# Copies many vintf manifest files checked.
|
||||
# $(1): The files to copy. Each entry is a ':' separated src:dst pair
|
||||
# Evaluates to the list of the dst files (ie suitable for a dependency list)
|
||||
define copy-many-vintf-manifest-files-checked
|
||||
$(foreach f, $(1), $(strip \
|
||||
$(eval _cmf_tuple := $(subst :, ,$(f))) \
|
||||
$(eval _cmf_src := $(word 1,$(_cmf_tuple))) \
|
||||
$(eval _cmf_dest := $(word 2,$(_cmf_tuple))) \
|
||||
$(eval $(call copy-vintf-manifest-checked,$(_cmf_src),$(_cmf_dest))) \
|
||||
$(_cmf_dest)))
|
||||
endef
|
||||
|
||||
# The -t option to acp and the -p option to cp is
|
||||
# required for OSX. OSX has a ridiculous restriction
|
||||
# where it's an error for a .a file's modification time
|
||||
|
|
Loading…
Reference in a new issue