1
0
Fork 0

Make bison script backwards compatible with 2.x

This commit is contained in:
Willi Goesgens 2015-01-09 15:50:51 +01:00
parent 44d5fec69b
commit 5a97cfbc17
1 changed files with 8 additions and 1 deletions

View File

@ -9,11 +9,18 @@ if test "x$BISON" = x -o "x$OUTPUT" = x -o "x$INPUT" = x; then
exit 1
fi
BISON_MAJOR_VER=`${BISON} --version |grep bison|sed -e "s;.* ;;" -e "s;\..*;;"`
if test "${BISON_MAJOR_VER}" -ge "3"; then
BISON_OPTS="--warnings=deprecated,other,error=conflicts-sr,error=conflicts-rr"
fi
#############################################################################
## bison
#############################################################################
${BISON} -d -ra --warnings="deprecated,other,error=conflicts-sr,error=conflicts-rr" -o ${OUTPUT} ${INPUT}
${BISON} -d -ra ${BISON_OPTS} -o ${OUTPUT} ${INPUT}
#############################################################################
## sanity checks