git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Makefile: fix misdetection of relative pathnames

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Feb 5, 2009, 12:27 UTC
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
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 13 in “026fa0d5ad Breaks installs with absolue $(gitexecdir) and $(template_dir) variables using older GNU makes”
  1. A Large Angry SCMFeb 1, 2009
  2. Junio C HamanoFeb 5, 2009
  3. Steffen ProhaskaFeb 5, 2009
  4. Junio C HamanoFeb 5, 2009
  5. Pascal ObryFeb 5, 2009
  6. Junio C HamanoFeb 5, 2009
  7. Pascal ObryFeb 5, 2009
  8. Junio C HamanoFeb 5, 2009
  9. Junio C HamanoFeb 5, 2009
  10. Makefile: fix misdetection of relative pathnamesJunio C Hamano, Feb 5, 2009
  11. Johannes SixtFeb 5, 2009
  12. Junio C HamanoFeb 5, 2009
  13. A Large Angry SCMFeb 5, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.