From: Junio C Hamano Date: Tue, 03 May 2011 17:32:14 GMT Subject: Re: [PATCH 1/1] Honor $(prefix) set in config.mak* when defining ETC_GIT* and sysconfdir Message-ID: <7vzkn3itb5.fsf@alter.siamese.dyndns.org> In-Reply-To: <4DBFA3C6.8060209@viscovery.net> Johannes Sixt writes: > Please do not set Mail-Followup-To!! It makes communication on this list > extremely inconvenient. > > Am 4/28/2011 21:27, schrieb Kacper Kornet: >> Definitions of ETC_GITCONFIG, ETC_GITATTRIBUTES and sysconfdir depend on >> value of prefix. As prefix can be changed in config.mak.autogen, all if >> blocks with conditions based on prefix should be placed after the file >> is included in Makefile. > ... > Does this patch do anything useful? After the patch is applied, sysconfdir > is set-but-not-used. Therefore, you can remove the assignments. But then > you lose the reference to $(prefix) that the commit message claims is so > important. Puzzled... The only thing it does is to to allow you to set prefix in config.mak and then have it propaget to the selection of ETC_GITCONFIG (if prefix is /usr, then it is always /etc/gitconfig, otherwise it is always etc/gitconfig). The importance of prefix is not that the value is prefixed to ETC_GIT*, but it is used in the conditional to choose between the two. We can get rid of assignments to sysconfdir in that sense. But you spotted a regression. If sysconfdir is set to somewhere else, even if you set prefix to /usr, we should set ETC_GIT* using the value given to sysconfdir. The original code did so, but the patch lost it.