diff options
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | llmnr-query.c | 5 | ||||
-rw-r--r-- | llmnrd.c | 5 |
3 files changed, 8 insertions, 5 deletions
@@ -3,6 +3,7 @@ # Copyright (C) 2014-2015 Tobias Klauser <tklauser@distanz.ch> VERSION = 0.1-rc1 +GIT_VERSION = `git describe --always` # llmnrd binary D_P = llmnrd @@ -20,7 +21,7 @@ INSTALL = install CFLAGS ?= -W -Wall -O2 LDFLAGS ?= -CFLAGS += -DVERSION_STRING=\"v$(VERSION)\" +CFLAGS += -DVERSION_STRING=\"v$(VERSION)\" -DGIT_VERSION=\"$(GIT_VERSION)\" ifeq ($(DEBUG), 1) CFLAGS += -g -DDEBUG diff --git a/llmnr-query.c b/llmnr-query.c index e7dd2fa..3635a53 100644 --- a/llmnr-query.c +++ b/llmnr-query.c @@ -61,9 +61,10 @@ static void __noreturn usage_and_exit(int status) static void __noreturn version_and_exit(void) { - fprintf(stdout, "llmnr-query %s\n" + fprintf(stdout, "llmnr-query %s (git id %s)\n" "Copyright (C) 2015 Tobias Klauser <tklauser@distanz.ch>\n" - "Licensed unter the GNU General Public License, version 2\n", VERSION_STRING); + "Licensed unter the GNU General Public License, version 2\n", + VERSION_STRING, GIT_VERSION); exit(EXIT_SUCCESS); } @@ -62,9 +62,10 @@ static void __noreturn usage_and_exit(int status) static void __noreturn version_and_exit(void) { - fprintf(stdout, "llmnrd %s\n" + fprintf(stdout, "llmnrd %s (git id %s)\n" "Copyright (C) 2014-2015 Tobias Klauser <tklauser@distanz.ch>\n" - "Licensed unter the GNU General Public License, version 2\n", VERSION_STRING); + "Licensed unter the GNU General Public License, version 2\n", + VERSION_STRING, GIT_VERSION); exit(EXIT_SUCCESS); } |