diff options
-rw-r--r-- | Makefile.in | 1 | ||||
-rw-r--r-- | src/apimagic.c | 13 |
2 files changed, 10 insertions, 4 deletions
diff --git a/Makefile.in b/Makefile.in index d8ae066..abf9377 100644 --- a/Makefile.in +++ b/Makefile.in @@ -83,7 +83,6 @@ include $(PROJECT_DIR)/project/overrides.mk -$(APP_SRCS:%.c=%.o): version.tag $(APP_SRCS:%.c=%.o): CFLAGS_STATIC = $(CFLAGS_APP) src/%.lo: $(PROJECT_DIR)/src/%.c $(ALL_HEADERS) host.tag dirs.tag version.tag diff --git a/src/apimagic.c b/src/apimagic.c index 670a6cc..f7fbf2f 100644 --- a/src/apimagic.c +++ b/src/apimagic.c @@ -7,7 +7,6 @@ #include <stdio.h> #include <unistd.h> #include <apimagic/apimagic.h> -#include "apimagic_version.h" #include "apimagic_driver_impl.h" #ifndef AMGC_DRIVER_FLAGS @@ -15,11 +14,19 @@ | AMGC_DRIVER_VERBOSITY_USAGE #endif -static const char vermsg[] = "%s (git://midipix.org/apimagic): commit %s.\n"; +static const char vermsg[] = "%s (git://midipix.org/apimagic): " + "version %d.%d.%d.\n" + "[commit reference: %s]\n"; static ssize_t apimagic_version(struct amgc_driver_ctx * dctx) { - return fprintf(stdout,vermsg,dctx->program,APIMAGIC_GIT_VERSION); + const struct amgc_source_version * verinfo; + + verinfo = amgc_source_version(); + + return fprintf(stdout,vermsg,dctx->program, + verinfo->major,verinfo->minor,verinfo->revision, + verinfo->commit); } static void apimagic_perform_unit_actions(struct amgc_unit_ctx * uctx) |