summaryrefslogtreecommitdiff
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
commit2839e4ffce84dbcc2ad9727db402c709071d93b5 (patch)
treed4a23650daf8be1859be9db39e359e4e5d180381 /src/make.bash
parentacfe3456faa74edc6bba46a05da64bda68b627bc (diff)
downloadgo-2839e4ffce84dbcc2ad9727db402c709071d93b5.tar.gz
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 http://codereview.appspot.com/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 83c1db4f4..3546c5d2b 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