mirror of
https://github.com/golang/go
synced 2024-11-19 18:14:40 -07:00
goinstall: undo 1ad616fb313d (always rebuild...)
CL 4627051 is a better way of doing the same thing. R=golang-dev, r CC=golang-dev https://golang.org/cl/4654045
This commit is contained in:
parent
524d02cbca
commit
f338d9f73b
@ -150,7 +150,7 @@ func logPackage(pkg string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// install installs the package named by path, which is needed by parent.
|
// install installs the package named by path, which is needed by parent.
|
||||||
func install(pkg, parent string) (built bool) {
|
func install(pkg, parent string) {
|
||||||
// Make sure we're not already trying to install pkg.
|
// Make sure we're not already trying to install pkg.
|
||||||
switch visit[pkg] {
|
switch visit[pkg] {
|
||||||
case done:
|
case done:
|
||||||
@ -201,12 +201,9 @@ func install(pkg, parent string) (built bool) {
|
|||||||
errorf("%s: package has no files\n", pkg)
|
errorf("%s: package has no files\n", pkg)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var depBuilt bool
|
|
||||||
for _, p := range dirInfo.Imports {
|
for _, p := range dirInfo.Imports {
|
||||||
if p != "C" {
|
if p != "C" {
|
||||||
if install(p, pkg) {
|
install(p, pkg)
|
||||||
depBuilt = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if errors {
|
if errors {
|
||||||
@ -227,13 +224,12 @@ func install(pkg, parent string) (built bool) {
|
|||||||
script.Clean()
|
script.Clean()
|
||||||
}
|
}
|
||||||
if *doInstall {
|
if *doInstall {
|
||||||
if depBuilt || script.Stale() {
|
if script.Stale() {
|
||||||
printf("%s: install\n", pkg)
|
printf("%s: install\n", pkg)
|
||||||
if err := script.Run(); err != nil {
|
if err := script.Run(); err != nil {
|
||||||
errorf("%s: install: %v\n", pkg, err)
|
errorf("%s: install: %v\n", pkg, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
built = true
|
|
||||||
} else {
|
} else {
|
||||||
printf("%s: up-to-date\n", pkg)
|
printf("%s: up-to-date\n", pkg)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user