Set PRODUCT_PRODUCT_VNDK_VERSION from product_config.mk
As a product variable, PRODUCT_PRODUCT_VNDK_VERSION cannot be defined in config.mk. Instead it can be defined from product_config.mk. Bug: 144534640 Test: check if the following command returns empty value $ PRODUCT_USE_PRODUCT_VNDK_OVERRIDE=false \ get_build_var PRODUCT_PRODUCT_VNDK_VERSION Change-Id: I304fb980610aec1dd5da05864b4c137997fc9aff
This commit is contained in:
parent
49fe034137
commit
70f7dbaf21
2 changed files with 38 additions and 19 deletions
|
@ -678,33 +678,22 @@ else ifeq ($(call math_gt,$(PRODUCT_SHIPPING_API_LEVEL),27),true)
|
|||
PRODUCT_USE_VNDK := $(PRODUCT_FULL_TREBLE)
|
||||
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)
|
||||
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
|
||||
BOARD_VNDK_VERSION := current
|
||||
endif
|
||||
|
||||
ifeq ($(PRODUCT_USE_PRODUCT_VNDK),true)
|
||||
ifndef PRODUCT_PRODUCT_VNDK_VERSION
|
||||
PRODUCT_PRODUCT_VNDK_VERSION := current
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
$(KATI_obsolete_var PRODUCT_USE_VNDK,Use BOARD_VNDK_VERSION instead)
|
||||
$(KATI_obsolete_var PRODUCT_USE_VNDK_OVERRIDE,Use BOARD_VNDK_VERSION instead)
|
||||
$(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)
|
||||
|
||||
ifdef PRODUCT_PRODUCT_VNDK_VERSION
|
||||
ifndef BOARD_VNDK_VERSION
|
||||
# VNDK for product partition is not available unless BOARD_VNDK_VERSION
|
||||
# defined.
|
||||
$(error PRODUCT_PRODUCT_VNDK_VERSION cannot be defined without defining BOARD_VNDK_VERSION)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Set BOARD_SYSTEMSDK_VERSIONS to the latest SystemSDK version starting from P-launching
|
||||
# devices if unset.
|
||||
|
|
|
@ -358,6 +358,12 @@ endif
|
|||
$(KATI_obsolete_var OVERRIDE_PRODUCT_EXTRA_VNDK_VERSIONS \
|
||||
,Use PRODUCT_EXTRA_VNDK_VERSIONS instead)
|
||||
|
||||
# If build command defines OVERRIDE_PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE,
|
||||
# override PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE with it unless it is
|
||||
# defined as `false`. If the value is `false` clear
|
||||
# PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE
|
||||
# OVERRIDE_PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE can be used for
|
||||
# testing only.
|
||||
ifdef OVERRIDE_PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE
|
||||
ifeq (false,$(OVERRIDE_PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE))
|
||||
PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE :=
|
||||
|
@ -367,11 +373,35 @@ ifdef OVERRIDE_PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE
|
|||
else ifeq ($(PRODUCT_SHIPPING_API_LEVEL),)
|
||||
# No shipping level defined
|
||||
else ifeq ($(call math_gt,$(PRODUCT_SHIPPING_API_LEVEL),29),true)
|
||||
# Enforce product interface if PRODUCT_SHIPPING_API_LEVEL is greater than 29.
|
||||
PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE := true
|
||||
endif
|
||||
|
||||
$(KATI_obsolete_var OVERRIDE_PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE,Use PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE instead)
|
||||
|
||||
# If build command defines PRODUCT_USE_PRODUCT_VNDK_OVERRIDE as `false`,
|
||||
# PRODUCT_PRODUCT_VNDK_VERSION will not be defined automatically.
|
||||
# PRODUCT_USE_PRODUCT_VNDK_OVERRIDE can be used for testing only.
|
||||
PRODUCT_USE_PRODUCT_VNDK := false
|
||||
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)
|
||||
# Enforce product interface for VNDK if PRODUCT_SHIPPING_API_LEVEL is greater
|
||||
# than 29.
|
||||
PRODUCT_USE_PRODUCT_VNDK := true
|
||||
endif
|
||||
|
||||
ifeq ($(PRODUCT_USE_PRODUCT_VNDK),true)
|
||||
ifndef PRODUCT_PRODUCT_VNDK_VERSION
|
||||
PRODUCT_PRODUCT_VNDK_VERSION := current
|
||||
endif
|
||||
endif
|
||||
|
||||
$(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)
|
||||
|
||||
define product-overrides-config
|
||||
$$(foreach rule,$$(PRODUCT_$(1)_OVERRIDES),\
|
||||
$$(if $$(filter 2,$$(words $$(subst :,$$(space),$$(rule)))),,\
|
||||
|
|
Loading…
Reference in a new issue