aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-08-06 12:50:14 -0700
committerJunio C Hamano <junkio@cox.net>2005-08-06 13:49:26 -0700
commitd3af621b147bb90a31fdc3b55e07853f45deb658 (patch)
tree26d8d69dd5288b5f6f9756ba75549618d808627f /Makefile
parentf5b749560980a30d7472183e3d6360baa5a1f0d5 (diff)
downloadgit-d3af621b147bb90a31fdc3b55e07853f45deb658.tar.gz
git-d3af621b147bb90a31fdc3b55e07853f45deb658.tar.xz
Redo the templates generation and installation.
Per discussion with people interested in binary packaging, change the default template location from /etc/git-core to /usr/share/git-core hierarchy. If a user wants to run git before installing for whatever reason, in addition to adding $src to the PATH environment variable, git-init-db can be run with --template=$src/templates/blt/ parameter. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 425e9a4ac..072d4267b 100644
--- a/Makefile
+++ b/Makefile
@@ -39,8 +39,7 @@ CFLAGS+=$(COPTS) -Wall $(DEFINES)
prefix=$(HOME)
bindir=$(prefix)/bin
-etcdir=$(prefix)/etc
-etcgitdir=$(etcdir)/git-core
+template_dir=$(prefix)/share/git-core/templates/
# dest=
CC?=gcc
@@ -147,7 +146,6 @@ endif
endif
CFLAGS += '-DSHA1_HEADER=$(SHA1_HEADER)'
-CFLAGS += '-DDEFAULT_GIT_TEMPLATE_ENVIRONMENT="$(etcgitdir)/templates"'
@@ -155,6 +153,8 @@ CFLAGS += '-DDEFAULT_GIT_TEMPLATE_ENVIRONMENT="$(etcgitdir)/templates"'
all: $(PROG)
+all:
+ $(MAKE) -C templates
.PRECIOUS: %.o
git-%: %.o $(LIB_FILE)
@@ -168,6 +168,9 @@ git-ssh-push: rsh.o
git-http-pull: LIBS += -lcurl
git-rev-list: LIBS += $(OPENSSL_LIBSSL)
+init-db.o: init-db.c
+ $(CC) -c $(CFLAGS) -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir)"' $*.c
+
$(LIB_OBJS): $(LIB_H)
$(DIFF_OBJS): diffcore.h