# of the shared libraries are determined.
ifdef LOCAL_INSTALLED_MODULE
ifdef installed_shared_library_module_names
-$(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += $(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(installed_shared_library_module_names))
+$(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += $(LOCAL_MODULE):$(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(installed_shared_library_module_names))
endif
endif
ALL_GPL_MODULE_LICENSE_FILES:=
# Target and host installed module's dependencies on shared libraries.
-# They are list of "<installed_file>:lib1,lib2...".
+# They are list of "<module_name>:<installed_file>:lib1,lib2...".
TARGET_DEPENDENCIES_ON_SHARED_LIBRARIES :=
HOST_DEPENDENCIES_ON_SHARED_LIBRARIES :=
$(eval p := $(subst :,$(space),$(m))) \
$(eval r := $(filter $(TARGET_OUT_ROOT)/%,$(call module-installed-files,\
$(subst $(comma),$(space),$(lastword $(p)))))) \
- $(eval $(call add-required-deps,$(firstword $(p)),$(r))))
+ $(eval $(call add-required-deps,$(word 2,$(p)),$(r))))
$(foreach m,$(HOST_DEPENDENCIES_ON_SHARED_LIBRARIES), \
$(eval p := $(subst :,$(space),$(m))) \
$(eval r := $(filter $(HOST_OUT_ROOT)/%,$(call module-installed-files,\
$(subst $(comma),$(space),$(lastword $(p)))))) \
- $(eval $(call add-required-deps,$(firstword $(p)),$(r))))
+ $(eval $(call add-required-deps,$(word 2,$(p)),$(r))))
m :=
r :=
# of the shared libraries are determined.
ifdef LOCAL_INSTALLED_MODULE
ifdef LOCAL_SHARED_LIBRARIES
-$(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += $(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(LOCAL_SHARED_LIBRARIES))
+$(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += $(LOCAL_MODULE):$(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(LOCAL_SHARED_LIBRARIES))
endif
endif
_vendor_check_modules := $(sort $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES))
$(call expand-required-modules,_vendor_check_modules,$(_vendor_check_modules))
+# Expand the target modules installed via LOCAL_SHARED_LIBRARIES
+# $(1): the list of modules to expand.
+define expand-required-shared-libraries
+$(eval _ersl_new_modules := $(filter $(addsuffix :%,$(1)),$(TARGET_DEPENDENCIES_ON_SHARED_LIBRARIES)))\
+$(eval _ersl_new_modules := $(foreach p,$(_ersl_new_modules),$(word 3,$(subst :,$(space),$(p)))))\
+$(eval _ersl_new_modules := $(sort $(subst $(comma),$(space),$(_ersl_new_modules))))\
+$(eval _ersl_new_modules := $(filter-out $(_vendor_check_modules),$(_ersl_new_modules)))\
+$(if $(_ersl_new_modules),$(eval _vendor_check_modules += $(_ersl_new_modules))\
+ $(call expand-required-shared-libraries,$(_ersl_new_modules)))
+endef
+$(call expand-required-shared-libraries,$(_vendor_check_modules))
+
_vendor_module_owner_info :=
# Restrict owners
ifneq (,$(filter true owner all, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_RESTRICT_VENDOR_FILES)))