X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=templates%2FMakefile;h=9e1ae1a4e0322a37b494177474a964caf05ca4dd;hb=ce4231ffa80da1888a668cc7c33f5349800ab4a3;hp=221a0860661a3adb43470aa22d30b54601223b3d;hpb=c1067050ce58b5b39f528fe634732da858664603;p=git.git diff --git a/templates/Makefile b/templates/Makefile index 221a08606..9e1ae1a4e 100644 --- a/templates/Makefile +++ b/templates/Makefile @@ -6,13 +6,18 @@ prefix ?= $(HOME) template_dir ?= $(prefix)/share/git-core/templates/ # DESTDIR= -all: boilerplates custom - find blt +# Shell quote (do not use $(call) to accomodate ancient setups); +DESTDIR_SQ = $(subst ','\'',$(DESTDIR)) +template_dir_SQ = $(subst ','\'',$(template_dir)) + +all: boilerplates.made custom # Put templates that can be copied straight from the source # in a file direc--tory--file in the source. They will be # just copied to the destination. -boilerplates: + +bpsrc = $(filter-out %~,$(wildcard *--*)) +boilerplates.made : $(bpsrc) ls *--* 2>/dev/null | \ while read boilerplate; \ do \ @@ -25,6 +30,7 @@ boilerplates: *) cp $$boilerplate blt/$$dst ;; \ esac || exit; \ done || exit + date >$@ # If you need build-tailored templates, build them into blt/ # directory yourself here. @@ -32,9 +38,9 @@ custom: : no custom templates yet clean: - rm -rf blt + rm -rf blt boilerplates.made install: all - $(INSTALL) -d -m755 $(DESTDIR)$(template_dir) + $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(template_dir_SQ)' (cd blt && $(TAR) cf - .) | \ - (cd $(DESTDIR)$(template_dir) && $(TAR) xf -) + (cd '$(DESTDIR_SQ)$(template_dir_SQ)' && $(TAR) xf -)