aboutsummaryrefslogtreecommitdiff
path: root/src/or/Makefile.am
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-04-18 19:28:47 +0000
committerNick Mathewson <nickm@torproject.org>2007-04-18 19:28:47 +0000
commitaddf2987c58b86aa98b1771200d724e514adb7cb (patch)
treef9227b3b8a0bd993f35ca8c99b968a54b4cc5d27 /src/or/Makefile.am
parenta97361183454f69afc370e5f5a4a723094a7f95a (diff)
downloadtor-addf2987c58b86aa98b1771200d724e514adb7cb.tar
tor-addf2987c58b86aa98b1771200d724e514adb7cb.tar.gz
r12429@catbus: nickm | 2007-04-18 15:28:41 -0400
Make svn revision number visible in version even if building from a .tar.gz. This was remarkably painless. svn:r9988
Diffstat (limited to 'src/or/Makefile.am')
-rw-r--r--src/or/Makefile.am24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/or/Makefile.am b/src/or/Makefile.am
index ff24a5ffe..5e8ba2789 100644
--- a/src/or/Makefile.am
+++ b/src/or/Makefile.am
@@ -26,38 +26,38 @@ test_SOURCES = buffers.c circuitbuild.c circuitlist.c \
test_LDADD = ../common/libor.a ../common/libor-crypto.a
-noinst_HEADERS = or.h eventdns.h eventdns_tor.h
+noinst_HEADERS = or.h eventdns.h eventdns_tor.h micro-revision.i
tor_main.o: micro-revision.i
micro-revision.i: FORCE
- rm -f micro-revision.i; \
if test -d ../../.svn ; then \
svn info ../.. | \
sed -n 's/^Revision: \([0-9][0-9]*\).*/"\1"/p' > micro-revision.i \
- || true; \
+ || 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 | \
+ 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; \
+ if test x$$x != x; then \
+ rev=$$x; \
break; \
else \
- loc=`svk info $$location | \
+ loc=`svk info $$location | \
sed -n 's/^Copied From: \(.*\), Rev\. [0-9][0-9]*/\1/p'`; \
- if test x$$loc == x; then \
- rev=""; \
+ if test x$$loc = x; then \
break; \
else \
- location=/$$loc; \
+ location=/$$loc; \
fi; \
fi; \
done; \
- echo \"$$rev\" > micro-revision.i; \
+ if test x$$rev != x; then \
+ echo \"$$rev\" > micro-revision.i; \
+ fi; \
fi; \
if test ! -f micro-revision.i; then \
echo '""' > micro-revision.i; \