Re: 026fa0d5ad Breaks installs with absolue $(gitexecdir) and $(template_dir) variables using older GNU makes
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:06
Junio C Hamano [off-list ref] writes:
A Large Angry SCM [off-list ref] writes:quoted
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)