summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2008-01-01 22:15:21 +0100
committerJohannes Sixt <johannes.sixt@telecom.at>2008-06-26 08:47:14 +0200
commit0b50b860a505d4a1d6fa595a400f3968333e7128 (patch)
tree5d21ab176d55fbe3a6c0cc5a8e8a9de53d85fa5b /Makefile
parent8512439af25c93942d569d250d49d135d8b7062b (diff)
downloadgit-0b50b860a505d4a1d6fa595a400f3968333e7128.tar.gz
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 'Makefile')
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 7233160743..a2a19a85f0 100644
--- a/Makefile
+++ b/Makefile
@@ -205,7 +205,7 @@ GITWEB_FAVICON = git-favicon.png
GITWEB_SITE_HEADER =
GITWEB_SITE_FOOTER =
-export prefix bindir gitexecdir sharedir template_dir htmldir sysconfdir
+export prefix bindir gitexecdir sharedir htmldir sysconfdir
CC = gcc
AR = ar
@@ -1297,6 +1297,13 @@ remove-dashes:
### Installation rules
+ifeq ($(firstword $(subst /, ,$(template_dir))),..)
+template_instdir = $(gitexecdir)/$(template_dir)
+else
+template_instdir = $(template_dir)
+endif
+export template_instdir
+
install: all
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'