]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Fix installation of templates on ancient systems.
authorRamsay Allan Jones <ramsay@ramsay1.demon.co.uk>
Sat, 29 Jul 2006 16:25:03 +0000 (17:25 +0100)
committerJunio C Hamano <junkio@cox.net>
Wed, 2 Aug 2006 07:27:18 +0000 (00:27 -0700)
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>
Makefile
templates/Makefile

index 15864e23bd18d1068cef6fb87dc47ba628840df7..6df93c18fc3589592bc6598fd04bf9cf3ba7799e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -712,7 +712,7 @@ install: all
        $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
        $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
        $(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'
-       $(MAKE) -C templates install
+       $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
        $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'
        $(INSTALL) $(PYMODULES) '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'
        if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \
index 8f7f4fec34ad76b85d61f20821f18a1d3ca9a3b2..9e1ae1a4e0322a37b494177474a964caf05ca4dd 100644 (file)
@@ -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 -)