From d54129e3db9a8ece3d0782c0f931a72c6510ebad Mon Sep 17 00:00:00 2001 From: Daniel Tsai Date: Thu, 17 Oct 2013 16:20:56 +0800 Subject: [PATCH] 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 --- core/multi_prebuilt.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/multi_prebuilt.mk b/core/multi_prebuilt.mk index be60e2f1a..bc85cea4a 100644 --- a/core/multi_prebuilt.mk +++ b/core/multi_prebuilt.mk @@ -69,7 +69,11 @@ $(foreach t,$(1), \ $(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)), \