mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +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. */
|
||||
#undef VERSION
|
||||
|
||||
/* Version string. */
|
||||
#undef VERSION_STRING
|
||||
|
||||
/* Define if the compiler understands prototypes. */
|
||||
#undef PROTOTYPES
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ AM_GNU_GETTEXT
|
||||
# the ANSI2KNR-filtering rules.
|
||||
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"
|
||||
BISON_DEFINE_FILE(XPFILE, XPFILE)
|
||||
XPFILE1="${datadir}/bison.hairy"
|
||||
|
||||
@@ -5,8 +5,7 @@ bin_PROGRAMS = bison
|
||||
|
||||
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 \
|
||||
print.c reader.c reduce.c symtab.c warshall.c version.c getopt.c \
|
||||
getopt1.c
|
||||
print.c reader.c reduce.c symtab.c warshall.c getopt.c getopt1.c
|
||||
|
||||
EXTRA_bison_SOURCES = vmsgetargs.c
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ void usage PARAMS((FILE *));
|
||||
void getargs PARAMS((int, char *[]));
|
||||
|
||||
extern char *program_name;
|
||||
extern char *version_string;
|
||||
|
||||
extern void warns PARAMS((char *, char *)); /* main.c */
|
||||
|
||||
@@ -108,7 +107,7 @@ getargs (int argc, char *argv[])
|
||||
exit (0);
|
||||
|
||||
case 'V':
|
||||
printf ("%s", version_string);
|
||||
printf ("%s\n", VERSION_STRING);
|
||||
exit (0);
|
||||
|
||||
case 'v':
|
||||
|
||||
@@ -136,8 +136,6 @@ static bucket *undeftoken;
|
||||
/* Nonzero if any action or guard uses the @n construct. */
|
||||
static int yylsp_needed;
|
||||
|
||||
extern char *version_string;
|
||||
|
||||
|
||||
static void
|
||||
skip_to_char (int target)
|
||||
@@ -209,7 +207,7 @@ reader (void)
|
||||
infile);
|
||||
else
|
||||
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");
|
||||
read_declarations();
|
||||
/* 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