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

Re: 026fa0d5ad Breaks installs with absolue $(gitexecdir) and $(template_dir) variables using older GNU makes

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 5, 2009, 07:44 UTC
Message-ID
<7vzlh1gwf4.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<7v63jpibe8.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> A Large Angry SCM <gitzilla@gmail.com> writes:
>
>> The new test is also wrong; (for *nix systems) in that it really wants
>> to test if the first character is a '/' but GNU make doesn't have a
>> way to do that directly.
>
> Hmph.  Isn't it just the matter of doing something silly like this?
>
> ifeq ($(filter /%,$(template_dir)),)
> 	... it does not start with a slash
> else
> 	... it does
> endif
That is, something like this.
The patch also protects the $(filter) check from sick users that use
	template_dir = My Files /the-leading-dir-ends-with-a-space
by using $(firstword)
No, I didn't test it.
 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git c/Makefile w/Makefile
index a82f173..605b147 100644
--- c/Makefile
+++ w/Makefile
@@ -1434,14 +1434,14 @@ remove-dashes:
 
 ### Installation rules
 
-ifeq ($(abspath $(template_dir)),$(template_dir))
+ifneq ($(filter /%,$(firstword $(template_dir))),)
 template_instdir = $(template_dir)
 else
 template_instdir = $(prefix)/$(template_dir)
 endif
 export template_instdir
 
-ifeq ($(abspath $(gitexecdir)),$(gitexecdir))
+ifneq ($(filter /%,$(firstword $(gitexecdir))),)
 gitexec_instdir = $(gitexecdir)
 else
 gitexec_instdir = $(prefix)/$(gitexecdir)
Previous: Junio C HamanoNext: Junio C Hamano
Message 9 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.