diff --git a/Makefile b/Makefile index 3d67fd27f..54d345f08 100644 --- a/Makefile +++ b/Makefile @@ -396,7 +396,7 @@ $(set_target_defaults) # holding the same names in the current directory. ifeq ($(IGNOREGIT),) -VERSION := $(shell [ -d .git/. ] && ref=`(git describe --tags --match 'v*' --abbrev=0) 2>/dev/null` && ref=$${ref%-g*} && echo "$${ref\#v}") +VERSION := $(shell [ -d .git/. ] && (git describe --tags --match 'v*' --abbrev=0 | cut -c 2-) 2>/dev/null) ifneq ($(VERSION),) # OK git is there and works. SUBVERS := $(shell comms=`git log --format=oneline --no-merges v$(VERSION).. 2>/dev/null | wc -l | tr -d '[:space:]'`; commit=`(git log -1 --pretty=%h --abbrev=6) 2>/dev/null`; [ $$comms -gt 0 ] && echo "-$$commit-$$comms")