summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorLibravatar Johannes Sixt <johannes.sixt@telecom.at>2008-01-01 22:15:21 +0100
committerLibravatar Johannes Sixt <johannes.sixt@telecom.at>2008-06-26 08:47:14 +0200
commit0b50b860a505d4a1d6fa595a400f3968333e7128 (patch)
tree5d21ab176d55fbe3a6c0cc5a8e8a9de53d85fa5b /templates
parentWindows: Use a relative default template_dir and ETC_GITCONFIG (diff)
downloadtgif-0b50b860a505d4a1d6fa595a400f3968333e7128.tar.xz
When installing, be prepared that template_dir may be relative.
Since the Makefile in the template/ subdirectory is only used to install the templates, we do not simply pass down the setting of template_dir when it is relative, but construct the intended destination in a new variable: A relative template_dir is relative to gitexecdir. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Diffstat (limited to 'templates')
-rw-r--r--templates/Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/Makefile b/templates/Makefile
index bda9d13505..9f3f1fc352 100644
--- a/templates/Makefile
+++ b/templates/Makefile
@@ -8,12 +8,12 @@ INSTALL ?= install
TAR ?= tar
RM ?= rm -f
prefix ?= $(HOME)
-template_dir ?= $(prefix)/share/git-core/templates
+template_instdir ?= $(prefix)/share/git-core/templates
# DESTDIR=
# Shell quote (do not use $(call) to accommodate ancient setups);
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
-template_dir_SQ = $(subst ','\'',$(template_dir))
+template_instdir_SQ = $(subst ','\'',$(template_instdir))
all: boilerplates.made custom
@@ -46,6 +46,6 @@ clean:
$(RM) -r blt boilerplates.made
install: all
- $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(template_dir_SQ)'
+ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(template_instdir_SQ)'
(cd blt && $(TAR) cf - .) | \
- (cd '$(DESTDIR_SQ)$(template_dir_SQ)' && umask 022 && $(TAR) xf -)
+ (cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && umask 022 && $(TAR) xf -)