]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Basic support for a "make version" target to declare the source version
authorNick Mathewson <nickm@torproject.org>
Fri, 25 Nov 2011 04:53:18 +0000 (23:53 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 25 Nov 2011 04:53:18 +0000 (23:53 -0500)
This is katmagic's idea.  See issue 4400.

Makefile.am
changes/make_version [new file with mode: 0644]

index cd0d8833c6e6a161b61c02de309393a097e3ebe9..b8d18d4c0b7cb7e11d313091d017d152152dfa43 100644 (file)
@@ -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 (file)
index 0000000..b736a87
--- /dev/null
@@ -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.
+