git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Only use ETC_GITCONFIG=$(prefix)/etc/gitconfig ifeq ($(prefix),$(HOME))
@ 2007-04-24  2:11 Josh Triplett
  2007-04-24  4:27 ` Junio C Hamano
  2007-04-24  6:08 ` [PATCH] Only use ETC_GITCONFIG=$(prefix)/etc/gitconfig ifeq ($(prefix),$(HOME)) Junio C Hamano
  0 siblings, 2 replies; 11+ messages in thread
From: Josh Triplett @ 2007-04-24  2:11 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

[-- 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 --]

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-04-24  9:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-24  2:11 [PATCH] Only use ETC_GITCONFIG=$(prefix)/etc/gitconfig ifeq ($(prefix),$(HOME)) Josh Triplett
2007-04-24  4:27 ` 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

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).