diff options
author | Darell Tan <darell.tan@gmail.com> | 2011-01-02 22:38:41 +0800 |
---|---|---|
committer | Darell Tan <darell.tan@gmail.com> | 2011-01-02 22:38:41 +0800 |
commit | 6f54e6bce3ccf7ad12a8f9a417fed4b4be16c463 (patch) | |
tree | 5a997cbe7c2cfb966d33452511e8d48a3df24425 | |
parent | 81c0027bd200bfc106989baa91ab5306864a11ee (diff) | |
download | mdns-repeater-6f54e6bce3ccf7ad12a8f9a417fed4b4be16c463.tar.gz mdns-repeater-6f54e6bce3ccf7ad12a8f9a417fed4b4be16c463.zip |
Added hg revision tag into executable to allow tracking of versions.
See http://mercurial.selenic.com/wiki/KeywordPlan
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | mdns-repeater.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,7 @@ # Makefile for mdns-repeater +HGVERSION=$(shell hg id -i) + CFLAGS=-Wall ifdef DEBUG @@ -9,6 +11,8 @@ CFLAGS+= -Os LDFLAGS+= -s endif +CFLAGS+= -DHGVERSION="\"${HGVERSION}\"" + .PHONY: all clean all: mdns-repeater diff --git a/mdns-repeater.c b/mdns-repeater.c index 5b5165b..05aa002 100644 --- a/mdns-repeater.c +++ b/mdns-repeater.c @@ -243,7 +243,7 @@ static void daemonize() { } static void show_help(const char *progname) { - fprintf(stderr, "mDNS repeater\n"); + fprintf(stderr, "mDNS repeater (rev %s)\n", HGVERSION); fprintf(stderr, "usage: %s [ -f ] <ifdev> ...\n", progname); fprintf(stderr, "\n" "<ifdev> specifies an interface like \"eth0\"\n" |