mirror of
https://github.com/golang/go
synced 2024-11-21 21:44:40 -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:
parent
a94bd4d7c3
commit
2d13e1f16e
@ -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 (
|
|||||||
"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'.
|
|||||||
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)
|
|||||||
@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
|
||||||
|
Loading…
Reference in New Issue
Block a user