LEFT | RIGHT |
(no file at all) | |
1 #!/usr/bin/env bash | 1 #!/usr/bin/env bash |
2 # Copyright 2009 The Go Authors. All rights reserved. | 2 # Copyright 2009 The Go Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style | 3 # Use of this source code is governed by a BSD-style |
4 # license that can be found in the LICENSE file. | 4 # license that can be found in the LICENSE file. |
5 | 5 |
6 set -e | 6 set -e |
7 if [ ! -f run.bash ]; then | 7 if [ ! -f run.bash ]; then |
8 echo 'make.bash must be run from $GOROOT/src' 1>&2 | 8 echo 'make.bash must be run from $GOROOT/src' 1>&2 |
9 exit 1 | 9 exit 1 |
10 fi | 10 fi |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 sleep 5 | 41 sleep 5 |
42 fi | 42 fi |
43 fi | 43 fi |
44 done | 44 done |
45 | 45 |
46 # Finally! Run the build. | 46 # Finally! Run the build. |
47 | 47 |
48 echo '# Building C bootstrap tool.' | 48 echo '# Building C bootstrap tool.' |
49 mkdir -p ../bin/tool | 49 mkdir -p ../bin/tool |
50 DEFGOROOT='-DDEFAULT_GOROOT="'"$(cd .. && pwd)"'"' | 50 export GOROOT="$(cd .. && pwd)" |
| 51 GOROOT_FINAL="${GOROOT_FINAL:-$GOROOT}" |
| 52 DEFGOROOT='-DGOROOT_FINAL="'"$GOROOT_FINAL"'"' |
51 gcc -O2 -Wall -Werror -o ../bin/tool/dist -Icmd/dist "$DEFGOROOT" cmd/dist/*.c | 53 gcc -O2 -Wall -Werror -o ../bin/tool/dist -Icmd/dist "$DEFGOROOT" cmd/dist/*.c |
52 echo | 54 echo |
53 | 55 |
54 if [ "$1" = "--dist-tool" ]; then | 56 if [ "$1" = "--dist-tool" ]; then |
55 # Stop after building dist tool. | 57 # Stop after building dist tool. |
56 exit 0 | 58 exit 0 |
57 fi | 59 fi |
58 | 60 |
59 echo '# Building compilers and Go bootstrap tool.' | 61 echo '# Building compilers and Go bootstrap tool.' |
60 ../bin/tool/dist bootstrap -v # builds go_bootstrap | 62 ../bin/tool/dist bootstrap -v # builds go_bootstrap |
61 echo | 63 echo |
62 | 64 |
63 echo '# Building packages and commands.' | 65 echo '# Building packages and commands.' |
64 ../bin/tool/go_bootstrap clean std | 66 ../bin/tool/go_bootstrap clean std |
65 ../bin/tool/go_bootstrap install -a -v std | 67 ../bin/tool/go_bootstrap install -a -v std |
66 rm -f ../bin/tool/go_bootstrap | 68 rm -f ../bin/tool/go_bootstrap |
67 echo | 69 echo |
68 | 70 |
69 if [ "$1" != "--no-banner" ]; then | 71 if [ "$1" != "--no-banner" ]; then |
70 ../bin/tool/dist banner | 72 ../bin/tool/dist banner |
71 fi | 73 fi |
LEFT | RIGHT |