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
This commit is contained in:
Mark Janssen 2007-04-13 09:36:20 +00:00
parent 917a5c435d
commit 3ae4c33578
3 changed files with 5 additions and 1 deletions

View file

@ -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

View file

@ -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

2
getrev.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
svn info . | grep '^Revision' | awk '{print $2}'