1
0
mirror of https://github.com/golang/go synced 2024-11-24 22:57:57 -07:00

build: use correct go-tool directory location

R=golang-dev, rsc, cw, rsc
CC=golang-dev
https://golang.org/cl/5576070
This commit is contained in:
Alex Brainman 2012-01-30 16:43:28 +11:00
parent a94bd4d7c3
commit 2d13e1f16e
3 changed files with 5 additions and 4 deletions

View File

@ -38,4 +38,4 @@ install-darwin: $(TARG)
@true
install-default: $(TARG)
cp $(TARG) "$(GOBIN)"/go-tool/$(TARG)
cp $(TARG) "$(GOROOT)"/bin/go-tool/$(TARG)

View File

@ -9,6 +9,7 @@ import (
"go/build"
"os"
"os/exec"
"path/filepath"
"sort"
"strings"
)
@ -28,7 +29,7 @@ For more about each tool command, see 'go tool command -h'.
var (
toolGoos = build.DefaultContext.GOOS
toolIsWindows = toolGoos == "windows"
toolBinToolDir = build.Path[0].BinDir() + "/go-tool"
toolBinToolDir = filepath.Join(build.Path[0].Path, "bin", "go-tool")
)
const toolWindowsExtension = ".exe"

View File

@ -32,7 +32,7 @@ install-darwin: $(TARG)
@true
install-default: $(TARG)
cp $(TARG) "$(GOBIN)"/go-tool/$(TARG)
cp $(TARG) "$(GOROOT)"/bin/go-tool/$(TARG)
install-pprof: pprof
cp pprof "$(GOBIN)"/go-tool/pprof
cp pprof "$(GOROOT)"/bin/go-tool/pprof