]> Cypherpunks repositories - gostls13.git/commitdiff
make.bash: check $PATH indirectly via which quietgcc
authorRuss Cox <rsc@golang.org>
Wed, 11 Nov 2009 03:20:34 +0000 (19:20 -0800)
committerRuss Cox <rsc@golang.org>
Wed, 11 Nov 2009 03:20:34 +0000 (19:20 -0800)
R=agl1
CC=golang-dev
https://golang.org/cl/152056

src/make.bash

index 6135bef043a0010df86c97ed499165e526a74fd9..f152a74519139a34bfd82e89d65b60203a132fed 100755 (executable)
@@ -36,14 +36,19 @@ darwin | linux | nacl)
        exit 1
 esac
 
-
-bash clean.bash
-
 rm -f $GOBIN/quietgcc
 CC=${CC:-gcc}
 sed -e "s|@CC@|$CC|" < quietgcc.bash > $GOBIN/quietgcc
 chmod +x $GOBIN/quietgcc
 
+if ! (cd lib9 && which quietgcc) >/dev/null 2>&1; then
+       echo "installed quietgcc as $GOBIN/quietgcc but 'which quietgcc' fails" 1>&2
+       echo "double-check that $GOBIN is in your "'$PATH' 1>&2
+       exit 1
+fi
+
+bash clean.bash
+
 for i in lib9 libbio libmach cmd pkg libcgo cmd/cgo cmd/ebnflint cmd/godoc cmd/gofmt cmd/goyacc cmd/hgpatch
 do
        case "$i-$GOOS" in