From: Nick Mathewson Date: Tue, 17 Apr 2007 21:16:40 +0000 (+0000) Subject: r12425@catbus: nickm | 2007-04-17 17:16:38 -0400 X-Git-Tag: tor-0.2.0.1-alpha~260 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a97361183454f69afc370e5f5a4a723094a7f95a;p=thirdparty%2Ftor.git r12425@catbus: nickm | 2007-04-17 17:16:38 -0400 Detect the svn version correctly when building from an svk checkout too. Whee, fun with bash and make. svn:r9985 --- diff --git a/ChangeLog b/ChangeLog index e77e5070fc..29dc10af23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,8 +23,8 @@ Changes in version 0.2.0.1-alpha - 2007-??-?? - When warning about missing headers, tell the user to let us know if the compile succeeds anyway, so we can downgrade the warning. - - If we're building from a subversion repository, include the current - SVN revision as part of the version string. + - If we're building from a subversion checkout or an SVK mirror, include + the current SVN revision as part of the version string. o Minor features (logging): - Always prepend "Bug: " to any log message about a bug. diff --git a/src/or/Makefile.am b/src/or/Makefile.am index 8e2011017e..ff24a5ffeb 100644 --- a/src/or/Makefile.am +++ b/src/or/Makefile.am @@ -37,6 +37,28 @@ micro-revision.i: FORCE sed -n 's/^Revision: \([0-9][0-9]*\).*/"\1"/p' > micro-revision.i \ || true; \ fi; \ + if test ! -f micro-revision.i -a x`which svk` != x; then\ + location=../..; \ + rev=x; \ + while test x$$rev = xx; do \ + x=`svk info $$location | \ + sed -n 's/^Mirrored From:.*, Rev\. \([0-9][0-9]*\)/\1/p'`; \ + if test x$$x != x; then \ + rev=$$x; \ + break; \ + else \ + loc=`svk info $$location | \ + sed -n 's/^Copied From: \(.*\), Rev\. [0-9][0-9]*/\1/p'`; \ + if test x$$loc == x; then \ + rev=""; \ + break; \ + else \ + location=/$$loc; \ + fi; \ + fi; \ + done; \ + echo \"$$rev\" > micro-revision.i; \ + fi; \ if test ! -f micro-revision.i; then \ echo '""' > micro-revision.i; \ fi