The old YACC macro has some issues with using modern bison features and
always enables compatibility mode with yacc.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
TEST_ROOTFS = $(abs_top_builddir)/tests/.root
+BUILT_SOURCES =
CLEANFILES =
DISTCLEANFILES =
EXTRA_DIST =
-Wl,--gc-sections \
-Wl,--as-needed
-AM_YFLAGS = -d
-
PAKFIRE_CPPFLAGS = -I$(top_srcdir)/src/libpakfire/include
PAKFIRE_LIBS = libpakfire.la
src/libpakfire/parser/scanner.c: src/libpakfire/parser/grammar.h
+src/libpakfire/parser/grammar.h: src/libpakfire/parser/grammar.c
+
+src/libpakfire/parser/grammar.c: src/libpakfire/parser/grammar.y Makefile
+ $(AM_V_GEN) $(BISON) -Wall -t -d -o $@ $<
+
+BUILT_SOURCES += \
+ src/libpakfire/parser/grammar.h
+
lib_LTLIBRARIES += \
libpakfire.la
AC_SUBST([OUR_LDFLAGS], $with_ldflags)
# Bison
-AC_PATH_PROG(YACC, bison)
-AC_SUBST(YACC)
+AC_PROG_YACC
+AC_PATH_PROG([BISON],[bison])
# Flex
AM_PROG_LEX