From: Johannes Sixt Date: Thu, 07 May 2009 08:35:15 GMT Subject: Re: [PATCH] To make GIT-VERSION-FILE, search for git more widely Message-ID: <4A029D43.4030604@viscovery.net> In-Reply-To: <1241684666-18956-1-git-send-email-matthias.andree@gmx.de> (sorry for the previous message; fingers were too fast) Matthias Andree schrieb: > + VN=$(${GIT} describe --abbrev=4 HEAD 2>/dev/null) && > + ${GIT} update-index -q --refresh > + test -z "$(${GIT} diff-index --name-only HEAD --)" || Use "$GIT" in all those cases > GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE > - @$(SHELL_PATH) ./GIT-VERSION-GEN > + @{ GIT=./git$X ; type $$GIT >/dev/null 2>&1 ; } \ + @{ GIT=./git$X ; type "$$GIT" >/dev/null 2>&1 ; } \ > + || { GIT=$(prefix)/bin/git$X ; type $$GIT >/dev/null 2>&1 ; }\ + || { GIT='$(prefix_SQ)/bin/git$X' ; type "$$GIT" >/dev/null 2>&1 ; }\ BTW, isn't `test -x "$GIT"` better in some way than `type "$GIT"`? > + || GIT=git ; \ > + export GIT ; \ > + $(SHELL_PATH) ./GIT-VERSION-GEN -- Hannes