mirror of
https://github.com/golang/go
synced 2024-11-18 12:04:57 -07:00
src/*.bash: use tabs consistently
make.bash used mostly tabs and buildall.bash used mostly spaces, but they were both mixing them. Be consistent and use tabs, as that's what's more common and what the Go code uses. Change-Id: Ia6affbfccfe64fda800c1ac400965df364d2c545 Reviewed-on: https://go-review.googlesource.com/37967 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
945180fe2a
commit
027500ce38
@ -19,39 +19,39 @@ fi
|
|||||||
|
|
||||||
sete=false
|
sete=false
|
||||||
if [ "$1" = "-e" ]; then
|
if [ "$1" = "-e" ]; then
|
||||||
sete=true
|
sete=true
|
||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$sete" = true ]; then
|
if [ "$sete" = true ]; then
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pattern="$1"
|
pattern="$1"
|
||||||
if [ "$pattern" = "" ]; then
|
if [ "$pattern" = "" ]; then
|
||||||
pattern=.
|
pattern=.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
./make.bash || exit 1
|
./make.bash || exit 1
|
||||||
GOROOT="$(cd .. && pwd)"
|
GOROOT="$(cd .. && pwd)"
|
||||||
|
|
||||||
gettargets() {
|
gettargets() {
|
||||||
../bin/go tool dist list | sed -e 's|/|-|'
|
../bin/go tool dist list | sed -e 's|/|-|'
|
||||||
echo linux-386-387
|
echo linux-386-387
|
||||||
echo linux-arm-arm5
|
echo linux-arm-arm5
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedtargets() {
|
selectedtargets() {
|
||||||
gettargets | egrep -v 'android-arm|darwin-arm' | egrep "$pattern"
|
gettargets | egrep -v 'android-arm|darwin-arm' | egrep "$pattern"
|
||||||
}
|
}
|
||||||
|
|
||||||
# put linux, nacl first in the target list to get all the architectures up front.
|
# put linux, nacl first in the target list to get all the architectures up front.
|
||||||
linux_nacl_targets() {
|
linux_nacl_targets() {
|
||||||
selectedtargets | egrep 'linux|nacl' | sort
|
selectedtargets | egrep 'linux|nacl' | sort
|
||||||
}
|
}
|
||||||
|
|
||||||
non_linux_nacl_targets() {
|
non_linux_nacl_targets() {
|
||||||
selectedtargets | egrep -v 'linux|nacl' | sort
|
selectedtargets | egrep -v 'linux|nacl' | sort
|
||||||
}
|
}
|
||||||
|
|
||||||
# Note words in $targets are separated by both newlines and spaces.
|
# Note words in $targets are separated by both newlines and spaces.
|
||||||
@ -60,29 +60,29 @@ targets="$(linux_nacl_targets) $(non_linux_nacl_targets)"
|
|||||||
failed=false
|
failed=false
|
||||||
for target in $targets
|
for target in $targets
|
||||||
do
|
do
|
||||||
echo ""
|
echo ""
|
||||||
echo "### Building $target"
|
echo "### Building $target"
|
||||||
export GOOS=$(echo $target | sed 's/-.*//')
|
export GOOS=$(echo $target | sed 's/-.*//')
|
||||||
export GOARCH=$(echo $target | sed 's/.*-//')
|
export GOARCH=$(echo $target | sed 's/.*-//')
|
||||||
unset GO386 GOARM
|
unset GO386 GOARM
|
||||||
if [ "$GOARCH" = "arm5" ]; then
|
if [ "$GOARCH" = "arm5" ]; then
|
||||||
export GOARCH=arm
|
export GOARCH=arm
|
||||||
export GOARM=5
|
export GOARM=5
|
||||||
fi
|
fi
|
||||||
if [ "$GOARCH" = "387" ]; then
|
if [ "$GOARCH" = "387" ]; then
|
||||||
export GOARCH=386
|
export GOARCH=386
|
||||||
export GO386=387
|
export GO386=387
|
||||||
fi
|
fi
|
||||||
if ! "$GOROOT/bin/go" build -a std cmd; then
|
if ! "$GOROOT/bin/go" build -a std cmd; then
|
||||||
failed=true
|
failed=true
|
||||||
if $sete; then
|
if $sete; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$failed" = "true" ]; then
|
if [ "$failed" = "true" ]; then
|
||||||
echo "" 1>&2
|
echo "" 1>&2
|
||||||
echo "Build(s) failed." 1>&2
|
echo "Build(s) failed." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -108,7 +108,7 @@ done
|
|||||||
# cmd/dist will detect kFreeBSD as freebsd/$GOARCH, but we need to
|
# cmd/dist will detect kFreeBSD as freebsd/$GOARCH, but we need to
|
||||||
# disable cgo manually.
|
# disable cgo manually.
|
||||||
if [ "$(uname -s)" == "GNU/kFreeBSD" ]; then
|
if [ "$(uname -s)" == "GNU/kFreeBSD" ]; then
|
||||||
export CGO_ENABLED=0
|
export CGO_ENABLED=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean old generated file that will cause problems in the build.
|
# Clean old generated file that will cause problems in the build.
|
||||||
|
Loading…
Reference in New Issue
Block a user