Browse Source

Basic support for a "make version" target to declare the source version

This is katmagic's idea.  See issue 4400.
Nick Mathewson 12 years ago
parent
commit
916aa8022d
2 changed files with 11 additions and 0 deletions
  1. 7 0
      Makefile.am
  2. 4 0
      changes/make_version

+ 7 - 0
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
+

+ 4 - 0
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.
+