diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-12-11 06:52:24 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-12-11 06:52:24 +0000 |
commit | 240ee1866b35f8f5bc25a554f9f190b1ad23ce53 (patch) | |
tree | e4f85e0cf272fb10a81a1c67d91d6ebc4f74495a /src/or/Makefile.am | |
parent | d7563ee231c2c11d18f4054a53dc7bdc5464f24f (diff) | |
download | tor-240ee1866b35f8f5bc25a554f9f190b1ad23ce53.tar.gz tor-240ee1866b35f8f5bc25a554f9f190b1ad23ce53.zip |
Add experimental support for learning svn revision number in git-svn based repositories. Fancy.
svn:r17581
Diffstat (limited to 'src/or/Makefile.am')
-rw-r--r-- | src/or/Makefile.am | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/or/Makefile.am b/src/or/Makefile.am index d7bac19708..28d7e736dc 100644 --- a/src/or/Makefile.am +++ b/src/or/Makefile.am @@ -55,11 +55,18 @@ noinst_HEADERS = or.h eventdns.h eventdns_tor.h micro-revision.i tor_main.o: micro-revision.i micro-revision.i: FORCE - @svkdir=$$SVKROOT; \ - if test "x$$svkdir" = x ; then \ - svkdir=$$HOME/.svk; \ - fi; \ - if test -d ../../.svn && test -x "`which svn 2>&1;true`" ; then \ + @svkdir=$$SVKROOT; \ + if test "x$$svkdir" = x ; then \ + svkdir=$$HOME/.svk; \ + fi; \ + if test -d ../../.git && test -x "`which git 2>&1;true`" ; then \ + if test -d ../../.git/svn && test -x "`which git-svn 2>&1;true`" ; then \ + git-svn info ../../README | \ + sed -n 's/^Revision: \([0-9][0-9]*\).*/"\1"/p' \ + > micro-revision.tmp \ + || true; \ + fi; \ + elif test -d ../../.svn && test -x "`which svn 2>&1;true`" ; then \ svn info ../.. | \ sed -n 's/^Revision: \([0-9][0-9]*\).*/"\1"/p' > micro-revision.tmp \ || true; \ |