From c9ad35ce397457729f2aa7c46fb1f07e33405ffc Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Mon, 1 May 2017 17:23:01 -0700 Subject: [PATCH] Add compatibility check for system_manifest/compatibility_matrix.xml Add compatibility check against device vintf schemas when framework schemas are built. Test: build with lunch marlin (that has manifest.xml) Test: build with mini_emulator_arm64 (that doesn't have manfiest.xml) Bug: 37321309 Change-Id: I87db152754d0185938bcef0c4395f477b8fd269b --- target/board/Android.mk | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/target/board/Android.mk b/target/board/Android.mk index 6f0731b2ce..7f8e349f32 100644 --- a/target/board/Android.mk +++ b/target/board/Android.mk @@ -71,8 +71,15 @@ LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_OUT) GEN := $(local-generated-sources-dir)/manifest.xml + +$(GEN): PRIVATE_FLAGS := +ifdef BUILT_VENDOR_MATRIX +$(GEN): $(BUILT_VENDOR_MATRIX) +$(GEN): PRIVATE_FLAGS := -c "$(BUILT_VENDOR_MATRIX)" +endif + $(GEN): $(FRAMEWORK_MANIFEST_FILE) $(HOST_OUT_EXECUTABLES)/assemble_vintf - BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) $(HOST_OUT_EXECUTABLES)/assemble_vintf -i $< -o $@ + BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) $(HOST_OUT_EXECUTABLES)/assemble_vintf -i $< -o $@ $(PRIVATE_FLAGS) LOCAL_PREBUILT_MODULE_FILE := $(GEN) include $(BUILD_PREBUILT) @@ -86,10 +93,16 @@ LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_OUT) GEN := $(local-generated-sources-dir)/compatibility_matrix.xml + +$(GEN): PRIVATE_FLAGS := +ifdef BUILT_VENDOR_MANIFEST +$(GEN): $(BUILT_VENDOR_MANIFEST) +$(GEN): PRIVATE_FLAGS := -c "$(BUILT_VENDOR_MANIFEST)" +endif + $(GEN): $(FRAMEWORK_COMPATIBILITY_MATRIX_FILE) $(HOST_OUT_EXECUTABLES)/assemble_vintf # TODO(b/37405869) (b/37715375) inject avb versions as well for devices that have avb enabled. - POLICYVERS=$(POLICYVERS) BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) $(HOST_OUT_EXECUTABLES)/assemble_vintf -i $< -o $@ - + POLICYVERS=$(POLICYVERS) BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) $(HOST_OUT_EXECUTABLES)/assemble_vintf -i $< -o $@ $(PRIVATE_FLAGS) LOCAL_PREBUILT_MODULE_FILE := $(GEN) include $(BUILD_PREBUILT) BUILT_SYSTEM_COMPATIBILITY_MATRIX := $(LOCAL_BUILT_MODULE)