@matheusbsbs / matheus-bagliano / commits / 7ffe7098dc
Fork 0

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>

Ramsay Allan Jones committed Jul 29, 2006 at 17:25 UTC 7ffe7098dca297016f87a7e10554e6736f7c3ae2
2 files changed +6 -8
Makefile
+1 -1
@@ -712,7 +712,7 @@ install: all
712 $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
713 $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
714 $(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'
715 - $(MAKE) -C templates install
715 + $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
716 $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'
717 $(INSTALL) $(PYMODULES) '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'
718 if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \
templates/Makefile
+5 -7
@@ -6,11 +6,9 @@ prefix ?= $(HOME)
6 template_dir ?= $(prefix)/share/git-core/templates/
7 # DESTDIR=
8
9 -# Shell quote;
10 -# Result of this needs to be placed inside ''
11 -shq = $(subst ','\'',$(1))
12 -# This has surrounding ''
13 -shellquote = '$(call shq,$(1))'
9 +# Shell quote (do not use $(call) to accomodate ancient setups);
10 +DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
11 +template_dir_SQ = $(subst ','\'',$(template_dir))
12
13 all: boilerplates.made custom
14
@@ -43,6 +41,6 @@ clean:
41 rm -rf blt boilerplates.made
42
43 install: all
46 - $(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(template_dir))
44 + $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(template_dir_SQ)'
45 (cd blt && $(TAR) cf - .) | \
48 - (cd $(call shellquote,$(DESTDIR)$(template_dir)) && $(TAR) xf -)
46 + (cd '$(DESTDIR_SQ)$(template_dir_SQ)' && $(TAR) xf -)