From 3ae4c335788fa297f2d4bdb022a9e294a0ff6957 Mon Sep 17 00:00:00 2001 From: Mark Janssen Date: Fri, 13 Apr 2007 09:36:20 +0000 Subject: [PATCH] getrev.sh get SVN revision number for this build Work this number into the welcome/help message/build-info git-svn-id: https://proxytunnel.svn.sourceforge.net/svnroot/proxytunnel/trunk/proxytunnel@158 bc163920-b10d-0410-b2c5-a5491ca2ceef --- Makefile | 2 ++ cmdline.c | 2 +- getrev.sh | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100755 getrev.sh diff --git a/Makefile b/Makefile index a86742f..a7489b2 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,8 @@ CFLAGS += -DHAVE_GETOPT_LONG # Comment on non-gnu systems CFLAGS += -DUSE_SSL # Comment if you don't have/want ssl # Most systems CFLAGS += -DSETPROCTITLE -DSPT_TYPE=2 +REV = $(shell ./getrev.sh) +CFLAGS += -DREV=$(REV) # Testing new flags CFLAGS += -DSO_REUSEPORT # Comment if you don't have this flag diff --git a/cmdline.c b/cmdline.c index e1e8300..d0d85bb 100644 --- a/cmdline.c +++ b/cmdline.c @@ -35,7 +35,7 @@ void cmdline_parser_print_version (void) { - printf ("%s %s\nCopyright 2001-2006 Proxytunnel Project\n%s\n", PACKAGE, VERSION, AUTHORS); + printf ("%s %s (rev %d)\nCopyright 2001-2006 Proxytunnel Project\n%s\n", PACKAGE, VERSION, REV, AUTHORS); } void diff --git a/getrev.sh b/getrev.sh new file mode 100755 index 0000000..9ade367 --- /dev/null +++ b/getrev.sh @@ -0,0 +1,2 @@ +#!/bin/sh +svn info . | grep '^Revision' | awk '{print $2}'