Commit c1e026a5 authored by Russ Cox's avatar Russ Cox

build: quiet make.bash, make.bat, make.rc

The signal-to-noise ratio is too low.
Stop printing the name of every package.
Can still get the old output with make.bash -v.

Change-Id: Ib2c82e037166e6d2ddc31ae2a4d29af5becce574
Reviewed-on: https://go-review.googlesource.com/74351
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
parent 84dc501d
...@@ -1103,7 +1103,7 @@ func cmdbootstrap() { ...@@ -1103,7 +1103,7 @@ func cmdbootstrap() {
os.Setenv("GOOS", goos) os.Setenv("GOOS", goos)
timelog("build", "go_bootstrap") timelog("build", "go_bootstrap")
xprintf("##### Building go_bootstrap.\n") xprintf("Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.\n")
for _, dir := range buildlist { for _, dir := range buildlist {
installed[dir] = make(chan struct{}) installed[dir] = make(chan struct{})
} }
...@@ -1111,7 +1111,9 @@ func cmdbootstrap() { ...@@ -1111,7 +1111,9 @@ func cmdbootstrap() {
go install(dir) go install(dir)
} }
<-installed["cmd/go"] <-installed["cmd/go"]
xprintf("\n") if vflag > 0 {
xprintf("\n")
}
gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now
goldflags = os.Getenv("GO_LDFLAGS") goldflags = os.Getenv("GO_LDFLAGS")
...@@ -1139,7 +1141,10 @@ func cmdbootstrap() { ...@@ -1139,7 +1141,10 @@ func cmdbootstrap() {
// toolchain2 = mk(new toolchain, toolchain1, go_bootstrap) // toolchain2 = mk(new toolchain, toolchain1, go_bootstrap)
// //
timelog("build", "toolchain2") timelog("build", "toolchain2")
xprintf("\n##### Building Go toolchain2 using go_bootstrap and Go toolchain1.\n") if vflag > 0 {
xprintf("\n")
}
xprintf("Building Go toolchain2 using go_bootstrap and Go toolchain1.\n")
os.Setenv("CC", defaultcc) os.Setenv("CC", defaultcc)
if goos == oldgoos && goarch == oldgoarch { if goos == oldgoos && goarch == oldgoarch {
// Host and target are same, and we have historically // Host and target are same, and we have historically
...@@ -1171,7 +1176,10 @@ func cmdbootstrap() { ...@@ -1171,7 +1176,10 @@ func cmdbootstrap() {
// toolchain3 = mk(new toolchain, toolchain2, go_bootstrap) // toolchain3 = mk(new toolchain, toolchain2, go_bootstrap)
// //
timelog("build", "toolchain3") timelog("build", "toolchain3")
xprintf("\n##### Building Go toolchain3 using go_bootstrap and Go toolchain2.\n") if vflag > 0 {
xprintf("\n")
}
xprintf("Building Go toolchain3 using go_bootstrap and Go toolchain2.\n")
goInstall(append([]string{"-a"}, toolchain...)...) goInstall(append([]string{"-a"}, toolchain...)...)
if debug { if debug {
run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full") run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
...@@ -1183,19 +1191,28 @@ func cmdbootstrap() { ...@@ -1183,19 +1191,28 @@ func cmdbootstrap() {
if goos == oldgoos && goarch == oldgoarch { if goos == oldgoos && goarch == oldgoarch {
// Common case - not setting up for cross-compilation. // Common case - not setting up for cross-compilation.
timelog("build", "toolchain") timelog("build", "toolchain")
xprintf("\n##### Building packages and commands for %s/%s\n", goos, goarch) if vflag > 0 {
xprintf("\n")
}
xprintf("Building packages and commands for %s/%s.\n", goos, goarch)
} else { } else {
// GOOS/GOARCH does not match GOHOSTOS/GOHOSTARCH. // GOOS/GOARCH does not match GOHOSTOS/GOHOSTARCH.
// Finish GOHOSTOS/GOHOSTARCH installation and then // Finish GOHOSTOS/GOHOSTARCH installation and then
// run GOOS/GOARCH installation. // run GOOS/GOARCH installation.
timelog("build", "host toolchain") timelog("build", "host toolchain")
xprintf("\n##### Building packages and commands for host, %s/%s\n", goos, goarch) if vflag > 0 {
xprintf("\n")
}
xprintf("Building packages and commands for host, %s/%s.\n", goos, goarch)
goInstall("std", "cmd") goInstall("std", "cmd")
checkNotStale(goBootstrap, "std", "cmd") checkNotStale(goBootstrap, "std", "cmd")
checkNotStale(cmdGo, "std", "cmd") checkNotStale(cmdGo, "std", "cmd")
timelog("build", "target toolchain") timelog("build", "target toolchain")
xprintf("\n##### Building packages and commands for target, %s/%s\n", goos, goarch) if vflag > 0 {
xprintf("\n")
}
xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch)
goos = oldgoos goos = oldgoos
goarch = oldgoarch goarch = oldgoarch
os.Setenv("GOOS", goos) os.Setenv("GOOS", goos)
...@@ -1236,7 +1253,10 @@ func cmdbootstrap() { ...@@ -1236,7 +1253,10 @@ func cmdbootstrap() {
} }
func goInstall(args ...string) { func goInstall(args ...string) {
installCmd := []string{pathf("%s/go_bootstrap", tooldir), "install", "-v", "-gcflags=" + gogcflags, "-ldflags=" + goldflags} installCmd := []string{pathf("%s/go_bootstrap", tooldir), "install", "-gcflags=" + gogcflags, "-ldflags=" + goldflags}
if vflag > 0 {
installCmd = append(installCmd, "-v")
}
// Force only one process at a time on vx32 emulation. // Force only one process at a time on vx32 emulation.
if gohostos == "plan9" && os.Getenv("sysname") == "vx32" { if gohostos == "plan9" && os.Getenv("sysname") == "vx32" {
...@@ -1383,7 +1403,9 @@ func cmdbanner() { ...@@ -1383,7 +1403,9 @@ func cmdbanner() {
} }
func banner() { func banner() {
xprintf("\n") if vflag > 0 {
xprintf("\n")
}
xprintf("---\n") xprintf("---\n")
xprintf("Installed Go for %s/%s in %s\n", goos, goarch, goroot) xprintf("Installed Go for %s/%s in %s\n", goos, goarch, goroot)
xprintf("Installed commands in %s\n", gobin) xprintf("Installed commands in %s\n", gobin)
......
...@@ -106,7 +106,7 @@ func bootstrapBuildTools() { ...@@ -106,7 +106,7 @@ func bootstrapBuildTools() {
if goroot_bootstrap == "" { if goroot_bootstrap == "" {
goroot_bootstrap = pathf("%s/go1.4", os.Getenv("HOME")) goroot_bootstrap = pathf("%s/go1.4", os.Getenv("HOME"))
} }
xprintf("##### Building Go toolchain1 using %s.\n", goroot_bootstrap) xprintf("Building Go toolchain1 using %s.\n", goroot_bootstrap)
mkzbootstrap(pathf("%s/src/cmd/internal/objabi/zbootstrap.go", goroot)) mkzbootstrap(pathf("%s/src/cmd/internal/objabi/zbootstrap.go", goroot))
...@@ -183,7 +183,9 @@ func bootstrapBuildTools() { ...@@ -183,7 +183,9 @@ func bootstrapBuildTools() {
"install", "install",
"-gcflags=-l", "-gcflags=-l",
"-tags=math_big_pure_go compiler_bootstrap", "-tags=math_big_pure_go compiler_bootstrap",
"-v", }
if vflag > 0 {
cmd = append(cmd, "-v")
} }
if tool := os.Getenv("GOBOOTSTRAP_TOOLEXEC"); tool != "" { if tool := os.Getenv("GOBOOTSTRAP_TOOLEXEC"); tool != "" {
cmd = append(cmd, "-toolexec="+tool) cmd = append(cmd, "-toolexec="+tool)
...@@ -202,7 +204,9 @@ func bootstrapBuildTools() { ...@@ -202,7 +204,9 @@ func bootstrapBuildTools() {
} }
} }
xprintf("\n") if vflag > 0 {
xprintf("\n")
}
} }
var ssaRewriteFileSubstring = filepath.FromSlash("src/cmd/compile/internal/ssa/rewrite") var ssaRewriteFileSubstring = filepath.FromSlash("src/cmd/compile/internal/ssa/rewrite")
......
...@@ -125,10 +125,20 @@ rm -f ./runtime/runtime_defs.go ...@@ -125,10 +125,20 @@ rm -f ./runtime/runtime_defs.go
# Finally! Run the build. # Finally! Run the build.
echo '##### Building Go bootstrap tool.' verbose=false
echo cmd/dist vflag=""
export GOROOT="$(cd .. && pwd)" if [ "$1" = "-v" ]; then
verbose=true
vflag=-v
shift
fi
export GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:-$HOME/go1.4} export GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:-$HOME/go1.4}
echo "Building Go cmd/dist using $GOROOT_BOOTSTRAP."
if $verbose; then
echo cmd/dist
fi
export GOROOT="$(cd .. && pwd)"
for go_exe in $(type -ap go); do for go_exe in $(type -ap go); do
if [ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]; then if [ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]; then
goroot=$(GOROOT='' $go_exe env GOROOT) goroot=$(GOROOT='' $go_exe env GOROOT)
...@@ -156,7 +166,9 @@ if [ "$FAIL" = true ]; then ...@@ -156,7 +166,9 @@ if [ "$FAIL" = true ]; then
exit 1 exit 1
fi fi
echo if $verbose; then
echo
fi
if [ "$1" = "--dist-tool" ]; then if [ "$1" = "--dist-tool" ]; then
# Stop after building dist tool. # Stop after building dist tool.
...@@ -177,7 +189,7 @@ fi ...@@ -177,7 +189,7 @@ fi
# Run dist bootstrap to complete make.bash. # Run dist bootstrap to complete make.bash.
# Bootstrap installs a proper cmd/dist, built with the new toolchain. # Bootstrap installs a proper cmd/dist, built with the new toolchain.
# Throw ours, built with Go 1.4, away after bootstrap. # Throw ours, built with Go 1.4, away after bootstrap.
./cmd/dist/dist bootstrap $buildall -v $GO_DISTFLAGS "$@" ./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
rm -f ./cmd/dist/dist rm -f ./cmd/dist/dist
# DO NOT ADD ANY NEW CODE HERE. # DO NOT ADD ANY NEW CODE HERE.
......
...@@ -41,6 +41,8 @@ ...@@ -41,6 +41,8 @@
:: unless invoked with --no-local. :: unless invoked with --no-local.
if x%1==x--no-local goto nolocal if x%1==x--no-local goto nolocal
if x%2==x--no-local goto nolocal if x%2==x--no-local goto nolocal
if x%3==x--no-local goto nolocal
if x%4==x--no-local goto nolocal
setlocal setlocal
:nolocal :nolocal
...@@ -58,12 +60,17 @@ del /F ".\pkg\runtime\runtime_defs.go" 2>NUL ...@@ -58,12 +60,17 @@ del /F ".\pkg\runtime\runtime_defs.go" 2>NUL
cd .. cd ..
set GOROOT=%CD% set GOROOT=%CD%
cd src cd src
set vflag=
if x%1==x-v set vflag=-v
if x%2==x-v set vflag=-v
if x%3==x-v set vflag=-v
if x%4==x-v set vflag=-v
echo ##### Building Go bootstrap tool.
echo cmd/dist
if not exist ..\bin\tool mkdir ..\bin\tool if not exist ..\bin\tool mkdir ..\bin\tool
if "x%GOROOT_BOOTSTRAP%"=="x" set GOROOT_BOOTSTRAP=%HOMEDRIVE%%HOMEPATH%\Go1.4 if "x%GOROOT_BOOTSTRAP%"=="x" set GOROOT_BOOTSTRAP=%HOMEDRIVE%%HOMEPATH%\Go1.4
if not exist "%GOROOT_BOOTSTRAP%\bin\go.exe" goto bootstrapfail if not exist "%GOROOT_BOOTSTRAP%\bin\go.exe" goto bootstrapfail
echo Building Go cmd/dist using %GOROOT_BOOTSTRAP%
if x%vflag==x-v echo cmd/dist
setlocal setlocal
set GOROOT=%GOROOT_BOOTSTRAP% set GOROOT=%GOROOT_BOOTSTRAP%
set GOOS= set GOOS=
...@@ -76,21 +83,27 @@ if errorlevel 1 goto fail ...@@ -76,21 +83,27 @@ if errorlevel 1 goto fail
if errorlevel 1 goto fail if errorlevel 1 goto fail
call env.bat call env.bat
del env.bat del env.bat
echo. if x%vflag==x-v echo.
if x%1==x--dist-tool goto copydist if x%1==x--dist-tool goto copydist
if x%2==x--dist-tool goto copydist if x%2==x--dist-tool goto copydist
if x%3==x--dist-tool goto copydist
if x%4==x--dist-tool goto copydist
set buildall=-a set buildall=-a
if x%1==x--no-clean set buildall= if x%1==x--no-clean set buildall=
if x%2==x--no-clean set buildall= if x%2==x--no-clean set buildall=
if x%3==x--no-clean set buildall=
if x%4==x--no-clean set buildall=
if x%1==x--no-banner set buildall=%buildall% --no-banner if x%1==x--no-banner set buildall=%buildall% --no-banner
if x%2==x--no-banner set buildall=%buildall% --no-banner if x%2==x--no-banner set buildall=%buildall% --no-banner
if x%3==x--no-banner set buildall=%buildall% --no-banner
if x%4==x--no-banner set buildall=%buildall% --no-banner
:: Run dist bootstrap to complete make.bash. :: Run dist bootstrap to complete make.bash.
:: Bootstrap installs a proper cmd/dist, built with the new toolchain. :: Bootstrap installs a proper cmd/dist, built with the new toolchain.
:: Throw ours, built with Go 1.4, away after bootstrap. :: Throw ours, built with Go 1.4, away after bootstrap.
.\cmd\dist\dist bootstrap %buildall% -v .\cmd\dist\dist bootstrap %vflag% %buildall%
if errorlevel 1 goto fail if errorlevel 1 goto fail
del .\cmd\dist\dist.exe del .\cmd\dist\dist.exe
goto end goto end
......
...@@ -41,8 +41,13 @@ rm -f ./runtime/runtime_defs.go ...@@ -41,8 +41,13 @@ rm -f ./runtime/runtime_defs.go
# Determine the host compiler toolchain. # Determine the host compiler toolchain.
eval `{grep '^(CC|LD|O)=' /$objtype/mkfile} eval `{grep '^(CC|LD|O)=' /$objtype/mkfile}
echo '##### Building Go bootstrap tool.' vflag=()
echo cmd/dist if(~ $1 -v) {
vflag=(-v)
shift
}
GOROOT = `{cd .. && pwd} GOROOT = `{cd .. && pwd}
if(! ~ $#GOROOT_BOOTSTRAP 1) if(! ~ $#GOROOT_BOOTSTRAP 1)
GOROOT_BOOTSTRAP = $home/go1.4 GOROOT_BOOTSTRAP = $home/go1.4
...@@ -66,11 +71,15 @@ if(~ $GOROOT_BOOTSTRAP $GOROOT){ ...@@ -66,11 +71,15 @@ if(~ $GOROOT_BOOTSTRAP $GOROOT){
echo 'Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.' >[1=2] echo 'Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.' >[1=2]
exit bootstrap exit bootstrap
} }
rm -f cmd/dist/dist
echo 'Building Go cmd/dist using '^$GOROOT_BOOTSTRAP
if(~ $#vflag 1)
echo cmd/dist
GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist
eval `{./cmd/dist/dist env -9} eval `{./cmd/dist/dist env -9}
echo if(~ $#vflag 1)
echo
if(~ $1 --dist-tool){ if(~ $1 --dist-tool){
# Stop after building dist tool. # Stop after building dist tool.
...@@ -89,7 +98,7 @@ if(~ $1 --no-clean) { ...@@ -89,7 +98,7 @@ if(~ $1 --no-clean) {
# Run dist bootstrap to complete make.bash. # Run dist bootstrap to complete make.bash.
# Bootstrap installs a proper cmd/dist, built with the new toolchain. # Bootstrap installs a proper cmd/dist, built with the new toolchain.
# Throw ours, built with Go 1.4, away after bootstrap. # Throw ours, built with Go 1.4, away after bootstrap.
./cmd/dist/dist bootstrap -v $buildall $* ./cmd/dist/dist bootstrap $vflag $buildall $*
rm -f ./cmd/dist/dist rm -f ./cmd/dist/dist
# DO NOT ADD ANY NEW CODE HERE. # DO NOT ADD ANY NEW CODE HERE.
......
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