Subject: Re: [PATCH] To make GIT-VERSION-FILE, search for git more widely

From: Johannes Sixt <[email-masked]>
Date: Thu, 07 May 2009 10:35:15 +0200

(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