aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorJustin Yun <justinyun@google.com>2019-12-20 19:17:38 +0900
committerJustin Yun <justinyun@google.com>2020-01-11 12:44:08 +0000
commit66c7af81f3e2786c9fd3129ddbfacf8a23327ebc (patch)
treef6b73305d716193f9160af7a8bca6d9988e5d8e8 /common
parentecfd19d5761e66a6458240a1998c2c208fee982a (diff)
downloadbuild_make-66c7af81f3e2786c9fd3129ddbfacf8a23327ebc.tar.gz
build_make-66c7af81f3e2786c9fd3129ddbfacf8a23327ebc.tar.bz2
build_make-66c7af81f3e2786c9fd3129ddbfacf8a23327ebc.zip
Define PRODUCT_PRODUCT_VNDK_VERSION automatically
PRODUCT_PRODUCT_VNDK_VERSION will be automatically set to true for the devices with PRODUCT_SHIPPING_API_LEVEL newer than 29. Bug: 146621746 Test: build with PRODUCT_SHIPPING_API_LEVEL set to 30 Change-Id: I78cd81d1d61e9089b163169bc495df8a880463da
Diffstat (limited to 'common')
-rw-r--r--common/math.mk14
1 files changed, 12 insertions, 2 deletions
diff --git a/common/math.mk b/common/math.mk
index ac3151e3c5..83f2218192 100644
--- a/common/math.mk
+++ b/common/math.mk
@@ -33,8 +33,8 @@ math-expect :=
math-expect-error :=
# Run the math tests with:
-# make -f ${ANDROID_BUILD_TOP}/build/make/core/math.mk RUN_MATH_TESTS=true
-# $(get_build_var CKATI) -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/common/math.mk RUN_MATH_TESTS=true
ifdef RUN_MATH_TESTS
MATH_TEST_FAILURE :=
MATH_TEST_ERROR :=
@@ -134,6 +134,10 @@ define math_gt_or_eq
$(if $(filter $(1),$(call math_max,$(1),$(2))),true)
endef
+define math_gt
+$(if $(call math_gt_or_eq,$(2),$(1)),,true)
+endef
+
define math_lt
$(if $(call math_gt_or_eq,$(1),$(2)),,true)
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, 1, 1))
$(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
define inc_and_print