diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-04-17 21:16:40 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-04-17 21:16:40 +0000 |
commit | a97361183454f69afc370e5f5a4a723094a7f95a (patch) | |
tree | 01e834576c8328d3f0420a2a617ea9dae61120f2 /src | |
parent | 00941b01714b08623110ee831a0f479ce194b389 (diff) | |
download | tor-a97361183454f69afc370e5f5a4a723094a7f95a.tar.gz tor-a97361183454f69afc370e5f5a4a723094a7f95a.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/or/Makefile.am | 22 |
1 files changed, 22 insertions, 0 deletions
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 |