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 | 7 |
8 if [ ! -f env.bash ]; then | 8 if [ ! -f env.bash ]; then |
9 echo 'clean.bash must be run from $GOROOT/src' 1>&2 | 9 echo 'clean.bash must be run from $GOROOT/src' 1>&2 |
10 exit 1 | 10 exit 1 |
11 fi | 11 fi |
12 . ./env.bash | 12 . ./env.bash |
13 if [ ! -f Make.inc ] ; then | 13 if [ ! -f Make.inc ] ; then |
14 GOROOT_FINAL=${GOROOT_FINAL:-$GOROOT} | 14 GOROOT_FINAL=${GOROOT_FINAL:-$GOROOT} |
15 sed 's!@@GOROOT@@!'"$GOROOT_FINAL"'!' Make.inc.in >Make.inc | 15 sed 's!@@GOROOT@@!'"$GOROOT_FINAL"'!' Make.inc.in >Make.inc |
16 fi | 16 fi |
17 | 17 |
18 if [ "$1" != "--nopkg" ]; then | 18 if [ "$1" != "--nopkg" ]; then |
19 rm -rf "$GOROOT"/pkg/${GOOS}_$GOARCH | 19 rm -rf "$GOROOT"/pkg/${GOOS}_$GOARCH |
20 fi | 20 fi |
21 rm -f "$GOROOT"/lib/*.a | 21 rm -f "$GOROOT"/lib/*.a |
22 for i in lib9 libbio libmach cmd pkg \ | 22 for i in lib9 libbio libmach cmd pkg \ |
23 ../misc/cgo/gmp ../misc/cgo/stdio \ | 23 ../misc/cgo/gmp ../misc/cgo/stdio \ |
| 24 ../misc/cgo/life ../misc/cgo/test \ |
24 ../test/bench ../test/garbage | 25 ../test/bench ../test/garbage |
25 do | 26 do |
26 gomake -C "$GOROOT/src/$i" clean | 27 gomake -C "$GOROOT/src/$i" clean |
27 done | 28 done |
LEFT | RIGHT |