build: Fix failed to assign a module name different with it's file name to a prebuilt module
Build system can not find the dependent library if assigning a
multi-prebuilt which module name is different with it's library
file name as following:
PREBUILT_LIBS := libabc_debug:libabc.a
Change-Id: I05bdc8cebcabf74195198e3cefa1b8923f87d406
diff --git a/core/multi_prebuilt.mk b/core/multi_prebuilt.mk
index be60e2f..bc85cea 100644
--- a/core/multi_prebuilt.mk
+++ b/core/multi_prebuilt.mk
@@ -69,7 +69,11 @@
$(if $(7), \
$(eval LOCAL_BUILT_MODULE_STEM := $(7)) \
, \
- $(eval LOCAL_BUILT_MODULE_STEM := $(notdir $(LOCAL_SRC_FILES))) \
+ $(if $(word 2,$(tw)), \
+ $(eval LOCAL_BUILT_MODULE_STEM := $(LOCAL_MODULE)$(suffix $(LOCAL_SRC_FILES))) \
+ , \
+ $(eval LOCAL_BUILT_MODULE_STEM := $(notdir $(LOCAL_SRC_FILES))) \
+ ) \
) \
$(eval LOCAL_MODULE_SUFFIX := $(suffix $(LOCAL_SRC_FILES))) \
$(if $(filter user,$(TARGET_BUILD_VARIANT)), \