aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2006-06-29 22:11:25 +0200
committerJunio C Hamano <junkio@cox.net>2006-06-29 23:49:16 -0700
commite14421b9aa85f11853a0dacae09498515daab7b8 (patch)
tree8995222b849f95902d3ed66b8c2cb11d55d4a87e
parentfc046a75d539a78e6b2c16534c4078617a69a327 (diff)
downloadgit-e14421b9aa85f11853a0dacae09498515daab7b8.tar.gz
git-e14421b9aa85f11853a0dacae09498515daab7b8.tar.xz
Allow INSTALL, bindir, mandir to be set in main Makefile
Makefiles in subdirectories now use existing value of INSTALL, bindir, mandir if it is set, allowing those to be set in main Makefile or in included config.mak. Main Makefile exports variables which it sets. Accidentally it renames bin to bindir in Documentation/Makefile (should be bindir from start, but is unused, perhaps to be removed). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--Documentation/Makefile4
-rw-r--r--Makefile2
-rw-r--r--contrib/emacs/Makefile4
-rw-r--r--contrib/git-svn/Makefile4
4 files changed, 8 insertions, 6 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 2b0efe792..ca6b77df2 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -25,8 +25,8 @@ DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
prefix?=$(HOME)
-bin=$(prefix)/bin
-mandir=$(prefix)/man
+bindir?=$(prefix)/bin
+mandir?=$(prefix)/man
man1=$(mandir)/man1
man7=$(mandir)/man7
# DESTDIR=
diff --git a/Makefile b/Makefile
index cde619c49..b8fe66972 100644
--- a/Makefile
+++ b/Makefile
@@ -100,6 +100,8 @@ template_dir = $(prefix)/share/git-core/templates/
GIT_PYTHON_DIR = $(prefix)/share/git-core/python
# DESTDIR=
+export prefix bindir gitexecdir template_dir GIT_PYTHON_DIR
+
CC = gcc
AR = ar
TAR = tar
diff --git a/contrib/emacs/Makefile b/contrib/emacs/Makefile
index d3619db51..350846de9 100644
--- a/contrib/emacs/Makefile
+++ b/contrib/emacs/Makefile
@@ -3,9 +3,9 @@
EMACS = emacs
ELC = git.elc vc-git.elc
-INSTALL = install
+INSTALL ?= install
INSTALL_ELC = $(INSTALL) -m 644
-prefix = $(HOME)
+prefix ?= $(HOME)
emacsdir = $(prefix)/share/emacs/site-lisp
all: $(ELC)
diff --git a/contrib/git-svn/Makefile b/contrib/git-svn/Makefile
index 7c2094694..1a6585eee 100644
--- a/contrib/git-svn/Makefile
+++ b/contrib/git-svn/Makefile
@@ -1,8 +1,8 @@
all: git-svn
prefix?=$(HOME)
-bindir=$(prefix)/bin
-mandir=$(prefix)/man
+bindir?=$(prefix)/bin
+mandir?=$(prefix)/man
man1=$(mandir)/man1
INSTALL?=install
doc_conf=../../Documentation/asciidoc.conf