The following commit has been merged in the master branch: commit 9c767f8fc578222183214001b947f3f6fb1f8928 Author: Sven Eckelmann sven@narfation.org Date: Sun Apr 3 23:36:52 2011 +0200
vis: Remove subversion/svk revision information
The current version of batmand cannot be obtained from subversion or svk anymore. It is unnecessary to provide the functionality to retrieve the current revision using these tools.
We only have to differenciate between git checkout and official release. We cannot detect a git snapshot and thus the distribution has to provide the REVISION variable for snapshots.
Signed-off-by: Sven Eckelmann sven@narfation.org
diff --git a/Makefile b/Makefile index db1f885..5cd4b00 100644 --- a/Makefile +++ b/Makefile @@ -38,8 +38,10 @@ SRC_O= $(SRC_C:.c=.o)
BINARY_NAME= vis
-REVISION:= $(shell if [ -d .svn ]; then svn info | grep "Rev:" | sed -e '1p' -n | awk '{print $$4}'; else if [ -d ~/.svk ]; then echo $$(svk info | grep "Mirrored From" | awk '{print $$5}'); fi; fi) -REVISION_VERSION="\ rv$(REVISION)" +REVISION= $(shell if [ -d .git ]; then \ + echo $$(git describe --always --dirty 2> /dev/null || echo "[unknown]"); \ + fi) +REVISION_VERSION="\ $(REVISION)"
NUM_CPUS = $(shell NUM_CPUS=`cat /proc/cpuinfo | grep -v 'model name' | grep processor | tail -1 | awk -F' ' '{print $$3}'`;echo `expr $$NUM_CPUS + 1`)