make check-parser-uptodate-or-warn.sh more robust to script failures

master
Gabriel Scherer 2019-09-25 14:54:31 +02:00
parent 9383912c21
commit 3f77dade9f
2 changed files with 2 additions and 2 deletions

View File

@ -1093,7 +1093,7 @@ parsing/camlinternalMenhirLib.mli: boot/menhir/menhirLib.mli
parsing/parser.ml: boot/menhir/parser.ml parsing/parser.mly \
tools/check-parser-uptodate-or-warn.sh
@tools/check-parser-uptodate-or-warn.sh
@tools/check-parser-uptodate-or-warn.sh || true
cat $< | sed "s/MenhirLib/CamlinternalMenhirLib/g" > $@
parsing/parser.mli: boot/menhir/parser.mli
cat $< | sed "s/MenhirLib/CamlinternalMenhirLib/g" > $@

View File

@ -50,7 +50,7 @@ mtime() {
# The check itself
SOURCE_MTIME=$(mtime parsing/parser.mly)
GENERATED_MTIME=$(mtime boot/menhir/parser.ml)
if test "$SOURCE_MTIME" -gt $(( GENERATED_MTIME + 10 ))
if test -n "$SOURCE_MTIME" -a -n "$GENERATED_MTIME" -a "$SOURCE_MTIME" -gt $(( GENERATED_MTIME + 10 ))
then
echo
tput setaf 3; tput bold; printf "Warning: "; tput sgr0