Commit 2d13e1f1 authored by Alex Brainman's avatar Alex Brainman

build: use correct go-tool directory location

R=golang-dev, rsc, cw, rsc
CC=golang-dev
https://golang.org/cl/5576070
parent a94bd4d7
...@@ -38,4 +38,4 @@ install-darwin: $(TARG) ...@@ -38,4 +38,4 @@ install-darwin: $(TARG)
@true @true
install-default: $(TARG) install-default: $(TARG)
cp $(TARG) "$(GOBIN)"/go-tool/$(TARG) cp $(TARG) "$(GOROOT)"/bin/go-tool/$(TARG)
...@@ -9,6 +9,7 @@ import ( ...@@ -9,6 +9,7 @@ import (
"go/build" "go/build"
"os" "os"
"os/exec" "os/exec"
"path/filepath"
"sort" "sort"
"strings" "strings"
) )
...@@ -28,7 +29,7 @@ For more about each tool command, see 'go tool command -h'. ...@@ -28,7 +29,7 @@ For more about each tool command, see 'go tool command -h'.
var ( var (
toolGoos = build.DefaultContext.GOOS toolGoos = build.DefaultContext.GOOS
toolIsWindows = toolGoos == "windows" toolIsWindows = toolGoos == "windows"
toolBinToolDir = build.Path[0].BinDir() + "/go-tool" toolBinToolDir = filepath.Join(build.Path[0].Path, "bin", "go-tool")
) )
const toolWindowsExtension = ".exe" const toolWindowsExtension = ".exe"
......
...@@ -32,7 +32,7 @@ install-darwin: $(TARG) ...@@ -32,7 +32,7 @@ install-darwin: $(TARG)
@true @true
install-default: $(TARG) install-default: $(TARG)
cp $(TARG) "$(GOBIN)"/go-tool/$(TARG) cp $(TARG) "$(GOROOT)"/bin/go-tool/$(TARG)
install-pprof: pprof install-pprof: pprof
cp pprof "$(GOBIN)"/go-tool/pprof cp pprof "$(GOROOT)"/bin/go-tool/pprof
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment