mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Defined locations of parser files in config.h instead of Makefile.
This commit is contained in:
11
Makefile.am
11
Makefile.am
@@ -1,12 +1,5 @@
|
||||
## 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
|
||||
|
||||
@@ -22,7 +15,7 @@ bison_LDADD = @ALLOCA@
|
||||
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
|
||||
|
||||
|
||||
@@ -10,6 +10,12 @@
|
||||
|
||||
/* 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)
|
||||
|
||||
13
acinclude.m4
Normal file
13
acinclude.m4
Normal file
@@ -0,0 +1,13 @@
|
||||
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")
|
||||
])
|
||||
@@ -30,4 +30,9 @@ dnl Checks for library functions.
|
||||
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)
|
||||
|
||||
@@ -19,6 +19,8 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#include "system.h"
|
||||
|
||||
#if defined (VMS) & !defined (__VMS_POSIX)
|
||||
#include <ssdef.h>
|
||||
#define unlink delete
|
||||
@@ -40,7 +42,6 @@ Boston, MA 02111-1307, USA. */
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include "system.h"
|
||||
#include "files.h"
|
||||
#include "alloc.h"
|
||||
#include "gram.h"
|
||||
|
||||
@@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* 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 */
|
||||
|
||||
Reference in New Issue
Block a user