aboutsummaryrefslogtreecommitdiff
path: root/src/make.rc
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2017-10-23 21:57:54 -0400
committerRuss Cox <rsc@golang.org>2017-10-25 01:13:01 +0000
commitaedb79f092be44f13faa7a40ed195b1bf0d27855 (patch)
tree703d112495666708114e4f29e3760992d033c173 /src/make.rc
parentd92aaa970791472a1657e878bf686fe802943ebe (diff)
downloadgo-aedb79f092be44f13faa7a40ed195b1bf0d27855.tar.gz
go-aedb79f092be44f13faa7a40ed195b1bf0d27855.zip
build: move final steps of make.bash, make.bat, make.rc into cmd/dist
This CL expands the job of "dist bootstrap" to be "finish make.bash". I need to change that logic in upcoming CLs related to cmd/go changes, and I'd rather not change it in three places in three different shell script languages. Change-Id: I545dc215e408289e4d0b28f7c2ffcd849d89ad3b Reviewed-on: https://go-review.googlesource.com/72870 Reviewed-by: David Crawshaw <crawshaw@golang.org>
Diffstat (limited to 'src/make.rc')
-rwxr-xr-xsrc/make.rc37
1 files changed, 12 insertions, 25 deletions
diff --git a/src/make.rc b/src/make.rc
index 604e4a89c9..7704b12417 100755
--- a/src/make.rc
+++ b/src/make.rc
@@ -82,31 +82,18 @@ if(~ $1 --dist-tool){
}
buildall = -a
-if(~ $1 --no-clean)
+if(~ $1 --no-clean) {
buildall = ()
-./cmd/dist/dist bootstrap $buildall -v # builds go_bootstrap
-# Delay move of dist tool to now, because bootstrap may clear tool directory.
-mv cmd/dist/dist $GOTOOLDIR/dist
-echo
-
-# Run only one process at a time on 9vx.
-if(~ $sysname vx32)
- pflag = (-p 1)
-
-if(! ~ $GOHOSTARCH $GOARCH || ! ~ $GOHOSTOS $GOOS){
- echo '##### Building packages and commands for host,' $GOHOSTOS/$GOHOSTARCH^.
- GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH GOBIN=() \
- $GOTOOLDIR/go_bootstrap install -gcflags $"GO_GCFLAGS -ldflags $"GO_LDFLAGS -v $pflag std cmd
- echo
+ shift
}
+# Run dist bootstrap to complete make.bash.
+# Bootstrap installs a proper cmd/dist, built with the new toolchain.
+# Throw ours, built with Go 1.4, away after bootstrap.
+./cmd/dist/dist bootstrap -v $buildall $*
+rm -f ./cmd/dist/dist
-echo '##### Building packages and commands for' $GOOS/$GOARCH^.
-$GOTOOLDIR/go_bootstrap install -gcflags $"GO_GCFLAGS -ldflags $"GO_LDFLAGS -v $pflag std cmd
-echo
-
-rm -f $GOTOOLDIR/go_bootstrap
-
-if(! ~ $1 --no-banner)
- $GOTOOLDIR/dist banner
-
-status=''
+# DO NOT ADD ANY NEW CODE HERE.
+# The bootstrap+rm above are the final step of make.rc.
+# If something must be added, add it to cmd/dist's cmdbootstrap,
+# to avoid needing three copies in three different shell languages
+# (make.bash, make.bat, make.rc).