Reapply "Rename LOCAL_USE_VNDK"
LOCAL_USE_VNDK property refers if the module uses VNDK, and this
property is being used to check if the module is installed in vendor or
product. However, the term no longer makes sense with VNDK deprecation,
so it should be renamed. Similar to change in aosp/2897612, rename
LOCAL_USE_VNDK as LOCAL_IN_VENDOR or LOCAL_IN_PRODUCT.
Bug: 316829758
Test: AOSP CF build succeeded
Change-Id: I2da2e2027ccabbcfbb444abc6828addeb3b22e13
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 44e1c7a..07e1afb 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -120,7 +120,7 @@
$(LOCAL_VENDOR_MODULE) \
$(LOCAL_PROPRIETARY_MODULE))
-include $(BUILD_SYSTEM)/local_vndk.mk
+include $(BUILD_SYSTEM)/local_vendor_product.mk
# local_current_sdk needs to run before local_systemsdk because the former may override
# LOCAL_SDK_VERSION which is used by the latter.
@@ -1095,10 +1095,10 @@
## When compiling against API imported module, use API import stub
## libraries.
##########################################################################
-ifneq ($(LOCAL_USE_VNDK),)
+ifneq ($(call module-in-vendor-or-product),)
ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
apiimport_postfix := .apiimport
- ifeq ($(LOCAL_USE_VNDK_PRODUCT),true)
+ ifeq ($(LOCAL_IN_PRODUCT),true)
apiimport_postfix := .apiimport.product
else
apiimport_postfix := .apiimport.vendor
@@ -1113,7 +1113,7 @@
## When compiling against the VNDK, add the .vendor or .product suffix to
## required modules.
##########################################################################
-ifneq ($(LOCAL_USE_VNDK),)
+ifneq ($(call module-in-vendor-or-product),)
#####################################################
## Soong modules may be built three times, once for
## /system, once for /vendor and once for /product.
@@ -1124,7 +1124,7 @@
# We don't do this renaming for soong-defined modules since they already
# have correct names (with .vendor or .product suffix when necessary) in
# their LOCAL_*_LIBRARIES.
- ifeq ($(LOCAL_USE_VNDK_PRODUCT),true)
+ ifeq ($(LOCAL_IN_PRODUCT),true)
my_required_modules := $(foreach l,$(my_required_modules),\
$(if $(SPLIT_PRODUCT.SHARED_LIBRARIES.$(l)),$(l).product,$(l)))
else