From: Johannes Sixt Date: Thu, 05 Feb 2009 12:27:07 GMT Subject: Re: [PATCH] Makefile: fix misdetection of relative pathnames Message-ID: <498ADB1B.7030300@viscovery.net> In-Reply-To: <7vhc39guv2.fsf@gitster.siamese.dyndns.org> Junio C Hamano schrieb: > -ifeq ($(abspath $(template_dir)),$(template_dir)) > +ifneq ($(filter /%,$(firstword $(template_dir))),) > -ifeq ($(abspath $(gitexecdir)),$(gitexecdir)) > +ifneq ($(filter /%,$(firstword $(gitexecdir))),) No, this does not work on Windows for the use-case that this check is intended for, namely when the user specifies an *absolute* path for gitexecdir and/or template_dir in config.mak [*]. Neither does the version that uses $(abspath ...)! Because $(abspath ...) does not work in our msysgit environment (that has GNU make 3.79.1). That said, I don't think it's worth to cater for this use-case, precisely because we want to *avoid* absolute paths on Windows anyway, and apply the change that you proposed here. [*] The reason it does not work is that we cannot use MSYS-style absolute paths /c/Foo/Bar because the paths will be interpreted by git, which does not understand them; the user must specify drive-letter absolute paths c:/Foo/Bar, but the check does not catch them. -- Hannes