{"thread":{"id":"3367","subject":"[PATCH 1/5] Fixes for ancient versions of GNU make","startedAt":"2006-02-17T14:22:21Z","lastAt":"2006-02-18T11:40:22Z","messageCount":5,"participants":["Johannes Schindelin","Jason Riedy","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"16317","messageId":"Pine.LNX.4.63.0602171522020.24274@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"3367","inReplyTo":null,"subject":"[PATCH 1/5] Fixes for ancient versions of GNU make","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-02-17T14:22:21Z","receivedAt":"2006-02-17T14:22:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nSome version of GNU make do not understand $(call), and have problems to\ninterpret rules like this:\n\nsome_target: CFLAGS += -Dsome=defs\n\nSigned-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de>\n\n---\n\n Makefile   |   71 +++++++++++++++++++++++++++++++++++++++---------------------\n t/Makefile |    7 ++----\n 2 files changed, 48 insertions(+), 30 deletions(-)\n\nb50c666c80ef6191e06c1c9ed88af534da7ea458\ndiff --git a/Makefile b/Makefile\nindex d7d79de..b3401ac 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -203,12 +203,6 @@ LIB_OBJS = \\\n LIBS = $(LIB_FILE)\n LIBS += -lz\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-\n #\n # Platform specific tweaks\n #\n@@ -413,7 +407,24 @@ endif\n endif\n endif\n \n-ALL_CFLAGS += -DSHA1_HEADER=$(call shellquote,$(SHA1_HEADER)) $(COMPAT_CFLAGS)\n+# Shell quote (do not use $(call) to accomodate ancient setups);\n+\n+# Result of this needs to be placed inside ''\n+SHA1_HEADER_QUOTED = '$(subst ','\\'',$(SHA1_HEADER))'\n+template_dir_QUOTED = '$(subst ','\\'',\"$(template_dir)\")'\n+\n+# These will be used inside ''\n+SHELL_PATH_QUOTED = $(subst ','\\'',$(SHELL_PATH))\n+PERL_PATH_QUOTED = $(subst ','\\'',$(PERL_PATH))\n+PYTHON_PATH_QUOTED = $(subst ','\\'',$(PYTHON_PATH))\n+GIT_PYTHON_DIR_QUOTED = $(subst ','\\'',$(GIT_PYTHON_DIR))\n+\n+# prepend DESTDIR to these\n+DESTDIR_bindir_QUOTED = '$(subst ','\\'',$(DESTDIR)$(bindir))'\n+DESTDIR_gitexecdir_QUOTED = '$(subst ','\\'',$(DESTDIR)$(gitexecdir))'\n+DESTDIR_GIT_PYTHON_DIR_QUOTED = '$(subst ','\\'',$(DESTDIR)$(GIT_PYTHON_DIR))'\n+\n+ALL_CFLAGS += -DSHA1_HEADER=$(SHA1_HEADER_QUOTED) $(COMPAT_CFLAGS)\n LIB_OBJS += $(COMPAT_OBJS)\n export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir\n ### Build rules\n@@ -432,7 +443,7 @@ git$X: git.c $(LIB_FILE)\n \n $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh\n \trm -f $@\n-\tsed -e '1s|#!.*/sh|#!$(call shq,$(SHELL_PATH))|' \\\n+\tsed -e '1s|#!.*/sh|#!$(SHELL_PATH_QUOTED)|' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n \t    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \\\n \t    $@.sh >$@\n@@ -440,15 +451,15 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.\n \n $(patsubst %.perl,%,$(SCRIPT_PERL)) : % : %.perl\n \trm -f $@\n-\tsed -e '1s|#!.*perl|#!$(call shq,$(PERL_PATH))|' \\\n+\tsed -e '1s|#!.*perl|#!$(PERL_PATH_QUOTED)|' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n \t    $@.perl >$@\n \tchmod +x $@\n \n $(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py\n \trm -f $@\n-\tsed -e '1s|#!.*python|#!$(call shq,$(PYTHON_PATH))|' \\\n-\t    -e 's|@@GIT_PYTHON_PATH@@|$(call shq,$(GIT_PYTHON_DIR))|g' \\\n+\tsed -e '1s|#!.*python|#!$(PYTHON_PATH_QUOTED)|' \\\n+\t    -e 's|@@GIT_PYTHON_PATH@@|$(GIT_PYTHON_DIR_QUOTED)|g' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n \t    $@.py >$@\n \tchmod +x $@\n@@ -474,32 +485,42 @@ git$X git.spec \\\n %.o: %.S\n \t$(CC) -o $*.o -c $(ALL_CFLAGS) $<\n \n-exec_cmd.o: ALL_CFLAGS += -DGIT_EXEC_PATH=\\\"$(gitexecdir)\\\"\n+exec_cmd.o: exec_cmd.c\n+\t$(CC) -o $*.o -c $(ALL_CFLAGS) -DGIT_EXEC_PATH=\\\"$(gitexecdir)\\\" $<\n \n git-%$X: %.o $(LIB_FILE)\n \t$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)\n \n-git-mailinfo$X : SIMPLE_LIB += $(LIB_4_ICONV)\n $(SIMPLE_PROGRAMS) : $(LIB_FILE)\n $(SIMPLE_PROGRAMS) : git-%$X : %.o\n \t$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n \t\t$(LIB_FILE) $(SIMPLE_LIB)\n \n-git-http-fetch$X: fetch.o http.o\n-git-http-push$X: http.o\n+git-mailinfo$X: mailinfo.o $(LIB_FILE)\n+\t$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n+\t\t$(LIB_FILE) $(SIMPLE_LIB) $(LIB_4_ICONV)\n+\n git-local-fetch$X: fetch.o\n git-ssh-fetch$X: rsh.o fetch.o\n git-ssh-upload$X: rsh.o\n git-ssh-pull$X: rsh.o fetch.o\n git-ssh-push$X: rsh.o\n \n-git-http-fetch$X: LIBS += $(CURL_LIBCURL)\n-git-http-push$X: LIBS += $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)\n-git-rev-list$X: LIBS += $(OPENSSL_LIBSSL)\n+git-http-fetch$X: fetch.o http.o http-fetch.o\n+\t$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n+\t\t$(LIBS) $(CURL_LIBCURL)\n+\n+git-http-push$X: http.o http-push.o\n+\t$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n+\t\t$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)\n+\n+git-rev-list$X: rev-list.o\n+\t$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n+\t\t$(LIBS) $(OPENSSL_LIBSSL)\n \n init-db.o: init-db.c\n \t$(CC) -c $(ALL_CFLAGS) \\\n-\t\t-DDEFAULT_GIT_TEMPLATE_DIR=$(call shellquote,\"$(template_dir)\") $*.c\n+\t\t-DDEFAULT_GIT_TEMPLATE_DIR=$(template_dir_QUOTED) $*.c\n \n $(LIB_OBJS): $(LIB_H)\n $(patsubst git-%$X,%.o,$(PROGRAMS)): $(LIB_H)\n@@ -531,13 +552,13 @@ check:\n ### Installation rules\n \n install: all\n-\t$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(bindir))\n-\t$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(gitexecdir))\n-\t$(INSTALL) $(ALL_PROGRAMS) $(call shellquote,$(DESTDIR)$(gitexecdir))\n-\t$(INSTALL) git$X gitk $(call shellquote,$(DESTDIR)$(bindir))\n+\t$(INSTALL) -d -m755 $(DESTDIR_bindir_QUOTED)\n+\t$(INSTALL) -d -m755 $(DESTDIR_gitexecdir_QUOTED)\n+\t$(INSTALL) $(ALL_PROGRAMS) $(DESTDIR_gitexecdir_QUOTED)\n+\t$(INSTALL) git$X gitk $(DESTDIR_bindir_QUOTED)\n \t$(MAKE) -C templates install\n-\t$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(GIT_PYTHON_DIR))\n-\t$(INSTALL) $(PYMODULES) $(call shellquote,$(DESTDIR)$(GIT_PYTHON_DIR))\n+\t$(INSTALL) -d -m755 $(DESTDIR_GIT_PYTHON_DIR_QUOTED)\n+\t$(INSTALL) $(PYMODULES) $(DESTDIR_GIT_PYTHON_DIR_QUOTED)\n \n install-doc:\n \t$(MAKE) -C Documentation install\ndiff --git a/t/Makefile b/t/Makefile\nindex 5c5a620..d78404f 100644\n--- a/t/Makefile\n+++ b/t/Makefile\n@@ -8,17 +8,14 @@ SHELL_PATH ?= $(SHELL)\n TAR ?= $(TAR)\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_PATH_QUOTED = '$(subst ','\\'',$(SHELL_PATH))'\n \n T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)\n \n all: $(T) clean\n \n $(T):\n-\t@echo \"*** $@ ***\"; $(call shellquote,$(SHELL_PATH)) $@ $(GIT_TEST_OPTS)\n+\t@echo \"*** $@ ***\"; $(SHELL_PATH_QUOTED) $@ $(GIT_TEST_OPTS)\n \n clean:\n \trm -fr trash\n-- \n1.2.1.g09fe-dirty\n"},{"id":"16332","messageId":"11491.1140196527@lotus.CS.Berkeley.EDU","threadId":"3367","inReplyTo":"Pine.LNX.4.63.0602171522020.24274@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH 1/5] Fixes for ancient versions of GNU make","fromName":"Jason Riedy","fromEmail":"ejr@eecs.berkeley.edu","sentAt":"2006-02-17T17:15:27Z","receivedAt":"2006-02-17T17:15:27Z","isPatch":true,"sender":{"key":"ejr@eecs.berkeley.edu","avatar":"https://gravatar.com/avatar/547fa56f887cab01599edab4e9f813c949c1269e02714f20e0496c56185d9837?d=mp&s=160"},"body":"And Johannes Schindelin writes:\n - \n - Some version of GNU make do not understand $(call), and have \n - problems to interpret rules like this:\n\nIs building a newer version of GNU make impossible on Irix?\nThankfully, I haven't had to deal with that OS in quite some\ntime.\n\nJason\n"},{"id":"16347","messageId":"Pine.LNX.4.63.0602180024390.32416@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"3367","inReplyTo":"11491.1140196527@lotus.CS.Berkeley.EDU","subject":"Re: [PATCH 1/5] Fixes for ancient versions of GNU make","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-02-17T23:29:37Z","receivedAt":"2006-02-17T23:29:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 17 Feb 2006, Jason Riedy wrote:\n\n> And Johannes Schindelin writes:\n>  - \n>  - Some version of GNU make do not understand $(call), and have \n>  - problems to interpret rules like this:\n> \n> Is building a newer version of GNU make impossible on Irix?\n\nNo. But it is annoying to be forced to upgrade every second package. If \nthere'd be some real benefit, then okay, I'd do it. But there is really no \npoint in not supporting the old version.\n\nBesides, in some environments you are just not allowed to go wild \ninstalling programs. And in some environments, you just don't have the \nquota.\n\nHth,\nDscho\n"},{"id":"16364","messageId":"7v1wy1upn3.fsf@assigned-by-dhcp.cox.net","threadId":"3367","inReplyTo":"Pine.LNX.4.63.0602171522020.24274@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH 1/5] Fixes for ancient versions of GNU make","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-02-18T06:50:24Z","receivedAt":"2006-02-18T06:50:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> diff --git a/Makefile b/Makefile\n> index d7d79de..b3401ac 100644\n> --- a/Makefile\n> +++ b/Makefile\n> ...\n> +# These will be used inside ''\n> +SHELL_PATH_QUOTED = $(subst ','\\'',$(SHELL_PATH))\n> ...\n> diff --git a/t/Makefile b/t/Makefile\n> index 5c5a620..d78404f 100644\n> --- a/t/Makefile\n> +++ b/t/Makefile\n> @@ -8,17 +8,14 @@ SHELL_PATH ?= $(SHELL)\n>  TAR ?= $(TAR)\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_PATH_QUOTED = '$(subst ','\\'',$(SHELL_PATH))'\n\nI am not opposed to avoiding $(call), but subst everywhere look\nugly ;-).\n\nYou inherited this problem, but these two symbols in different\nMakefiles with the same name mean two completely different\nthings, which confused me quite badly.\n\nSo if we were to do this portability fix, how about consistently\ndefining it without surrounding sq pair?  Most of the places in\nthe main Makefile you use the symbol with other string, with the\nwhole thing quoted inside a sq pair, so that would make things\neasier to read.\n\nThen the one that uses it in the t/Makefile in 5/5 becomes:\n\n        $(T):\n                @echo \"*** $@ ***\"; '$(SHELL_PATH_QUOTED)' $@ $(GIT_TEST_OPTS)\n"},{"id":"16379","messageId":"Pine.LNX.4.63.0602181236210.694@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"3367","inReplyTo":"7v1wy1upn3.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH 1/5] Fixes for ancient versions of GNU make","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-02-18T11:40:22Z","receivedAt":"2006-02-18T11:40:22Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nSome versions of GNU make do not understand $(call), and have problems to\ninterpret rules like this:\n\nsome_target: CFLAGS += -Dsome=defs\n\nSigned-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de>\n\n---\n\n\tOn Fri, 17 Feb 2006, Junio C Hamano wrote:\n\n\t> I am not opposed to avoiding $(call), but subst everywhere look\n\t> ugly ;-).\n\n\tAgreed. But I think it is a minor hassle for few, and an \n\timprovement for\tmore.\n\n\t> You inherited this problem, but these two symbols in different\n\t> Makefiles with the same name mean two completely different\n\t> things, which confused me quite badly.\n\n\tFixed. Tested. Works.\n\n\n Makefile   |   69 ++++++++++++++++++++++++++++++++++++++----------------------\n t/Makefile |    7 ++----\n 2 files changed, 46 insertions(+), 30 deletions(-)\n\n165dab0734398530da84da3ae6df37f33293c660\ndiff --git a/Makefile b/Makefile\nindex d7d79de..0a978c2 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -203,12 +203,6 @@ LIB_OBJS = \\\n LIBS = $(LIB_FILE)\n LIBS += -lz\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-\n #\n # Platform specific tweaks\n #\n@@ -413,7 +407,22 @@ endif\n endif\n endif\n \n-ALL_CFLAGS += -DSHA1_HEADER=$(call shellquote,$(SHA1_HEADER)) $(COMPAT_CFLAGS)\n+# Shell quote (do not use $(call) to accomodate ancient setups);\n+\n+SHA1_HEADER_QUOTED = $(subst ','\\'',$(SHA1_HEADER))\n+template_dir_QUOTED = $(subst ','\\'',$(template_dir))\n+\n+SHELL_PATH_QUOTED = $(subst ','\\'',$(SHELL_PATH))\n+PERL_PATH_QUOTED = $(subst ','\\'',$(PERL_PATH))\n+PYTHON_PATH_QUOTED = $(subst ','\\'',$(PYTHON_PATH))\n+GIT_PYTHON_DIR_QUOTED = $(subst ','\\'',$(GIT_PYTHON_DIR))\n+\n+# prepend DESTDIR to these\n+DESTDIR_bindir_QUOTED = $(subst ','\\'',$(DESTDIR)$(bindir))\n+DESTDIR_gitexecdir_QUOTED = $(subst ','\\'',$(DESTDIR)$(gitexecdir))\n+DESTDIR_GIT_PYTHON_DIR_QUOTED = $(subst ','\\'',$(DESTDIR)$(GIT_PYTHON_DIR))\n+\n+ALL_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_QUOTED)' $(COMPAT_CFLAGS)\n LIB_OBJS += $(COMPAT_OBJS)\n export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir\n ### Build rules\n@@ -432,7 +441,7 @@ git$X: git.c $(LIB_FILE)\n \n $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh\n \trm -f $@\n-\tsed -e '1s|#!.*/sh|#!$(call shq,$(SHELL_PATH))|' \\\n+\tsed -e '1s|#!.*/sh|#!$(SHELL_PATH_QUOTED)|' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n \t    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \\\n \t    $@.sh >$@\n@@ -440,15 +449,15 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.\n \n $(patsubst %.perl,%,$(SCRIPT_PERL)) : % : %.perl\n \trm -f $@\n-\tsed -e '1s|#!.*perl|#!$(call shq,$(PERL_PATH))|' \\\n+\tsed -e '1s|#!.*perl|#!$(PERL_PATH_QUOTED)|' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n \t    $@.perl >$@\n \tchmod +x $@\n \n $(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py\n \trm -f $@\n-\tsed -e '1s|#!.*python|#!$(call shq,$(PYTHON_PATH))|' \\\n-\t    -e 's|@@GIT_PYTHON_PATH@@|$(call shq,$(GIT_PYTHON_DIR))|g' \\\n+\tsed -e '1s|#!.*python|#!$(PYTHON_PATH_QUOTED)|' \\\n+\t    -e 's|@@GIT_PYTHON_PATH@@|$(GIT_PYTHON_DIR_QUOTED)|g' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n \t    $@.py >$@\n \tchmod +x $@\n@@ -474,32 +483,42 @@ git$X git.spec \\\n %.o: %.S\n \t$(CC) -o $*.o -c $(ALL_CFLAGS) $<\n \n-exec_cmd.o: ALL_CFLAGS += -DGIT_EXEC_PATH=\\\"$(gitexecdir)\\\"\n+exec_cmd.o: exec_cmd.c\n+\t$(CC) -o $*.o -c $(ALL_CFLAGS) -DGIT_EXEC_PATH=\\\"$(gitexecdir)\\\" $<\n \n git-%$X: %.o $(LIB_FILE)\n \t$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)\n \n-git-mailinfo$X : SIMPLE_LIB += $(LIB_4_ICONV)\n $(SIMPLE_PROGRAMS) : $(LIB_FILE)\n $(SIMPLE_PROGRAMS) : git-%$X : %.o\n \t$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n \t\t$(LIB_FILE) $(SIMPLE_LIB)\n \n-git-http-fetch$X: fetch.o http.o\n-git-http-push$X: http.o\n+git-mailinfo$X: mailinfo.o $(LIB_FILE)\n+\t$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n+\t\t$(LIB_FILE) $(SIMPLE_LIB) $(LIB_4_ICONV)\n+\n git-local-fetch$X: fetch.o\n git-ssh-fetch$X: rsh.o fetch.o\n git-ssh-upload$X: rsh.o\n git-ssh-pull$X: rsh.o fetch.o\n git-ssh-push$X: rsh.o\n \n-git-http-fetch$X: LIBS += $(CURL_LIBCURL)\n-git-http-push$X: LIBS += $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)\n-git-rev-list$X: LIBS += $(OPENSSL_LIBSSL)\n+git-http-fetch$X: fetch.o http.o http-fetch.o\n+\t$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n+\t\t$(LIBS) $(CURL_LIBCURL)\n+\n+git-http-push$X: http.o http-push.o\n+\t$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n+\t\t$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)\n+\n+git-rev-list$X: rev-list.o\n+\t$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n+\t\t$(LIBS) $(OPENSSL_LIBSSL)\n \n init-db.o: init-db.c\n \t$(CC) -c $(ALL_CFLAGS) \\\n-\t\t-DDEFAULT_GIT_TEMPLATE_DIR=$(call shellquote,\"$(template_dir)\") $*.c\n+\t\t-DDEFAULT_GIT_TEMPLATE_DIR='\"$(template_dir_QUOTED)\"' $*.c\n \n $(LIB_OBJS): $(LIB_H)\n $(patsubst git-%$X,%.o,$(PROGRAMS)): $(LIB_H)\n@@ -531,13 +550,13 @@ check:\n ### Installation rules\n \n install: all\n-\t$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(bindir))\n-\t$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(gitexecdir))\n-\t$(INSTALL) $(ALL_PROGRAMS) $(call shellquote,$(DESTDIR)$(gitexecdir))\n-\t$(INSTALL) git$X gitk $(call shellquote,$(DESTDIR)$(bindir))\n+\t$(INSTALL) -d -m755 '$(DESTDIR_bindir_QUOTED)'\n+\t$(INSTALL) -d -m755 '$(DESTDIR_gitexecdir_QUOTED)'\n+\t$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_gitexecdir_QUOTED)'\n+\t$(INSTALL) git$X gitk $(DESTDIR_bindir_QUOTED)'\n \t$(MAKE) -C templates install\n-\t$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(GIT_PYTHON_DIR))\n-\t$(INSTALL) $(PYMODULES) $(call shellquote,$(DESTDIR)$(GIT_PYTHON_DIR))\n+\t$(INSTALL) -d -m755 '$(DESTDIR_GIT_PYTHON_DIR_QUOTED)'\n+\t$(INSTALL) $(PYMODULES) '$(DESTDIR_GIT_PYTHON_DIR_QUOTED)'\n \n install-doc:\n \t$(MAKE) -C Documentation install\ndiff --git a/t/Makefile b/t/Makefile\nindex 5c5a620..e7e4229 100644\n--- a/t/Makefile\n+++ b/t/Makefile\n@@ -8,17 +8,14 @@ SHELL_PATH ?= $(SHELL)\n TAR ?= $(TAR)\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_PATH_QUOTED = $(subst ','\\'',$(SHELL_PATH))\n \n T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)\n \n all: $(T) clean\n \n $(T):\n-\t@echo \"*** $@ ***\"; $(call shellquote,$(SHELL_PATH)) $@ $(GIT_TEST_OPTS)\n+\t@echo \"*** $@ ***\"; '$(SHELL_PATH_QUOTED)' $@ $(GIT_TEST_OPTS)\n \n clean:\n \trm -fr trash\n-- \n1.2.1.geb73\n"}]}