From: Michael Stapelberg Date: Mon, 11 Jul 2011 16:12:57 +0000 (+0200) Subject: common.mk: correctly determine git branch for subfolders X-Git-Tag: tree-pr4~33 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6fb186c77cf5494c5db15164a32091c4923bf421;p=i3%2Fi3 common.mk: correctly determine git branch for subfolders --- diff --git a/common.mk b/common.mk index 41946d41..ff12bdb0 100644 --- a/common.mk +++ b/common.mk @@ -10,7 +10,7 @@ SYSCONFDIR=$(PREFIX)/etc endif TERM_EMU=xterm # The escaping is absurd, but we need to escape for shell, sed, make, define -GIT_VERSION:="$(shell git describe --tags --always) ($(shell git log --pretty=format:%cd --date=short -n1), branch $(shell [ -f .git/HEAD ] && sed 's/ref: refs\/heads\/\(.*\)/\\\\\\"\1\\\\\\"/g' .git/HEAD || echo 'unknown'))" +GIT_VERSION:="$(shell git describe --tags --always) ($(shell git log --pretty=format:%cd --date=short -n1), branch $(shell [ -f $(TOPDIR)/.git/HEAD ] && sed 's/ref: refs\/heads\/\(.*\)/\\\\\\"\1\\\\\\"/g' $(TOPDIR)/.git/HEAD || echo 'unknown'))" VERSION:=$(shell git describe --tags --abbrev=0) ifeq ($(shell which pkg-config 2>/dev/null 1>/dev/null || echo 1),1)