From 0b1792e29b44d57a17c076ba51e5020a0e5adc7e Mon Sep 17 00:00:00 2001 From: Jae Shin Date: Thu, 21 Dec 2017 19:04:13 +0900 Subject: [PATCH] Add check to ensure PLATFORM_VNDK_VERSION is set Bug: 70918357 Test: m -j vndk dist Change-Id: Ia4ae94db9feccb7c40edfe90c14eb552b69ef655 --- core/tasks/vndk.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/tasks/vndk.mk b/core/tasks/vndk.mk index 1bbd3b09c..fd7a69645 100644 --- a/core/tasks/vndk.mk +++ b/core/tasks/vndk.mk @@ -17,6 +17,9 @@ current_makefile := $(lastword $(MAKEFILE_LIST)) # BOARD_VNDK_VERSION must be set to 'current' in order to generate a VNDK snapshot. ifeq ($(BOARD_VNDK_VERSION),current) +# PLATFORM_VNDK_VERSION must be set. +ifneq (,$(PLATFORM_VNDK_VERSION)) + # Returns arch-specific libclang_rt.ubsan* library name. # Because VNDK_CORE_LIBRARIES includes all arch variants for libclang_rt.ubsan* # libs, the arch-specific libs are selected separately. @@ -233,6 +236,15 @@ vndk_snapshot_dependencies := # vndk_snapshot_arch_2ND := # endif +else # PLATFORM_VNDK_VERSION is NOT set + +.PHONY: vndk +vndk: + $(call echo-error,$(current_makefile),CANNOT generate VNDK snapshot. PLATFORM_VNDK_VERSION must be set.) + exit 1 + +endif # PLATFORM_VNDK_VERSION + else # BOARD_VNDK_VERSION is NOT set to 'current' .PHONY: vndk