diff options
| author | Toby Goodwin <toby@paccrat.org> | 2016-08-27 23:02:32 +0100 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2016-08-27 23:02:32 +0100 |
| commit | 89f1e1b445c2c50ffb61fa1327e11c475eb1b57f (patch) | |
| tree | fd0f294e72da286f2e7253859376859084599c96 | |
| parent | 98036baceaea6c37af19b64af547eb98b2ea19ee (diff) | |
replace problematic reldate with git describe (thanks @RamKromberg)
| -rw-r--r-- | configure.ac | 4 | ||||
| -rw-r--r-- | history.c | 2 | ||||
| -rw-r--r-- | main.c | 5 | ||||
| -rw-r--r-- | version.c.in | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index e86bef6..de243a6 100644 --- a/configure.ac +++ b/configure.ac @@ -2,8 +2,8 @@ dnl Our package name, version, ... AC_INIT([rc], [1.7.4]) dnl ... and release date -RELDATE=`date +%Y-%m-%d` -AC_DEFINE_UNQUOTED(RELDATE, "$RELDATE", [Release date]) +DESCRIPTION=$(git describe || echo '(git description unavailable)') +AC_DEFINE_UNQUOTED(DESCRIPTION, "$DESCRIPTION", [Release date]) dnl Get things going... AC_CONFIG_SRCDIR([rc.h]) @@ -20,7 +20,7 @@ #include <stdio.h> -static const char id[] = "$Release: @(#)" PACKAGE " " VERSION " " RELDATE " $"; +static const char id[] = "$Release: @(#)" PACKAGE " " VERSION " " DESCRIPTION " $"; #define CHUNKSIZE 65536 @@ -84,7 +84,10 @@ quitopts: #endif assigndefault("pid", nprint("%d", rc_pid), (void *)0); assigndefault("prompt", "; ", "", (void *)0); - assigndefault("version", VERSION, "$Release: @(#)" PACKAGE " " VERSION " " RELDATE " $", (void *)0); + assigndefault("version", + VERSION, + "$Release: @(#)" PACKAGE " " VERSION " " DESCRIPTION " $", + (void *)0 ); initenv(envp); initinput(); null[0] = NULL; diff --git a/version.c.in b/version.c.in index 967f0eb..691c9b0 100644 --- a/version.c.in +++ b/version.c.in @@ -1 +1 @@ -const char id[] = "@(#)@PACKAGE@ version @VERSION@, @RELDATE@."; +const char id[] = "@(#)@PACKAGE@ version @VERSION@, @DESCRIPTION@."; |