All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile
Date: Thu, 29 Jun 2006 18:35:51 +0200	[thread overview]
Message-ID: <200606291835.53788.jnareb@gmail.com> (raw)
In-Reply-To: <200606291704.27677.jnareb@gmail.com>

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
config.mak.  Main Makefile exports variables which it sets.

Renames man1 and man7 variables to man1dir and man7dir, according to
"Makefile Conventions: Variables for Installation Directories" in
make.info of GNU Make.  Renames bin to bindir (unused, perhaps to be
removed).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Part of autoconf series, but independent.

Should probably be split into two patches:
 * first with export + '?='
 * second renaming man1 and man7 to man1dir and man7dir

 Documentation/Makefile   |   14 +++++++-------
 Makefile                 |    2 ++
 contrib/emacs/Makefile   |    4 ++--
 contrib/git-svn/Makefile |    8 ++++----
 4 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 2b0efe7..cc83610 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -25,10 +25,10 @@ DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT
 DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
 
 prefix?=$(HOME)
-bin=$(prefix)/bin
-mandir=$(prefix)/man
-man1=$(mandir)/man1
-man7=$(mandir)/man7
+bindir?=$(prefix)/bin
+mandir?=$(prefix)/man
+man1dir=$(mandir)/man1
+man7dir=$(mandir)/man7
 # DESTDIR=
 
 INSTALL?=install
@@ -52,9 +52,9 @@ man1: $(DOC_MAN1)
 man7: $(DOC_MAN7)
 
 install: man
-	$(INSTALL) -d -m755 $(DESTDIR)$(man1) $(DESTDIR)$(man7)
-	$(INSTALL) $(DOC_MAN1) $(DESTDIR)$(man1)
-	$(INSTALL) $(DOC_MAN7) $(DESTDIR)$(man7)
+	$(INSTALL) -d -m755 $(DESTDIR)$(man1dir) $(DESTDIR)$(man7dir)
+	$(INSTALL) $(DOC_MAN1) $(DESTDIR)$(man1dir)
+	$(INSTALL) $(DOC_MAN7) $(DESTDIR)$(man7dir)
 
 
 #
diff --git a/Makefile b/Makefile
index cde619c..b8fe669 100644
--- a/Makefile
+++ b/Makefile
@@ -100,6 +100,8 @@ template_dir = $(prefix)/share/git-core/
 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 d3619db..350846d 100644
--- a/contrib/emacs/Makefile
+++ b/contrib/emacs/Makefile
@@ -3,9 +3,9 @@ ## Build and install stuff
 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 7c20946..8cac688 100644
--- a/contrib/git-svn/Makefile
+++ b/contrib/git-svn/Makefile
@@ -1,9 +1,9 @@
 all: git-svn
 
 prefix?=$(HOME)
-bindir=$(prefix)/bin
-mandir=$(prefix)/man
-man1=$(mandir)/man1
+bindir?=$(prefix)/bin
+mandir?=$(prefix)/man
+man1dir=$(mandir)/man1
 INSTALL?=install
 doc_conf=../../Documentation/asciidoc.conf
 -include ../../config.mak
@@ -17,7 +17,7 @@ install: all
 	$(INSTALL) git-svn $(DESTDIR)$(bindir)
 
 install-doc: doc
-	$(INSTALL) git-svn.1 $(DESTDIR)$(man1)
+	$(INSTALL) git-svn.1 $(DESTDIR)$(man1dir)
 
 doc: git-svn.1
 git-svn.1 : git-svn.xml
-- 
1.4.0

  reply	other threads:[~2006-06-29 16:35 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-29  1:01 [PATCH] autoconf: Use autoconf to write installation directories to config.mak Jakub Narebski
2006-06-29  7:18 ` Uwe Zeisberger
2006-06-29 11:59 ` [PATCH] autoconf: Use autoconf to check for libraries: openssl/crypto, curl, expat Jakub Narebski
2006-06-29 13:36   ` [RFC/PATCH] autoconf: Use autoconf to check for some types and library functions Jakub Narebski
2006-06-29 15:04     ` [PATCH] autoconf: Cleanup generation of config.mak.append by ./configure Jakub Narebski
2006-06-29 16:35       ` Jakub Narebski [this message]
2006-06-29 17:47         ` [PATCH] autoconf: Set mandir in config.mak.in and export variables not in Makefile Jakub Narebski
2006-06-30  0:11           ` [PATCH 7] autoconf: configure.ac uses variables to set in, out and temp files Jakub Narebski
2006-06-30  0:32             ` [PATCH 8] autoconf: ./configure script outputs to config.mac.auto Jakub Narebski
2006-06-30 12:37               ` [PATCH 9] autoconf: Cleanup generation of temporary "append" file Jakub Narebski
2006-06-30 12:39                 ` [PATCH 10] autoconf: Write how to use ./configure generated file in git build process Jakub Narebski
2006-06-30 12:41                   ` [PATCH 11] autoconf: Rename ./configure output file to config.mak.autogen Jakub Narebski
2006-06-30 15:08                     ` [PATCH 12] Revert "autoconf: Write how to use ./configure generated file in git build process" Jakub Narebski
2006-06-30 15:11                       ` [PATCH 13] autoconf: Append '-include config.mak.autogen' to config.mak if it is not present Jakub Narebski
2006-06-30 20:29                         ` Jakub Narebski
2006-06-30 21:45                         ` [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure Jakub Narebski
2006-06-30 21:57                           ` Pavel Roskin
2006-06-30 22:32                             ` Jakub Narebski
     [not found]                               ` <20060630233004.7xckw444g4g0gcs8@webmail.spamcop.net>
2006-07-01 17:55                                 ` Jakub Narebski
2006-07-08  7:33                                   ` Pavel Roskin
2006-06-30 22:34                           ` Jakub Narebski
2006-06-29 18:23         ` [PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile Junio C Hamano
2006-06-29 20:16           ` Jakub Narebski
2006-06-29 12:46 ` [PATCH] autoconf: Use autoconf to write installation directories to config.mak Matthias Lederhofer
2006-06-29 13:48   ` Jakub Narebski
2006-06-30 12:18     ` Andreas Ericsson
2006-06-30 15:15       ` Jakub Narebski
2006-07-01 13:58       ` Jakub Narebski
2006-06-29 18:23   ` Junio C Hamano
     [not found]     ` <20060701213305.GA29115@pasky.or.cz>
2006-07-01 22:04       ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200606291835.53788.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.