Re: [PATCH 1/1] Honor $(prefix) set in config.mak* when defining ETC_GIT* and sysconfdir
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- May 4, 2011, 05:52 UTC
- Message-ID
- <4DC0E99E.6090402@viscovery.net>
- In-Reply-To
- <7vzkn3itb5.fsf@alter.siamese.dyndns.org>
Am 5/3/2011 19:32, schrieb Junio C Hamano:
Show 21 quoted lines
> Johannes Sixt <j.sixt@viscovery.net> 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.
Fair enough.
> 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.
Looking closer, the patch introduces git_etcdir for no good reason, IIUC. It should just re-use sysconfdir (the meaning of this variable is to point to the etc directory).
-- Hannes