[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r9985: Detect the svn version correctly when building from an svk c (in tor/trunk: . src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r9985: Detect the svn version correctly when building from an svk c (in tor/trunk: . src/or)
- From: nickm@xxxxxxxx
- Date: Tue, 17 Apr 2007 17:16:42 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Tue, 17 Apr 2007 17:16:49 -0400
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: nickm
Date: 2007-04-17 17:16:40 -0400 (Tue, 17 Apr 2007)
New Revision: 9985
Modified:
tor/trunk/
tor/trunk/ChangeLog
tor/trunk/src/or/Makefile.am
Log:
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.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r12425] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2007-04-17 18:54:29 UTC (rev 9984)
+++ tor/trunk/ChangeLog 2007-04-17 21:16:40 UTC (rev 9985)
@@ -23,8 +23,8 @@
- 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.
Modified: tor/trunk/src/or/Makefile.am
===================================================================
--- tor/trunk/src/or/Makefile.am 2007-04-17 18:54:29 UTC (rev 9984)
+++ tor/trunk/src/or/Makefile.am 2007-04-17 21:16:40 UTC (rev 9985)
@@ -37,6 +37,28 @@
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