mirror of
https://github.com/yarrick/iodine.git
synced 2024-09-08 12:07:04 +00:00
Print git revision as version
This commit is contained in:
parent
0f7c3782b8
commit
fb9e930fee
|
@ -6,10 +6,11 @@ SERVER = ../bin/iodined
|
||||||
|
|
||||||
OS = `echo $(TARGETOS) | tr "a-z" "A-Z"`
|
OS = `echo $(TARGETOS) | tr "a-z" "A-Z"`
|
||||||
ARCH = `uname -m`
|
ARCH = `uname -m`
|
||||||
|
HEAD_COMMIT = `git rev-parse --short HEAD`
|
||||||
|
|
||||||
LIBPATH = -L.
|
LIBPATH = -L.
|
||||||
LDFLAGS += -lz `sh osflags $(TARGETOS) link` $(LIBPATH)
|
LDFLAGS += -lz `sh osflags $(TARGETOS) link` $(LIBPATH)
|
||||||
CFLAGS += -c -g -Wall -D$(OS) -pedantic `sh osflags $(TARGETOS) cflags`
|
CFLAGS += -c -g -Wall -D$(OS) -pedantic `sh osflags $(TARGETOS) cflags` -DGITREVISION=\"$(HEAD_COMMIT)\"
|
||||||
|
|
||||||
all: stateos $(CLIENT) $(SERVER)
|
all: stateos $(CLIENT) $(SERVER)
|
||||||
|
|
||||||
|
|
|
@ -101,12 +101,9 @@ help() {
|
||||||
|
|
||||||
static void
|
static void
|
||||||
version() {
|
version() {
|
||||||
char *svnver;
|
|
||||||
|
|
||||||
svnver = "$Rev$ from $Date$";
|
|
||||||
|
|
||||||
fprintf(stderr, "iodine IP over DNS tunneling client\n");
|
fprintf(stderr, "iodine IP over DNS tunneling client\n");
|
||||||
fprintf(stderr, "SVN version: %s\n", svnver);
|
fprintf(stderr, "Git version: %s\n", GITREVISION);
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2228,10 +2228,8 @@ help() {
|
||||||
|
|
||||||
static void
|
static void
|
||||||
version() {
|
version() {
|
||||||
char *svnver;
|
|
||||||
svnver = "$Rev$ from $Date$";
|
|
||||||
fprintf(stderr, "iodine IP over DNS tunneling server\n");
|
fprintf(stderr, "iodine IP over DNS tunneling server\n");
|
||||||
fprintf(stderr, "SVN version: %s\n", svnver);
|
fprintf(stderr, "Git version: %s\n", GITREVISION);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue