- -DXPFILE=\"${datadir}/bison.simple\" \
- -DXPFILE1=\"${datadir}/bison.hairy\" \
- -DLOCALEDIR=\"${datadir}/locale\"
-INCLUDES = -I../intl -I$(top_srcdir)/intl -I..
-LDADD = @INTLLIBS@ ../lib/libbison.a
+ -DPKGDATADIR=\"$(pkgdatadir)\" \
+ -DLOCALEDIR=\"$(datadir)/locale\"
+
+AM_CFLAGS = $(WARNING_CFLAGS) $(WERROR_CFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir)/lib -I../lib
+AM_YFLAGS = "-dv"
+
+LDADD = ../lib/libbison.a $(LIBINTL)
+
+# Use our own Bison to build the parser. Of course, you ought to
+# keep a sane version of Bison nearby...
+YACC = ../tests/bison -y
+
+bin_PROGRAMS = bison
+bin_SCRIPTS = $(YACC_SCRIPT)
+EXTRA_SCRIPTS = yacc