aboutsummaryrefslogtreecommitdiff
path: root/src/make.bash
diff options
context:
space:
mode:
authorAdam Langley <agl@golang.org>2009-11-11 13:21:37 -0800
committerAdam Langley <agl@golang.org>2009-11-11 13:21:37 -0800
commit1941855730de578f244fe9756353f66e64fefd40 (patch)
tree3166fee81bef736689b95fa02770a9943be95631 /src/make.bash
parent8c3d2f015b181e8786f330a6fd6bb03379f2f395 (diff)
downloadgo-1941855730de578f244fe9756353f66e64fefd40.tar.xz
Reland a112249da741, this time with missing file.
Diffstat (limited to 'src/make.bash')
-rwxr-xr-xsrc/make.bash13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/make.bash b/src/make.bash
index f152a74519..a2f6a0fe1a 100755
--- a/src/make.bash
+++ b/src/make.bash
@@ -47,6 +47,19 @@ if ! (cd lib9 && which quietgcc) >/dev/null 2>&1; then
exit 1
fi
+if make --version | head -n 1 | grep -c '^GNU Make' >> /dev/null ; then
+ MAKEVERSION=$(make --version | head -n 1 | cut -d' ' -f3)
+ MAKEMAJOR=$(echo $MAKEVERSION | cut -d'.' -f 1)
+ MAKEMINOR=$(echo $MAKEVERSION | cut -d'.' -f 2)
+
+ if [ "$MAKEMAJOR" -lt 3 -o "$MAKEMAJOR" -eq 3 -a "$MAKEMINOR" -le 80 ]; then
+ echo "Your make is too old. You appear to have $MAKEMAJOR.$MAKEMINOR, but we need at least 3.81."
+ exit 1
+ fi
+fi
+
+MAKEVERSION=$(make --version | head -n 1 | cut -d' ' -f3)
+
bash clean.bash
for i in lib9 libbio libmach cmd pkg libcgo cmd/cgo cmd/ebnflint cmd/godoc cmd/gofmt cmd/goyacc cmd/hgpatch