From 7ffe7098dca297016f87a7e10554e6736f7c3ae2 Mon Sep 17 00:00:00 2001
From: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>
Date: Sat, 29 Jul 2006 17:25:03 +0100
Subject: Fix installation of templates on ancient systems.

Do not use $(call) for 'shell quoting' paths, and pass DESTDIR down
to the templates makefile.

[jc: we have fixed the main Makefile long time ago, but somehow
 forgot to apply the same fix to templates Makefile.]

Signed-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 templates/Makefile | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

(limited to 'templates/Makefile')

diff --git a/templates/Makefile b/templates/Makefile
index 8f7f4fec34..9e1ae1a4e0 100644
--- a/templates/Makefile
+++ b/templates/Makefile
@@ -6,11 +6,9 @@ prefix ?= $(HOME)
 template_dir ?= $(prefix)/share/git-core/templates/
 # DESTDIR=
 
-# Shell quote;
-# Result of this needs to be placed inside ''
-shq = $(subst ','\'',$(1))
-# This has surrounding ''
-shellquote = '$(call shq,$(1))'
+# Shell quote (do not use $(call) to accomodate ancient setups);
+DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
+template_dir_SQ = $(subst ','\'',$(template_dir))
 
 all: boilerplates.made custom
 
@@ -43,6 +41,6 @@ clean:
 	rm -rf blt boilerplates.made
 
 install: all
-	$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(template_dir))
+	$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(template_dir_SQ)'
 	(cd blt && $(TAR) cf - .) | \
-	(cd $(call shellquote,$(DESTDIR)$(template_dir)) && $(TAR) xf -)
+	(cd '$(DESTDIR_SQ)$(template_dir_SQ)' && $(TAR) xf -)
-- 
cgit v1.2.1