From a1973c4d829adb0b98e5a9d14b5d60d119e019f0 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 9 Apr 2007 22:07:11 +0200 Subject: [PATCH] [CLEANUP] make makefile more old sh-friendly Older SH on Solaris does not know about $(cmd) but only know `cmd`. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d3d5c9789..a26d476c5 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.