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/copy_headers.mk b/core/copy_headers.mk
index c457eb0..397ea62 100644
--- a/core/copy_headers.mk
+++ b/core/copy_headers.mk
@@ -13,13 +13,12 @@
$(call pretty-error,Modules using LOCAL_SDK_VERSION may not use LOCAL_COPY_HEADERS)
endif
-include $(BUILD_SYSTEM)/local_vndk.mk
+include $(BUILD_SYSTEM)/local_vendor_product.mk
-# If we're using the VNDK, only vendor modules using the VNDK may use
-# LOCAL_COPY_HEADERS. Platform libraries will not have the include path
-# present.
-ifndef LOCAL_USE_VNDK
- $(call pretty-error,Only vendor modules using LOCAL_USE_VNDK may use LOCAL_COPY_HEADERS)
+# Modules in vendor or product may use LOCAL_COPY_HEADERS.
+# Platform libraries will not have the include path present.
+ifeq ($(call module-in-vendor-or-product),)
+ $(call pretty-error,Only modules in vendor or product may use LOCAL_COPY_HEADERS)
endif
# Clean up LOCAL_COPY_HEADERS_TO, since soong_ui will be comparing cleaned