From ff019aa4cff6f8636102003ac14de5442ea6758f Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 29 Mar 2016 17:32:06 -0700 Subject: Remove extension from LOCAL_MODULE_STEM LOCAL_MODULE_STEM adds the expected extension to the installation path, remove the extension from the filename. Change-Id: I54dbcfa73d8d07fc3630caf2d582160003e28f79 (cherry picked from commit bf305dea81d301bee644416b325196bb68bd4878) --- cc/androidmk.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cc/androidmk.go b/cc/androidmk.go index 8b1b349c..af8347af 100644 --- a/cc/androidmk.go +++ b/cc/androidmk.go @@ -115,8 +115,10 @@ func (test *testLinker) AndroidMk(ret *common.AndroidMkData) { func (installer *baseInstaller) AndroidMk(ret *common.AndroidMkData) { ret.Extra = append(ret.Extra, func(w io.Writer, outputFile common.Path) error { path := installer.path.RelPathString() - fmt.Fprintln(w, "LOCAL_MODULE_PATH := $(OUT_DIR)/"+filepath.Dir(path)) - fmt.Fprintln(w, "LOCAL_MODULE_STEM := "+filepath.Base(path)) + dir, file := filepath.Split(path) + stem := strings.TrimSuffix(file, filepath.Ext(file)) + fmt.Fprintln(w, "LOCAL_MODULE_PATH := $(OUT_DIR)/"+dir) + fmt.Fprintln(w, "LOCAL_MODULE_STEM := "+stem) return nil }) } -- cgit v1.2.3