aboutsummaryrefslogtreecommitdiff
path: root/src/or/Makefile.am
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-04-16 23:56:31 +0000
committerNick Mathewson <nickm@torproject.org>2007-04-16 23:56:31 +0000
commitbfac679cd4209ea441211bcb5c5e210c6264e8c7 (patch)
tree541e482d67428e9c0015a4cd358ca9961f4413a8 /src/or/Makefile.am
parent362fbc79d276864c4b2b68ed9cf3bb8ba534985e (diff)
downloadtor-bfac679cd4209ea441211bcb5c5e210c6264e8c7.tar.gz
tor-bfac679cd4209ea441211bcb5c5e210c6264e8c7.zip
A hack I've been wanting for a while: when building a -dev version
from an SVN repository, use the current svn revision in the platform string and in the output of --version. svn:r9976
Diffstat (limited to 'src/or/Makefile.am')
-rw-r--r--src/or/Makefile.am14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/or/Makefile.am b/src/or/Makefile.am
index 9991a67a2e..8e2011017e 100644
--- a/src/or/Makefile.am
+++ b/src/or/Makefile.am
@@ -28,3 +28,17 @@ test_LDADD = ../common/libor.a ../common/libor-crypto.a
noinst_HEADERS = or.h eventdns.h eventdns_tor.h
+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; \
+ fi; \
+ if test ! -f micro-revision.i; then \
+ echo '""' > micro-revision.i; \
+ fi
+
+FORCE: