Commit a41db431 authored by Russ Cox's avatar Russ Cox

goinstall: assume go binaries are in path

(Following new convention.)

Fixes #1063.

R=adg
CC=golang-dev
https://golang.org/cl/2115042
parent e5cf760e
...@@ -29,7 +29,6 @@ func usage() { ...@@ -29,7 +29,6 @@ func usage() {
var ( var (
argv0 = os.Args[0] argv0 = os.Args[0]
errors = false errors = false
gobin = os.Getenv("GOBIN")
parents = make(map[string]string) parents = make(map[string]string)
root = runtime.GOROOT() root = runtime.GOROOT()
visit = make(map[string]status) visit = make(map[string]status)
...@@ -57,9 +56,6 @@ func main() { ...@@ -57,9 +56,6 @@ func main() {
fmt.Fprintf(os.Stderr, "%s: no $GOROOT\n", argv0) fmt.Fprintf(os.Stderr, "%s: no $GOROOT\n", argv0)
os.Exit(1) os.Exit(1)
} }
if gobin == "" {
gobin = root + "/bin"
}
root += "/src/pkg/" root += "/src/pkg/"
// special case - "unsafe" is already installed // special case - "unsafe" is already installed
......
...@@ -21,14 +21,14 @@ func domake(dir, pkg string, local bool) os.Error { ...@@ -21,14 +21,14 @@ func domake(dir, pkg string, local bool) os.Error {
if local { if local {
_, err := os.Stat(dir + "/Makefile") _, err := os.Stat(dir + "/Makefile")
if err == nil { if err == nil {
return run(dir, nil, gobin+"/gomake", "install") return run(dir, nil, "gomake", "install")
} }
} }
makefile, err := makeMakefile(dir, pkg) makefile, err := makeMakefile(dir, pkg)
if err != nil { if err != nil {
return err return err
} }
return run(dir, makefile, gobin+"/gomake", "-f-", "install") return run(dir, makefile, "gomake", "-f-", "install")
} }
// makeMakefile computes the standard Makefile for the directory dir // makeMakefile computes the standard Makefile for the directory dir
......
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