diff --git a/Makefile b/Makefile index d3d5c97893..a26d476c53 100644 --- a/Makefile +++ b/Makefile @@ -108,13 +108,13 @@ DEFINE = -DTPROXY # Now let's determine the version, sub-version and release date. # If we're in the GIT tree, we can use the last commit's version and date. ifeq ($(IGNOREGIT),) -VERSION := $(shell [ -d .git/. ] && ref=$$(git-describe --tags 2>/dev/null) && ref=$${ref%-g*} && echo "$${ref\#v}" ) +VERSION := $(shell [ -d .git/. ] && ref=`git-describe --tags 2>/dev/null` && ref=$${ref%-g*} && echo "$${ref\#v}" ) endif ifneq ($(VERSION),) # OK git is there and works. -SUBVERS := $(shell comms=$$(git-log --no-merges v$(VERSION).. 2>/dev/null |grep -c ^commit ); [ $$comms -gt 0 ] && echo "-$$comms" ) -VERDATE := $(shell date +%Y/%m/%d -d "$$(git-log HEAD^.. 2>/dev/null | grep -m 1 ^Date: | cut -f2- -d: | cut -f1 -d+)" ) +SUBVERS := $(shell comms=`git-log --no-merges v$(VERSION).. 2>/dev/null |grep -c ^commit `; [ $$comms -gt 0 ] && echo "-$$comms" ) +VERDATE := $(shell date +%Y/%m/%d -d "`git-log HEAD^.. 2>/dev/null | grep -m 1 ^Date: | cut -f2- -d: | cut -f1 -d+`" ) else # Otherwise, use the hard-coded version of last tag, number of changes # since last tag, and release date.