- -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_YFLAGS = "-dv"
+
+# config.h is in build/.
+INCLUDES = -I$(top_builddir) \
+ -I$(top_srcdir)/lib
+
+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