Skip to content

Commit 0531899

Browse files
committed
Merge branch 'kk/maint-prefix-in-config-mak' into maint
* kk/maint-prefix-in-config-mak: Honor $(prefix) set in config.mak* when defining ETC_GIT* Revert "Honor $(prefix) set in config.mak* when defining ETC_GIT* and sysconfdir" Honor $(prefix) set in config.mak* when defining ETC_GIT* and sysconfdir
2 parents 5f8937d + 9fb1e69 commit 0531899

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,7 @@ STRIP ?= strip
274274
# mandir
275275
# infodir
276276
# htmldir
277-
# ETC_GITCONFIG (but not sysconfdir)
278-
# ETC_GITATTRIBUTES
277+
# sysconfdir
279278
# can be specified as a relative path some/where/else;
280279
# this is interpreted as relative to $(prefix) and "git" at
281280
# runtime figures out where they are based on the path to the executable.
@@ -291,15 +290,8 @@ sharedir = $(prefix)/share
291290
gitwebdir = $(sharedir)/gitweb
292291
template_dir = share/git-core/templates
293292
htmldir = share/doc/git-doc
294-
ifeq ($(prefix),/usr)
295-
sysconfdir = /etc
296293
ETC_GITCONFIG = $(sysconfdir)/gitconfig
297294
ETC_GITATTRIBUTES = $(sysconfdir)/gitattributes
298-
else
299-
sysconfdir = $(prefix)/etc
300-
ETC_GITCONFIG = etc/gitconfig
301-
ETC_GITATTRIBUTES = etc/gitattributes
302-
endif
303295
lib = lib
304296
# DESTDIR=
305297
pathsep = :
@@ -1192,6 +1184,14 @@ endif
11921184
-include config.mak.autogen
11931185
-include config.mak
11941186

1187+
ifndef sysconfdir
1188+
ifeq ($(prefix),/usr)
1189+
sysconfdir = /etc
1190+
else
1191+
sysconfdir = etc
1192+
endif
1193+
endif
1194+
11951195
ifdef CHECK_HEADER_DEPENDENCIES
11961196
COMPUTE_HEADER_DEPENDENCIES =
11971197
USE_COMPUTED_HEADER_DEPENDENCIES =

0 commit comments

Comments
 (0)