mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Between Bison releases, manually append `+' to the previous Bison
release number, and use that as a signal to automatically print the ChangeLog's CVS Id keyword from --version. Discussed starting at <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>. * ChangeLog: Add Id header. * configure.ac (AC_INIT): Append `+' to `2.3'. * src/.cvsignore: Add revision.c. * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h. (BUILT_SOURCES): Add revision.c. (revision.c): New target rule. This file defines a new global variable named revision. It initializes it with either the Id from ChangeLog or, if VERSION doesn't contain `+', with the empty string. * src/getargs.c (version): Print the value of revision. * src/revision.h: Extern revision.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include "system.h"
|
||||
#include "revision.h"
|
||||
|
||||
#include <argmatch.h>
|
||||
#include <error.h>
|
||||
@@ -272,6 +273,7 @@ version (void)
|
||||
continue. */
|
||||
printf (_("bison (GNU Bison) %s"), VERSION);
|
||||
putc ('\n', stdout);
|
||||
printf ("%s", revision);
|
||||
fputs (_("Written by Robert Corbett and Richard Stallman.\n"), stdout);
|
||||
putc ('\n', stdout);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user