Fail when a non-vendor product references a vendor module.
Change-Id: Ia5ca233e9b11f64b72074f65899d3041cf955c4c
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 3b64d77..b13e3b5 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -568,6 +568,8 @@
$(ALL_MODULES.$(LOCAL_MODULE).EVENT_LOG_TAGS) $(event_log_tags)
ALL_MODULES.$(LOCAL_MODULE).INTERMEDIATE_SOURCE_DIR := \
$(ALL_MODULES.$(LOCAL_MODULE).INTERMEDIATE_SOURCE_DIR) $(LOCAL_INTERMEDIATE_SOURCE_DIR)
+ALL_MODULES.$(LOCAL_MODULE).MAKEFILE := \
+ $(ALL_MODULES.$(LOCAL_MODULE).MAKEFILE) $(LOCAL_MODULE_MAKEFILE)
ifdef LOCAL_MODULE_OWNER
ALL_MODULES.$(LOCAL_MODULE).OWNER := \
$(strip $(ALL_MODULES.$(LOCAL_MODULE).OWNER) $(LOCAL_MODULE_OWNER))
diff --git a/core/main.mk b/core/main.mk
index ac6442a..f76a8d1 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -622,12 +622,12 @@
# and get rid of it from this list.
# TODO: The shell is chosen by magic. Do we still need this?
modules_to_install := $(sort \
- $(ALL_DEFAULT_INSTALLED_MODULES) \
- $(product_MODULES) \
- $(foreach tag,$(tags_to_install),$($(tag)_MODULES)) \
- $(call get-tagged-modules, shell_$(TARGET_SHELL)) \
- $(CUSTOM_MODULES) \
- )
+ $(ALL_DEFAULT_INSTALLED_MODULES) \
+ $(product_MODULES) \
+ $(foreach tag,$(tags_to_install),$($(tag)_MODULES)) \
+ $(call get-tagged-modules, shell_$(TARGET_SHELL)) \
+ $(CUSTOM_MODULES) \
+ )
# Some packages may override others using LOCAL_OVERRIDES_PACKAGES.
# Filter out (do not install) any overridden packages.