]> Cypherpunks repositories - gostls13.git/commitdiff
build: use correct go-tool directory location
authorAlex Brainman <alex.brainman@gmail.com>
Mon, 30 Jan 2012 05:43:28 +0000 (16:43 +1100)
committerAlex Brainman <alex.brainman@gmail.com>
Mon, 30 Jan 2012 05:43:28 +0000 (16:43 +1100)
R=golang-dev, rsc, cw, rsc
CC=golang-dev
https://golang.org/cl/5576070

src/cmd/cov/Makefile
src/cmd/go/tool.go
src/cmd/prof/Makefile

index 616e94f647d8b1eff46b5679378d25bef2f8a341..eb5298663f11b57ce9dc8f4ec4234639bd6f25bd 100644 (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)
index 12be9a8036c4bf5fd894a9bc2a4cf1203e63e2f0..869a40dd18ab715ea732a66065e591cfe5d33458 100644 (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"
index 9266814a0a868a5dddb1b6954b5f1759a1eea01a..195525c28001fba37ca34c174fb86095a22591bf 100644 (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