aboutsummaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-11-24 23:53:18 -0500
committerNick Mathewson <nickm@torproject.org>2011-11-24 23:53:18 -0500
commit916aa8022d8bafac86966b71fb5b43f20cf91ccd (patch)
treeefdfaecc90deb592e7788cf9a7d8923f9170ecd9 /Makefile.am
parenteaa3a379f0ba15e488054a686b1eb838ebbf7cc5 (diff)
downloadtor-916aa8022d8bafac86966b71fb5b43f20cf91ccd.tar
tor-916aa8022d8bafac86966b71fb5b43f20cf91ccd.tar.gz
Basic support for a "make version" target to declare the source version
This is katmagic's idea. See issue 4400.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index cd0d8833c..b8d18d4c0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,3 +70,10 @@ check-logs:
./contrib/checkLogs.pl \
src/*/*.[ch] | sort -n
+version:
+ @echo "Tor @VERSION@"
+ @if test -d "$(top_srcdir)/.git" && test -x "`which git 2>&1;true`"; then \
+ echo -n "git: " ;\
+ (cd "$(top_srcdir)" && git rev-parse --short=16 HEAD); \
+ fi
+