The following commit has been merged in the master branch: commit 1b5c168b2099ba94b17b6cc96052fd52a3937fa9 Author: Sven Eckelmann sven@narfation.org Date: Sun Apr 3 23:11:31 2011 +0200
batmand: 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 0249b10..c9098a6 100644 --- a/Makefile +++ b/Makefile @@ -66,8 +66,10 @@ SRC_O= $(SRC_C:.c=.o)
BINARY_NAME = batmand
-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`)
diff --git a/linux/modules/Makefile b/linux/modules/Makefile index 2aa20e1..e5f9bbf 100644 --- a/linux/modules/Makefile +++ b/linux/modules/Makefile @@ -12,21 +12,9 @@ endif UNAME:=$(shell uname -r) LINUX24=2.4 LINUX_VERSION:=$(findstring $(LINUX24),$(UNAME)) -REVISION:= $(shell if [ -d .svn ]; then \ - if which svn > /dev/null; then \ - svn info | grep "Rev:" | sed -e '1p' -n | awk '{print $$4}'; \ - else \ - echo "[unknown]"; \ - fi ; \ - else \ - if [ -d ~/.svk ]; then \ - if which svk > /dev/null; then \ - echo $$(svk info | grep "Mirrored From" | awk '{print $$5}'); \ - else \ - echo "[unknown]"; \ - fi; \ - fi; \ - fi) +REVISION= $(shell if [ -d ../../.git ]; then \ + echo $$(git describe --always --dirty 2> /dev/null || echo "[unknown]"); \ + fi)
include $(PWD)/Makefile.kbuild
diff --git a/linux/modules/Makefile.kbuild b/linux/modules/Makefile.kbuild index 18ac9a7..1be319b 100644 --- a/linux/modules/Makefile.kbuild +++ b/linux/modules/Makefile.kbuild @@ -3,7 +3,7 @@ ifeq ($(MAKING_MODULES),1) endif
LINUX24:=2.4 -EXTRA_CFLAGS +=-DREVISION_VERSION="\ rv$(REVISION)" +EXTRA_CFLAGS +=-DREVISION_VERSION="\ $(REVISION)"
ifneq ($(strip $(findstring $(LINUX24),$(LINUX_VERSION))),$(LINUX24))