The 'regen' commit in Bison's history are a nuisance. They are
especially big because of the #lines. Let's generate our parse
without these lines in the repository, but generate them in the
tarball.
* Makefile.am (AM_YFLAGS_WITH_LINES): New.
(AM_YFLAGS): Use it.
(dist-hook): Regenerate the parser with #lines.
---
Makefile.am | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index d32b14a9..930eac2f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,7 +42,8 @@ dependencies = $(BISON_IN) $(src_bison_SOURCES)
$(dist_skeletons_DATA)
BISON = $(top_builddir)/tests/bison
BISON_IN = $(top_srcdir)/tests/bison.in
YACC = $(BISON) -o y.tab.c
-AM_YFLAGS = -d -v -Werror -Wall -Wno-yacc --report=all
+AM_YFLAGS_WITH_LINES = -d -v -Werror -Wall --report=all
+AM_YFLAGS = $(AM_YFLAGS_WITH_LINES) --no-lines
# Initialization before completion by local.mk's.
AM_CFLAGS = $(WARN_CFLAGS)
@@ -89,6 +90,7 @@ $(top_srcdir)/.version: configure
echo $(VERSION) > $@-t && mv $@-t $@
dist-hook: gen-ChangeLog
echo $(VERSION) > $(distdir)/.tarball-version
+ cd $(distdir) && $(abs_top_builddir)/tests/bison
$(AM_YFLAGS_WITH_LINES) src/parse-gram.y -o src/parse-gram.c
.PHONY: update-b4-copyright update-package-copyright-year
update-b4-copyright:
--
2.21.0