DORMANTno replies

[PATCH] Only use ETC_GITCONFIG=$(prefix)/etc/gitconfig ifeq ($(prefix),$(HOME))

From: Josh Triplett <hidden>
Date: 2016-06-15 22:43:06
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

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 <redacted>
---
 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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help