Skip to content

Commit 8cee0f1

Browse files
committed
Merge branch 'kk/maint-prefix-in-config-mak'
* 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 36a45b4 + 9fb1e69 commit 8cee0f1

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 = :
@@ -1195,6 +1187,14 @@ endif
11951187
-include config.mak.autogen
11961188
-include config.mak
11971189

1190+
ifndef sysconfdir
1191+
ifeq ($(prefix),/usr)
1192+
sysconfdir = /etc
1193+
else
1194+
sysconfdir = etc
1195+
endif
1196+
endif
1197+
11981198
ifdef CHECK_HEADER_DEPENDENCIES
11991199
COMPUTE_HEADER_DEPENDENCIES =
12001200
USE_COMPUTED_HEADER_DEPENDENCIES =

0 commit comments

Comments
 (0)