Define non-system module as variable
Define non_system_module in base_rules.mk when the module is product, vendor,
product_services or proprietary module.
Bug: 74699609
Test: m -j
Change-Id: Iebdd3ec8c643be3d9877b7a96cbdd83465fa3878
diff --git a/core/package_internal.mk b/core/package_internal.mk
index 31cb01e..47f790f 100644
--- a/core/package_internal.mk
+++ b/core/package_internal.mk
@@ -574,9 +574,7 @@
# Run veridex on product, product_services and vendor modules.
# We skip it for unbundled app builds where we cannot build veridex.
module_run_appcompat :=
-ifeq (true,$(filter true, \
- $(LOCAL_PRODUCT_MODULE) $(LOCAL_PRODUCT_SERVICES_MODULE) \
- $(LOCAL_VENDOR_MODULE) $(LOCAL_PROPRIETARY_MODULE)))
+ifeq (true,$(non_system_module))
ifeq (,$(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK))) # ! unbundled app build
module_run_appcompat := true
endif