Commit bfeb97e6 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Fix svn_version.c generation so we only regenerate it if the revision has actually changed

git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4011 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 5a6dbcc2
...@@ -33,11 +33,19 @@ libvarnish_la_LIBADD = ${RT_LIBS} ${NET_LIBS} ${LIBM} ...@@ -33,11 +33,19 @@ libvarnish_la_LIBADD = ${RT_LIBS} ${NET_LIBS} ${LIBM}
DISTCLEANFILES = svn_version.c DISTCLEANFILES = svn_version.c
svn_version.c: FORCE svn_version.c: FORCE
echo '#include <libvarnish.h>' > svn_version.c V="$(shell svnversion -n $(top_srcdir))" \
echo 'const char* svn_version(void)' >> svn_version.c H="$(shell head -n 1 svn_version.c || true)"; \
echo -n '{ const char* SVN_Version = "' >> svn_version.c if [ "/* $$V */" != "$$H" ]; then \
svnversion -n $(top_srcdir) >> svn_version.c ( \
echo '"; return SVN_Version; }' >> svn_version.c echo "/* $$V */" ;\
echo "#include <libvarnish.h>" ;\
echo "const char* svn_version(void)" ;\
echo "{" ;\
echo " const char* SVN_Version = \"$$V\";" ;\
echo " return SVN_Version;" ;\
echo "}" ;\
) > svn_version.c ; \
fi
FORCE: FORCE:
if ENABLE_TESTS if ENABLE_TESTS
......
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