It is possible that the kernel used to build the batman-adv module also contains a .git directory. The makefile should not try to run git-describe inside this kernel to prevent that wrong version information is stored in the generated module.
Signed-off-by: Sven Eckelmann sven@narfation.org --- Makefile | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile index 99fd366..e2276be 100644 --- a/Makefile +++ b/Makefile @@ -32,8 +32,8 @@ endif export KERNELPATH RM ?= rm -f
-REVISION= $(shell if [ -d .git ]; then \ - echo $$(git describe --always --dirty --match "v*" |sed 's/^v//' 2> /dev/null || echo "[unknown]"); \ +REVISION= $(shell if [ -d "$(PWD)/.git" ]; then \ + echo $$(git --git-dir="$(PWD)/.git" describe --always --dirty --match "v*" |sed 's/^v//' 2> /dev/null || echo "[unknown]"); \ fi)
CONFIG_BATMAN_ADV=m