[tor-commits] [tor/master] Basic support for a "make version" target to declare the source version

nickm at torproject.org nickm at torproject.org
Fri Nov 25 04:53:49 UTC 2011


commit 916aa8022d8bafac86966b71fb5b43f20cf91ccd
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Nov 24 23:53:18 2011 -0500

    Basic support for a "make version" target to declare the source version
    
    This is katmagic's idea.  See issue 4400.
---
 Makefile.am          |    7 +++++++
 changes/make_version |    4 ++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index cd0d883..b8d18d4 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
+
diff --git a/changes/make_version b/changes/make_version
new file mode 100644
index 0000000..b736a87
--- /dev/null
+++ b/changes/make_version
@@ -0,0 +1,4 @@
+  o Minor features (build):
+    - Running "make version" now displays the version of Tor that
+      we're about to build. Idea from katmagic; resolves issue 4400.
+



More information about the tor-commits mailing list