aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacques-Henri Jourdan <jourgun@gmail.com>2019-02-25 17:42:14 +0100
committerXavier Leroy <xavierleroy@users.noreply.github.com>2019-02-25 17:42:14 +0100
commitfc9bc6437a91d8ba4541c2671acb49574f3aeb77 (patch)
tree552f6f3b343ed37cff5c8b7dc2173b5c842d82bb
parent4fb8df8cd1df4552e937d02fa78fc4993af81e63 (diff)
downloadcompcert-fc9bc6437a91d8ba4541c2671acb49574f3aeb77.tar.gz
compcert-fc9bc6437a91d8ba4541c2671acb49574f3aeb77.zip
Maximum supported Menhir version (#275)
The Coq backend of Menhir will soon enjoy a large refactoring, making it incompatible with the version of MenhirLib currently in CompCert. This commit adds a check in configure to make sure that the version of Menhir is not more modern than the current one (20181026).
-rwxr-xr-xconfigure5
1 files changed, 3 insertions, 2 deletions
diff --git a/configure b/configure
index 2c50fb49..130944a5 100755
--- a/configure
+++ b/configure
@@ -555,12 +555,13 @@ fi
MENHIR_REQUIRED=20161201
MENHIR_NEW_API=20180530
+MENHIR_MAX=20181026
menhir_flags=''
echo "Testing Menhir... " | tr -d '\n'
menhir_ver=`menhir --version 2>/dev/null | sed -n -e 's/^.*version \([0-9]*\).*$/\1/p'`
case "$menhir_ver" in
20[0-9][0-9][0-9][0-9][0-9][0-9])
- if test "$menhir_ver" -ge $MENHIR_REQUIRED; then
+ if test "$menhir_ver" -ge $MENHIR_REQUIRED -a "$menhir_ver" -le $MENHIR_MAX; then
echo "version $menhir_ver -- good!"
menhir_includes="-I `menhir --suggest-menhirLib`"
if test "$menhir_ver" -ge $MENHIR_NEW_API; then
@@ -568,7 +569,7 @@ case "$menhir_ver" in
fi
else
echo "version $menhir_ver -- UNSUPPORTED"
- echo "Error: CompCert requires Menhir version $MENHIR_REQUIRED or later."
+ echo "Error: CompCert requires a version of Menhir between $MENHIR_REQUIRED and $MENHIR_MAX, included."
missingtools=true
fi;;
*)