{"thread":{"id":"5078","subject":"[PATCH 3/10] Fix installation of templates on ancient systems.","startedAt":"2006-08-02T01:03:20Z","lastAt":"2006-08-02T01:03:20Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":10},"messages":[{"id":"24535","messageId":"00aa01c6b5cf$72231f80$c47eedc1@ramsay1.demon.co.uk","threadId":"5078","inReplyTo":null,"subject":"[PATCH 3/10] Fix installation of templates on ancient systems.","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2006-08-02T01:03:20Z","receivedAt":"2006-08-02T01:03:20Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Do not use $(call) for 'shell quoting' paths, and pass DESTDIR down\nto the templates makefile.\n\nSigned-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>\n---\n Makefile           |    2 +-\n templates/Makefile |   12 +++++-------\n 2 files changed, 6 insertions(+), 8 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex cde619c..180dbd0 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -662,7 +662,7 @@ install: all\n \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n \t$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n \t$(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'\n-\t$(MAKE) -C templates install\n+\t$(MAKE) -C templates install DESTDIR=$(DESTDIR)\n \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'\n \t$(INSTALL) $(PYMODULES) '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'\n \tif test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \\\ndiff --git a/templates/Makefile b/templates/Makefile\nindex 8f7f4fe..9e1ae1a 100644\n--- a/templates/Makefile\n+++ b/templates/Makefile\n@@ -6,11 +6,9 @@ prefix ?= $(HOME)\n template_dir ?= $(prefix)/share/git-core/templates/\n # DESTDIR=\n \n-# Shell quote;\n-# Result of this needs to be placed inside ''\n-shq = $(subst ','\\'',$(1))\n-# This has surrounding ''\n-shellquote = '$(call shq,$(1))'\n+# Shell quote (do not use $(call) to accomodate ancient setups);\n+DESTDIR_SQ = $(subst ','\\'',$(DESTDIR))\n+template_dir_SQ = $(subst ','\\'',$(template_dir))\n \n all: boilerplates.made custom\n \n@@ -43,6 +41,6 @@ clean:\n \trm -rf blt boilerplates.made\n \n install: all\n-\t$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(template_dir))\n+\t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(template_dir_SQ)'\n \t(cd blt && $(TAR) cf - .) | \\\n-\t(cd $(call shellquote,$(DESTDIR)$(template_dir)) && $(TAR) xf -)\n+\t(cd '$(DESTDIR_SQ)$(template_dir_SQ)' && $(TAR) xf -)\n-- \n1.4.1\n\n\nFrom 4903e542f4361d06361027c10e38750eee7a1208 Mon Sep 17 00:00:00 2001\nFrom: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>\nDate: Sat, 29 Jul 2006 17:25:03 +0100\nSubject: [PATCH 3/10] Fix installation of templates on ancient systems.\n\nDo not use $(call) for 'shell quoting' paths, and pass DESTDIR down\nto the templates makefile.\n\nSigned-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>\n---\n Makefile           |    2 +-\n templates/Makefile |   12 +++++-------\n 2 files changed, 6 insertions(+), 8 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex cde619c..180dbd0 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -662,7 +662,7 @@ install: all\n \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n \t$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n \t$(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'\n-\t$(MAKE) -C templates install\n+\t$(MAKE) -C templates install DESTDIR=$(DESTDIR)\n \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'\n \t$(INSTALL) $(PYMODULES) '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'\n \tif test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \\\ndiff --git a/templates/Makefile b/templates/Makefile\nindex 8f7f4fe..9e1ae1a 100644\n--- a/templates/Makefile\n+++ b/templates/Makefile\n@@ -6,11 +6,9 @@ prefix ?= $(HOME)\n template_dir ?= $(prefix)/share/git-core/templates/\n # DESTDIR=\n \n-# Shell quote;\n-# Result of this needs to be placed inside ''\n-shq = $(subst ','\\'',$(1))\n-# This has surrounding ''\n-shellquote = '$(call shq,$(1))'\n+# Shell quote (do not use $(call) to accomodate ancient setups);\n+DESTDIR_SQ = $(subst ','\\'',$(DESTDIR))\n+template_dir_SQ = $(subst ','\\'',$(template_dir))\n \n all: boilerplates.made custom\n \n@@ -43,6 +41,6 @@ clean:\n \trm -rf blt boilerplates.made\n \n install: all\n-\t$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(template_dir))\n+\t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(template_dir_SQ)'\n \t(cd blt && $(TAR) cf - .) | \\\n-\t(cd $(call shellquote,$(DESTDIR)$(template_dir)) && $(TAR) xf -)\n+\t(cd '$(DESTDIR_SQ)$(template_dir_SQ)' && $(TAR) xf -)\n-- \n1.4.1\n\n"}]}