Merge "Define PRODUCT_PRODUCT_VNDK_VERSION automatically"
am: 975b42501f
Change-Id: I91407c88913400bd5cfb2b9d2bb3ec685991e788
This commit is contained in:
@@ -33,8 +33,8 @@ math-expect :=
|
|||||||
math-expect-error :=
|
math-expect-error :=
|
||||||
|
|
||||||
# Run the math tests with:
|
# Run the math tests with:
|
||||||
# make -f ${ANDROID_BUILD_TOP}/build/make/core/math.mk RUN_MATH_TESTS=true
|
# make -f ${ANDROID_BUILD_TOP}/build/make/common/math.mk RUN_MATH_TESTS=true
|
||||||
# $(get_build_var CKATI) -f ${ANDROID_BUILD_TOP}//build/make/core/math.mk RUN_MATH_TESTS=true
|
# $(get_build_var CKATI) -f ${ANDROID_BUILD_TOP}//build/make/common/math.mk RUN_MATH_TESTS=true
|
||||||
ifdef RUN_MATH_TESTS
|
ifdef RUN_MATH_TESTS
|
||||||
MATH_TEST_FAILURE :=
|
MATH_TEST_FAILURE :=
|
||||||
MATH_TEST_ERROR :=
|
MATH_TEST_ERROR :=
|
||||||
@@ -134,6 +134,10 @@ define math_gt_or_eq
|
|||||||
$(if $(filter $(1),$(call math_max,$(1),$(2))),true)
|
$(if $(filter $(1),$(call math_max,$(1),$(2))),true)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define math_gt
|
||||||
|
$(if $(call math_gt_or_eq,$(2),$(1)),,true)
|
||||||
|
endef
|
||||||
|
|
||||||
define math_lt
|
define math_lt
|
||||||
$(if $(call math_gt_or_eq,$(1),$(2)),,true)
|
$(if $(call math_gt_or_eq,$(1),$(2)),,true)
|
||||||
endef
|
endef
|
||||||
@@ -141,6 +145,12 @@ endef
|
|||||||
$(call math-expect-true,(call math_gt_or_eq, 2, 1))
|
$(call math-expect-true,(call math_gt_or_eq, 2, 1))
|
||||||
$(call math-expect-true,(call math_gt_or_eq, 1, 1))
|
$(call math-expect-true,(call math_gt_or_eq, 1, 1))
|
||||||
$(call math-expect-false,(call math_gt_or_eq, 1, 2))
|
$(call math-expect-false,(call math_gt_or_eq, 1, 2))
|
||||||
|
$(call math-expect-true,(call math_gt, 4, 3))
|
||||||
|
$(call math-expect-false,(call math_gt, 5, 5))
|
||||||
|
$(call math-expect-false,(call math_gt, 6, 7))
|
||||||
|
$(call math-expect-false,(call math_lt, 1, 0))
|
||||||
|
$(call math-expect-false,(call math_lt, 8, 8))
|
||||||
|
$(call math-expect-true,(call math_lt, 10, 11))
|
||||||
|
|
||||||
# $1 is the variable name to increment
|
# $1 is the variable name to increment
|
||||||
define inc_and_print
|
define inc_and_print
|
||||||
|
@@ -710,19 +710,37 @@ ifneq ($(PRODUCT_USE_VNDK_OVERRIDE),)
|
|||||||
PRODUCT_USE_VNDK := $(PRODUCT_USE_VNDK_OVERRIDE)
|
PRODUCT_USE_VNDK := $(PRODUCT_USE_VNDK_OVERRIDE)
|
||||||
else ifeq ($(PRODUCT_SHIPPING_API_LEVEL),)
|
else ifeq ($(PRODUCT_SHIPPING_API_LEVEL),)
|
||||||
# No shipping level defined
|
# No shipping level defined
|
||||||
else ifeq ($(call math_gt_or_eq,27,$(PRODUCT_SHIPPING_API_LEVEL)),)
|
else ifeq ($(call math_gt,$(PRODUCT_SHIPPING_API_LEVEL),27),true)
|
||||||
PRODUCT_USE_VNDK := $(PRODUCT_FULL_TREBLE)
|
PRODUCT_USE_VNDK := $(PRODUCT_FULL_TREBLE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Define PRODUCT_PRODUCT_VNDK_VERSION if PRODUCT_USE_VNDK is true and
|
||||||
|
# PRODUCT_SHIPPING_API_LEVEL is greater than 29.
|
||||||
|
PRODUCT_USE_PRODUCT_VNDK := false
|
||||||
ifeq ($(PRODUCT_USE_VNDK),true)
|
ifeq ($(PRODUCT_USE_VNDK),true)
|
||||||
|
ifneq ($(PRODUCT_USE_PRODUCT_VNDK_OVERRIDE),)
|
||||||
|
PRODUCT_USE_PRODUCT_VNDK := $(PRODUCT_USE_PRODUCT_VNDK_OVERRIDE)
|
||||||
|
else ifeq ($(PRODUCT_SHIPPING_API_LEVEL),)
|
||||||
|
# No shipping level defined
|
||||||
|
else ifeq ($(call math_gt,$(PRODUCT_SHIPPING_API_LEVEL),29),true)
|
||||||
|
PRODUCT_USE_PRODUCT_VNDK := true
|
||||||
|
endif
|
||||||
|
|
||||||
ifndef BOARD_VNDK_VERSION
|
ifndef BOARD_VNDK_VERSION
|
||||||
BOARD_VNDK_VERSION := current
|
BOARD_VNDK_VERSION := current
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(PRODUCT_USE_PRODUCT_VNDK),true)
|
||||||
|
ifndef PRODUCT_PRODUCT_VNDK_VERSION
|
||||||
|
PRODUCT_PRODUCT_VNDK_VERSION := current
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(KATI_obsolete_var PRODUCT_USE_VNDK_OVERRIDE,Use PRODUCT_USE_VNDK instead)
|
$(KATI_obsolete_var PRODUCT_USE_VNDK,Use BOARD_VNDK_VERSION instead)
|
||||||
.KATI_READONLY := \
|
$(KATI_obsolete_var PRODUCT_USE_VNDK_OVERRIDE,Use BOARD_VNDK_VERSION instead)
|
||||||
PRODUCT_USE_VNDK
|
$(KATI_obsolete_var PRODUCT_USE_PRODUCT_VNDK,Use PRODUCT_PRODUCT_VNDK_VERSION instead)
|
||||||
|
$(KATI_obsolete_var PRODUCT_USE_PRODUCT_VNDK_OVERRIDE,Use PRODUCT_PRODUCT_VNDK_VERSION instead)
|
||||||
|
|
||||||
# Set BOARD_SYSTEMSDK_VERSIONS to the latest SystemSDK version starting from P-launching
|
# Set BOARD_SYSTEMSDK_VERSIONS to the latest SystemSDK version starting from P-launching
|
||||||
# devices if unset.
|
# devices if unset.
|
||||||
|
Reference in New Issue
Block a user