aboutsummaryrefslogtreecommitdiff
path: root/src/make.bash
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-12-20 16:50:13 -0500
committerRuss Cox <rsc@golang.org>2011-12-20 16:50:13 -0500
commit41a6165c030c41cc7e44b28c251b22c49fb9618b (patch)
treef82ea6396bbcb12e35e9269c8156ee21c17aa7b6 /src/make.bash
parentfd1c1b9679a2ed9c96bc3ccd74336ba5b23a5049 (diff)
downloadgo-41a6165c030c41cc7e44b28c251b22c49fb9618b.tar.xz
build: use go command during build
If something goes wrong, it should suffice to set USE_GO_TOOL=false in env.bash to fall back to the makefiles. I will delete the makefiles in January. R=golang-dev, r CC=golang-dev https://golang.org/cl/5502047
Diffstat (limited to 'src/make.bash')
-rwxr-xr-xsrc/make.bash20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/make.bash b/src/make.bash
index 83c1db4f48..3546c5d2be 100755
--- a/src/make.bash
+++ b/src/make.bash
@@ -85,10 +85,24 @@ do
done
echo; echo; echo %%%% making runtime generated files %%%%; echo
-(cd "$GOROOT"/src/pkg/runtime; ./autogen.sh) || exit 1
-echo; echo; echo %%%% making pkg %%%%; echo
-gomake -C pkg install
+(
+ cd "$GOROOT"/src/pkg/runtime
+ ./autogen.sh
+ make install # copy runtime.h to pkg directory
+) || exit 1
+
+if $USE_GO_TOOL; then
+ echo
+ echo '# Building go command from bootstrap script.'
+ ./buildscript_${GOOS}_$GOARCH.sh
+
+ echo '# Building Go code.'
+ GOPATH="" go install -a all
+else
+ echo; echo; echo %%%% making pkg %%%%; echo
+ gomake -C pkg install
+fi
# Print post-install messages.
# Implemented as a function so that all.bash can repeat the output