mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 16:53:02 +00:00
Have configure build version string instead of relying on ANSI string
concatentation.
This commit is contained in:
@@ -8,6 +8,9 @@
|
|||||||
/* Version of package. */
|
/* Version of package. */
|
||||||
#undef VERSION
|
#undef VERSION
|
||||||
|
|
||||||
|
/* Version string. */
|
||||||
|
#undef VERSION_STRING
|
||||||
|
|
||||||
/* Define if the compiler understands prototypes. */
|
/* Define if the compiler understands prototypes. */
|
||||||
#undef PROTOTYPES
|
#undef PROTOTYPES
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ AM_GNU_GETTEXT
|
|||||||
# the ANSI2KNR-filtering rules.
|
# the ANSI2KNR-filtering rules.
|
||||||
LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
|
LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
|
||||||
|
|
||||||
|
AC_DEFINE_UNQUOTED(VERSION_STRING, "GNU Bison version ${VERSION}")
|
||||||
XPFILE="${datadir}/bison.simple"
|
XPFILE="${datadir}/bison.simple"
|
||||||
BISON_DEFINE_FILE(XPFILE, XPFILE)
|
BISON_DEFINE_FILE(XPFILE, XPFILE)
|
||||||
XPFILE1="${datadir}/bison.hairy"
|
XPFILE1="${datadir}/bison.hairy"
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ bin_PROGRAMS = bison
|
|||||||
|
|
||||||
bison_SOURCES = LR0.c allocate.c closure.c conflicts.c derives.c \
|
bison_SOURCES = LR0.c allocate.c closure.c conflicts.c derives.c \
|
||||||
files.c getargs.c gram.c lalr.c lex.c main.c nullable.c output.c \
|
files.c getargs.c gram.c lalr.c lex.c main.c nullable.c output.c \
|
||||||
print.c reader.c reduce.c symtab.c warshall.c version.c getopt.c \
|
print.c reader.c reduce.c symtab.c warshall.c getopt.c getopt1.c
|
||||||
getopt1.c
|
|
||||||
|
|
||||||
EXTRA_bison_SOURCES = vmsgetargs.c
|
EXTRA_bison_SOURCES = vmsgetargs.c
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ void usage PARAMS((FILE *));
|
|||||||
void getargs PARAMS((int, char *[]));
|
void getargs PARAMS((int, char *[]));
|
||||||
|
|
||||||
extern char *program_name;
|
extern char *program_name;
|
||||||
extern char *version_string;
|
|
||||||
|
|
||||||
extern void warns PARAMS((char *, char *)); /* main.c */
|
extern void warns PARAMS((char *, char *)); /* main.c */
|
||||||
|
|
||||||
@@ -108,7 +107,7 @@ getargs (int argc, char *argv[])
|
|||||||
exit (0);
|
exit (0);
|
||||||
|
|
||||||
case 'V':
|
case 'V':
|
||||||
printf ("%s", version_string);
|
printf ("%s\n", VERSION_STRING);
|
||||||
exit (0);
|
exit (0);
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
|
|||||||
@@ -136,8 +136,6 @@ static bucket *undeftoken;
|
|||||||
/* Nonzero if any action or guard uses the @n construct. */
|
/* Nonzero if any action or guard uses the @n construct. */
|
||||||
static int yylsp_needed;
|
static int yylsp_needed;
|
||||||
|
|
||||||
extern char *version_string;
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
skip_to_char (int target)
|
skip_to_char (int target)
|
||||||
@@ -209,7 +207,7 @@ reader (void)
|
|||||||
infile);
|
infile);
|
||||||
else
|
else
|
||||||
fprintf(ftable, "\n/* A Bison parser, made from %s\n", infile);
|
fprintf(ftable, "\n/* A Bison parser, made from %s\n", infile);
|
||||||
fprintf(ftable, " by %s */\n\n", version_string);
|
fprintf(ftable, " by %s */\n\n", VERSION_STRING);
|
||||||
fprintf(ftable, "#define YYBISON 1 /* Identify Bison output. */\n\n");
|
fprintf(ftable, "#define YYBISON 1 /* Identify Bison output. */\n\n");
|
||||||
read_declarations();
|
read_declarations();
|
||||||
/* start writing the guard and action files, if they are needed. */
|
/* start writing the guard and action files, if they are needed. */
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
#include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
char *version_string = "GNU Bison version " VERSION "\n";
|
|
||||||
Reference in New Issue
Block a user