summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2019-10-02 16:01:35 -0700
committerColin Cross <ccross@android.com>2019-10-03 10:07:53 -0700
commitff6c33d885c8a8132728853a8bd2cfd73988b660 (patch)
treee03b3c96fe0dda755920e6f8f9a97e1e5febea10 /python
parent70dda7e3da7eed09c1c7e0a3ab8b2ed3c9934035 (diff)
Replace RelPathString() with ToMakePath()
Add a ToMakePath() method that returns a new path that points out out/ instead of out/soong/, and replace the "$(OUT_DIR)/" + path.RelPathString() pattern with path.ToMakePath().String() Bug: 141877526 Test: m checkbuild Change-Id: I391b9f2ed78c83a58d905d48355ce9b01d610d16
Diffstat (limited to 'python')
-rw-r--r--python/androidmk.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/python/androidmk.go b/python/androidmk.go
index 1e51e7b8a..aae7cedc9 100644
--- a/python/androidmk.go
+++ b/python/androidmk.go
@@ -89,12 +89,11 @@ func (installer *pythonInstaller) AndroidMk(base *Module, ret *android.AndroidMk
ret.Required = append(ret.Required, "libc++")
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) {
- path := installer.path.RelPathString()
- dir, file := filepath.Split(path)
+ path, file := filepath.Split(installer.path.ToMakePath().String())
stem := strings.TrimSuffix(file, filepath.Ext(file))
fmt.Fprintln(w, "LOCAL_MODULE_SUFFIX := "+filepath.Ext(file))
- fmt.Fprintln(w, "LOCAL_MODULE_PATH := $(OUT_DIR)/"+filepath.Clean(dir))
+ fmt.Fprintln(w, "LOCAL_MODULE_PATH := "+path)
fmt.Fprintln(w, "LOCAL_MODULE_STEM := "+stem)
fmt.Fprintln(w, "LOCAL_SHARED_LIBRARIES := "+strings.Join(installer.androidMkSharedLibs, " "))
})