Do not set BOARD_VNDK_VERSION and PLATFORM_VNDK_VERSION
Do not set BOARD_VNDK_VERSION and PLATFORM_VNDK_VERSION if VNDK is
deprecated. BOARD_VNDK_VERSION and PLATFORM_VNDK_VERSION should not be
used once VNDK is deprecated with KEEP_VNDK=false
Bug: 316829758
Test: AOSP CF build succeeded
Change-Id: Iead60663bed3653e63e7a444a873cfaea50780b0
diff --git a/core/board_config.mk b/core/board_config.mk
index ac9a34f..8c23f93 100644
--- a/core/board_config.mk
+++ b/core/board_config.mk
@@ -965,12 +965,15 @@
$(if $(wildcard $(vndk_path)/*/Android.bp),,$(error VNDK version $(1) not found))
endef
+ifeq ($(KEEP_VNDK),true)
ifeq ($(BOARD_VNDK_VERSION),$(PLATFORM_VNDK_VERSION))
$(error BOARD_VNDK_VERSION is equal to PLATFORM_VNDK_VERSION; use BOARD_VNDK_VERSION := current)
endif
ifneq ($(BOARD_VNDK_VERSION),current)
$(call check_vndk_version,$(BOARD_VNDK_VERSION))
endif
+endif
+
TARGET_VENDOR_TEST_SUFFIX := /vendor
ifeq (,$(TARGET_BUILD_UNBUNDLED))