From: Josh Triplett <josh@freedesktop.org>
To: git@vger.kernel.org
Cc: Junio C Hamano <junkio@cox.net>
Subject: [PATCH] Only use ETC_GITCONFIG=$(prefix)/etc/gitconfig ifeq ($(prefix),$(HOME))
Date: Mon, 23 Apr 2007 19:11:06 -0700 [thread overview]
Message-ID: <462D673A.1010805@freedesktop.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1017 bytes --]
ETC_GITCONFIG defaults to $(prefix)/etc/gitconfig, so if you just set
prefix=/usr or prefix=/usr/local, you end up with a git that looks in
/usr/etc/gitconfig or /usr/local/etc/gitconfig. That seems rather suboptimal.
Use ifeq in the Makefile to set ETC_GITCONFIG=/etc/gitconfig unless the prefix
points to $HOME .
The builder can always override ETC_GITCONFIG, so this just makes the default
saner.
Signed-off-by: Josh Triplett <josh@freedesktop.org>
---
Makefile | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 65bd2db..6e1ae95 100644
--- a/Makefile
+++ b/Makefile
@@ -141,7 +141,11 @@ prefix = $(HOME)
bindir = $(prefix)/bin
gitexecdir = $(bindir)
template_dir = $(prefix)/share/git-core/templates/
-ETC_GITCONFIG = $(prefix)/etc/gitconfig
+ifeq ($(prefix),$(HOME))
+ETC_GITCONFIG = $(HOME)/etc/gitconfig
+else
+ETC_GITCONFIG = /etc/gitconfig
+endif
# DESTDIR=
# default configuration for gitweb
--
1.5.1.1
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
next reply other threads:[~2007-04-24 2:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-24 2:11 Josh Triplett [this message]
2007-04-24 4:27 ` [PATCH] Only use ETC_GITCONFIG=$(prefix)/etc/gitconfig ifeq ($(prefix),$(HOME)) Junio C Hamano
2007-04-24 5:44 ` Josh Triplett
2007-04-24 5:59 ` Junio C Hamano
2007-04-24 7:23 ` Josh Triplett
2007-04-24 7:51 ` [PATCH] Create a sysconfdir variable, and use it for ETC_GITCONFIG Josh Triplett
2007-04-24 8:12 ` Junio C Hamano
2007-04-24 6:08 ` [PATCH] Only use ETC_GITCONFIG=$(prefix)/etc/gitconfig ifeq ($(prefix),$(HOME)) Junio C Hamano
2007-04-24 6:17 ` Junio C Hamano
2007-04-24 9:05 ` Sergio Callegari
2007-04-24 6:19 ` Shawn O. Pearce
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=462D673A.1010805@freedesktop.org \
--to=josh@freedesktop.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).