Re: [PATCH v2 1/1] perl: fix installing modules from contrib
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 10, 2018, 21:44 UTC
- Message-ID
- <xmqqpo3620tz.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180410133641.18861-1-mail@eworm.de>
Christian Hesse <mail@eworm.de> writes:
Show 24 quoted lines
> Commit 20d2a30f (Makefile: replace perl/Makefile.PL with simple make rules) > removed a target that allowed Makefiles from contrib/ to get the correct > install path. This introduces a new target for main Makefile and fixes > installation for Mediawiki module. > > v2: Pass prefix as that can have influence as well, add single quotes > for _SQ variant. > > Signed-off-by: Christian Hesse <mail@eworm.de> > --- > Makefile | 2 ++ > contrib/mw-to-git/Makefile | 5 +++-- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/Makefile b/Makefile > index 96f6138f6..19ca5e8de 100644 > --- a/Makefile > +++ b/Makefile > @@ -2011,6 +2011,8 @@ GIT-PERL-DEFINES: FORCE > echo "$$FLAGS" >$@; \ > fi > > +perllibdir: > + @echo '$(perllibdir_SQ)'
Sorry for not noticing it before, but as this rule will not create and update timestamp of a filesystem entity 'perllibdir', shouldn't we mark it with .PHONY? I'd call the target 'say-perllibdir' if I were doing this patch but that is merely a personal preference.
Show 18 quoted lines
> .PHONY: gitweb > gitweb: > diff --git a/contrib/mw-to-git/Makefile b/contrib/mw-to-git/Makefile > index a4b6f7a2c..4e603512a 100644 > --- a/contrib/mw-to-git/Makefile > +++ b/contrib/mw-to-git/Makefile > @@ -21,8 +21,9 @@ HERE=contrib/mw-to-git/ > INSTALL = install > > SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL)) > -INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \ > - -s --no-print-directory instlibdir) > +INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/ \ > + -s --no-print-directory prefix=$(prefix) \ > + perllibdir=$(perllibdir) perllibdir) > DESTDIR_SQ = $(subst ','\'',$(DESTDIR)) > INSTLIBDIR_SQ = $(subst ','\'',$(INSTLIBDIR)) >