Commit 6c110ac5 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Include SVN revision in version string


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4006 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 9dd4072e
......@@ -128,3 +128,4 @@ do { \
} while (0)
int inxorcise(int nochdir, int noclose);
const char* svn_version(void);
......@@ -16,6 +16,7 @@ libvarnish_la_SOURCES = \
flopen.c \
inxorcise.c \
num.c \
svn_version.c \
time.c \
tcp.c \
vct.c \
......@@ -30,6 +31,13 @@ libvarnish_la_SOURCES = \
libvarnish_la_LIBADD = ${RT_LIBS} ${NET_LIBS} ${LIBM}
svn_version.c: FORCE
echo '#include <libvarnish.h>' > svn_version.c
echo 'const char* svn_version(void)' >> svn_version.c
echo -n '{ const char* SVN_Version = "' >> svn_version.c
svnversion -n $(top_srcdir) >> svn_version.c
echo '"; return SVN_Version; }' >> svn_version.c
FORCE:
if ENABLE_TESTS
TESTS = num_c_test
......
......@@ -40,8 +40,8 @@
void
varnish_version(const char *progname)
{
fprintf(stderr, "%s (%s-%s)\n", progname,
PACKAGE_TARNAME, PACKAGE_VERSION);
fprintf(stderr, "%s (%s-%s SVN %s)\n", progname,
PACKAGE_TARNAME, PACKAGE_VERSION, svn_version());
fprintf(stderr,
"Copyright (c) 2006-2009 Linpro AS / Verdens Gang AS\n");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment