From 41a6165c030c41cc7e44b28c251b22c49fb9618b Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 20 Dec 2011 16:50:13 -0500 Subject: 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 --- src/make.bash | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/make.bash') 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 -- cgit v1.3-5-g9baa