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 3, 2011, 06:42 UTC
- Message-ID
- <4DBFA3C6.8060209@viscovery.net>
- In-Reply-To
- <20110428192751.GE4833@camk.edu.pl>
Please do not set Mail-Followup-To!! It makes communication on this list extremely inconvenient.
Am 4/28/2011 21:27, schrieb Kacper Kornet:
Show 47 quoted lines
> 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. > > Signed-off-by: Kacper Kornet <draenog@pld-linux.org> > --- > Makefile | 19 ++++++++++--------- > 1 files changed, 10 insertions(+), 9 deletions(-) > > diff --git a/Makefile b/Makefile > index cbc3fce..bf912b9 100644 > --- a/Makefile > +++ b/Makefile > @@ -291,15 +291,8 @@ sharedir = $(prefix)/share > gitwebdir = $(sharedir)/gitweb > template_dir = share/git-core/templates > htmldir = share/doc/git-doc > -ifeq ($(prefix),/usr) > -sysconfdir = /etc > -ETC_GITCONFIG = $(sysconfdir)/gitconfig > -ETC_GITATTRIBUTES = $(sysconfdir)/gitattributes > -else > -sysconfdir = $(prefix)/etc > -ETC_GITCONFIG = etc/gitconfig > -ETC_GITATTRIBUTES = etc/gitattributes > -endif > +ETC_GITCONFIG = $(git_etcdir)/gitconfig > +ETC_GITATTRIBUTES = $(git_etcdir)/gitattributes > lib = lib > # DESTDIR= > pathsep = : > @@ -1192,6 +1185,14 @@ endif > -include config.mak.autogen > -include config.mak > > +ifeq ($(prefix),/usr) > +sysconfdir = /etc > +git_etcdir = /etc > +else > +sysconfdir = $(prefix)/etc > +git_etcdir = etc > +endif > + > ifdef CHECK_HEADER_DEPENDENCIES > COMPUTE_HEADER_DEPENDENCIES = > USE_COMPUTED_HEADER_DEPENDENCIES =
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...
-- Hannes