X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=templates%2FMakefile;h=8f7f4fec34ad76b85d61f20821f18a1d3ca9a3b2;hb=f6407823d1467a6b6d2002878a64dec42df0a361;hp=c23aee866d3eca13abd5586ee06bac6e2ab87dc7;hpb=2af60a0521a8d0514e8bb1ca371cc9d502ea1c58;p=git.git diff --git a/templates/Makefile b/templates/Makefile index c23aee86..8f7f4fec 100644 --- a/templates/Makefile +++ b/templates/Makefile @@ -6,8 +6,13 @@ 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))' + all: boilerplates.made custom - find blt # Put templates that can be copied straight from the source # in a file direc--tory--file in the source. They will be @@ -38,6 +43,6 @@ clean: rm -rf blt boilerplates.made install: all - $(INSTALL) -d -m755 $(DESTDIR)$(template_dir) + $(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(template_dir)) (cd blt && $(TAR) cf - .) | \ - (cd $(DESTDIR)$(template_dir) && $(TAR) xf -) + (cd $(call shellquote,$(DESTDIR)$(template_dir)) && $(TAR) xf -)