var (
argv0 = os.Args[0]
errors = false
- gobin = os.Getenv("GOBIN")
parents = make(map[string]string)
root = runtime.GOROOT()
visit = make(map[string]status)
fmt.Fprintf(os.Stderr, "%s: no $GOROOT\n", argv0)
os.Exit(1)
}
- if gobin == "" {
- gobin = root + "/bin"
- }
root += "/src/pkg/"
// special case - "unsafe" is already installed
if local {
_, err := os.Stat(dir + "/Makefile")
if err == nil {
- return run(dir, nil, gobin+"/gomake", "install")
+ return run(dir, nil, "gomake", "install")
}
}
makefile, err := makeMakefile(dir, pkg)
if err != nil {
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