## Process this file with automake to produce Makefile.in -*-Makefile-*-
-AUTOMAKE_OPTIONS = 1.3
-
-#names of parser files
-PFILE = bison.simple
-PFILE1 = bison.hairy
-
-INCLUDES = -DXPFILE=\"$(datadir)/$(PFILE)\" \
- -DXPFILE1=\"$(datadir)/$(PFILE1)\"
+AUTOMAKE_OPTIONS = 1.4
bin_PROGRAMS = bison
noinst_HEADERS = alloc.h files.h gram.h lex.h machine.h state.h \
symtab.h system.h types.h getopt.h
-data_DATA = $(PFILE) $(PFILE1)
+data_DATA = bison.simple bison.hairy
info_TEXINFOS = bison.texinfo
man_MANS = bison.1
/* Define if the compiler understands prototypes. */
#undef PROTOTYPES
+
+/* The location of the simple parser (bison.simple). */
+#undef XPFILE
+
+/* The location of the semantic parser (bison.hairy). */
+#undef XPFILE1
@BOTTOM@
#if defined(PROTOTYPES) || defined(__cplusplus)
--- /dev/null
+dnl BISON_DEFINE_FILE(VARNAME, FILE)
+dnl Defines (with AC_DEFINE) VARNAME to the expansion of the FILE
+dnl variable, expanding ${prefix} and such.
+dnl Example: BISON_DEFINE_FILE(DATADIR, datadir)
+dnl By Alexandre Oliva <oliva@dcc.unicamp.br>
+AC_DEFUN(BISON_DEFINE_FILE, [
+ ac_expanded=`(
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+ eval echo \""[$]$2"\"
+ )`
+ AC_DEFINE_UNQUOTED($1, "$ac_expanded")
+])
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(mkstemp setlocale)
+PFILE="${datadir}/bison.simple"
+BISON_DEFINE_FILE(XPFILE, PFILE)
+PFILE1="${datadir}/bison.hairy"
+BISON_DEFINE_FILE(XPFILE1, PFILE1)
+
AC_OUTPUT(Makefile)
Boston, MA 02111-1307, USA. */
+#include "system.h"
+
#if defined (VMS) & !defined (__VMS_POSIX)
#include <ssdef.h>
#define unlink delete
#endif
#include <stdio.h>
-#include "system.h"
#include "files.h"
#include "alloc.h"
#include "gram.h"
/* These two should be pathnames for opening the sample parser files.
When bison is installed, they should be absolute pathnames.
- XPFILE1 and XPFILE2 normally come from the Makefile. */
+ XPFILE1 and XPFILE2 normally come from config.h. */
#define PFILE XPFILE /* Simple parser */
#define PFILE1 XPFILE1 /* Semantic parser */