0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-31 14:11:54 +00:00

Bison: A bit more verbose error messages in config.

This commit is contained in:
Jan Maria Matejka 2018-08-14 14:36:44 +02:00
parent 73587c1260
commit 0389931aad
4 changed files with 9 additions and 1 deletions

2
aclocal.m4 vendored
View File

@ -151,9 +151,11 @@ AC_DEFUN([BIRD_CHECK_BISON_VERSION],
;;
2.*)
bird_bison_synclines=no
bird_bison_enhanced_error=no
;;
3.* | 4.* | 5.* | 6.* | 7.* | 8.* | 9.*)
bird_bison_synclines=yes
bird_bison_enhanced_error=yes
;;
*)
AC_MSG_ERROR([Couldn't parse Bison version $$1. Call the developers for help.])

View File

@ -12,7 +12,7 @@ BISON_DEBUG=-t
endif
cf-parse.tab.c: cf-parse.y
$(BISON) -bcf-parse -dv -pcf_ $(BISON_DEBUG) cf-parse.y
$(BISON) $(BISONFLAGS) -bcf-parse -dv -pcf_ $(BISON_DEBUG) cf-parse.y
cf-parse.y: $(conf-fragments) $(conf-src)/gen_parser.m4
$(M4) $(M4FLAGS) -P $(conf-src)/gen_parser.m4 $(conf-fragments) >cf-parse.y

View File

@ -185,7 +185,12 @@ if test "$bird_bison_synclines" = yes; then
M4FLAGS="$M4FLAGS -s"
fi
if test "$bird_bison_enhanced_error" = yes; then
BISONFLAGS="$BISONFLAGS -Dparse.lac=full -Dparse.error=verbose"
fi
AC_SUBST([M4FLAGS])
AC_SUBST([BISONFLAGS])
BIRD_CHECK_PROG_FLAVOR_GNU([$M4],
[],

View File

@ -23,6 +23,7 @@ CPPFLAGS=-I$(root-rel) -I$(srcdir) @CPPFLAGS@
CFLAGS=$(CPPFLAGS) @CFLAGS@
LDFLAGS=@LDFLAGS@
M4FLAGS=@M4FLAGS@
BISONFLAGS=@BISONFLAGS@
LIBS=@LIBS@
CLIENT_LIBS=@CLIENT_LIBS@
CC=@CC@