summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-24 19:22:44 -0400
committermidipix <writeonce@midipix.org>2016-04-24 19:29:34 -0400
commite39fca3756d1480bd0304b5c9135705629fd0630 (patch)
tree067aae6accd63ffcaafae1678a7800ff662f4212 /src
parent9f24d2dbde9818a5533b51dc329bfe5d018a3ddc (diff)
downloadslibtool-e39fca3756d1480bd0304b5c9135705629fd0630.tar.bz2
slibtool-e39fca3756d1480bd0304b5c9135705629fd0630.tar.xz
utility: integrated slbt_source_version().
Diffstat (limited to 'src')
-rw-r--r--src/slibtool.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/slibtool.c b/src/slibtool.c
index 179165a..e3bf2bb 100644
--- a/src/slibtool.c
+++ b/src/slibtool.c
@@ -8,7 +8,6 @@
#include <unistd.h>
#include <string.h>
#include <slibtool/slibtool.h>
-#include "slibtool_version.h"
#include "slibtool_driver_impl.h"
#ifndef SLBT_DRIVER_FLAGS
@@ -16,11 +15,19 @@
| SLBT_DRIVER_VERBOSITY_USAGE
#endif
-static const char vermsg[] = "%s (git://midipix.org/slibtool): commit %s.\n";
+static const char vermsg[] = "%s (git://midipix.org/slibtool): "
+ "version %d.%d.%d.\n"
+ "[commit reference: %s]\n";
static ssize_t slibtool_version(struct slbt_driver_ctx * dctx)
{
- return fprintf(stdout,vermsg,dctx->program,SLIBTOOL_GIT_VERSION);
+ const struct slbt_source_version * verinfo;
+
+ verinfo = slbt_source_version();
+
+ return fprintf(stdout,vermsg,dctx->program,
+ verinfo->major,verinfo->minor,verinfo->revision,
+ verinfo->commit);
}
static void slibtool_perform_driver_actions(struct slbt_driver_ctx * dctx)