Skip to content

Commit e14421b

Browse files
jnarebJunio C Hamano
authored andcommitted
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>
1 parent fc046a7 commit e14421b

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

Documentation/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
2525
DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
2626

2727
prefix?=$(HOME)
28-
bin=$(prefix)/bin
29-
mandir=$(prefix)/man
28+
bindir?=$(prefix)/bin
29+
mandir?=$(prefix)/man
3030
man1=$(mandir)/man1
3131
man7=$(mandir)/man7
3232
# DESTDIR=

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ template_dir = $(prefix)/share/git-core/templates/
100100
GIT_PYTHON_DIR = $(prefix)/share/git-core/python
101101
# DESTDIR=
102102

103+
export prefix bindir gitexecdir template_dir GIT_PYTHON_DIR
104+
103105
CC = gcc
104106
AR = ar
105107
TAR = tar

contrib/emacs/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
EMACS = emacs
44

55
ELC = git.elc vc-git.elc
6-
INSTALL = install
6+
INSTALL ?= install
77
INSTALL_ELC = $(INSTALL) -m 644
8-
prefix = $(HOME)
8+
prefix ?= $(HOME)
99
emacsdir = $(prefix)/share/emacs/site-lisp
1010

1111
all: $(ELC)

contrib/git-svn/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
all: git-svn
22

33
prefix?=$(HOME)
4-
bindir=$(prefix)/bin
5-
mandir=$(prefix)/man
4+
bindir?=$(prefix)/bin
5+
mandir?=$(prefix)/man
66
man1=$(mandir)/man1
77
INSTALL?=install
88
doc_conf=../../Documentation/asciidoc.conf

0 commit comments

Comments
 (0)