summaryrefslogtreecommitdiffabout
path: root/src
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-08 19:27:35 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2011-05-08 19:42:28 (GMT)
commite523423777dd75acc59cf7b9e7466527d774a9f9 (patch) (side-by-side diff)
tree6d17e7553373fdfb6f32870902b75874c3f06aae /src
parent79f6b2c923d1c2366b68a431756bde6e4a04ae86 (diff)
downloadgrecs-e523423777dd75acc59cf7b9e7466527d774a9f9.tar.gz
grecs-e523423777dd75acc59cf7b9e7466527d774a9f9.tar.bz2
Various fixes.
* .gitignore: Add gitid.h * Makefile.am: Build gitid.h. * am/grecs.m4: Remove GRECS_VEROK_AT. * build-aux/getopt.m4 (print_version_hook): New variable. (print_version): Call print_version_hook, if defined. * src/Make.am (INCLUDES): Update. * src/grecs.h (grecs_version_info) <id>: New member. * src/version.c (grecs_version): Initialize id. * tests/Makefile.am: Remove GRECS_VEROK_AT. * tests/testsuite.at: Likewise.
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-rw-r--r--src/Make.am2
-rw-r--r--src/grecs.h1
-rw-r--r--src/version.c4
3 files changed, 5 insertions, 2 deletions
diff --git a/src/Make.am b/src/Make.am
index 50f9170..e415ada 100644
--- a/src/Make.am
+++ b/src/Make.am
@@ -35,7 +35,7 @@ noinst_HEADERS = yygrecs.h
EXTRA_DIST=grecs-gram.h $(PP_SETUP_FILE) Make.am Make-inst.am Make-shared.am Make-static.am
-INCLUDES = -I$(srcdir) @GRECS_INCLUDES@
+INCLUDES = -I$(srcdir) -I$(top_srcdir)/@GRECS_SUBDIR@ @GRECS_INCLUDES@
AM_YFLAGS = -dtv
AM_LFLAGS = -d
diff --git a/src/grecs.h b/src/grecs.h
index 8f0ddc6..decde1d 100644
--- a/src/grecs.h
+++ b/src/grecs.h
@@ -43,6 +43,7 @@
struct grecs_version_info {
const char *package;
const char *version;
+ const char *id;
int major;
int minor;
int patch;
diff --git a/src/version.c b/src/version.c
index 3e251d7..709e63e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -20,8 +20,9 @@
#include <grecs.h>
#include <string.h>
#include <ctype.h>
+#include "gitid.h"
-const char *grecs_version_string;
+const char *grecs_vcs_id = "$Id: " GRECS_GIT_ID " $";
struct grecs_version_info *
grecs_version_split(const char *vstr)
@@ -114,6 +115,7 @@ grecs_version(void)
#ifdef GRECS_VERSION_SUFFIX
pv->suffix = GRECS_VERSION_SUFFIX;
#endif
+ pv->id = GRECS_GIT_ID;
return pv;
}

Return to:

Send suggestions and report system problems to the System administrator.