Re: [PATCH 2/2] perl/Makefile: install Git::I18N under NO_PERL_MAKEMAKER

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 2/2] perl/Makefile: install Git::I18N under NO_PERL_MAKEMAKER

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:16

Ævar Arnfjörð Bjarmason [off-list ref] writes:
quoted hunk
When I added the i18n infrastructure in v1.7.8-rc2-1-g5e9637c I forgot
to install Git::I18N also when NO_PERL_MAKEMAKER=YesPlease was
set. Change the generation of the fallback perl.mak file to do that.

Now Git/I18N.pm is installed alongside Git.pm in such a way that
anything that uses GITPERLLIB will find it.

Reported-by: Tom G. Christensen <redacted>
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 perl/Makefile |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/perl/Makefile b/perl/Makefile
index b2977cd..9af9025 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -23,20 +23,25 @@ clean:
 ifdef NO_PERL_MAKEMAKER
 instdir_SQ = $(subst ','\'',$(prefix)/lib)
 $(makfile): ../GIT-CFLAGS Makefile
-	echo all: private-Error.pm Git.pm > $@
+	echo all: private-Error.pm Git.pm Git/I18N.pm > $@
 	echo '	mkdir -p blib/lib' >> $@
+	echo '	mkdir -p blib/lib/Git' >> $@
micronit; the previous line can be removed.
 	echo '	$(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@
+	echo '	$(RM) blib/lib/Git/I18N.pm; cp Git/I18N.pm blib/lib/Git/' >> $@
 	echo '	$(RM) blib/lib/Error.pm' >> $@
 	'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
 	echo '	cp private-Error.pm blib/lib/Error.pm' >> $@
 	echo install: >> $@
 	echo '	mkdir -p "$$(DESTDIR)$(instdir_SQ)"' >> $@
+	echo '	mkdir -p "$$(DESTDIR)$(instdir_SQ)/Git"' >> $@
 	echo '	$(RM) "$$(DESTDIR)$(instdir_SQ)/Git.pm"; cp Git.pm "$$(DESTDIR)$(instdir_SQ)"' >> $@
+	echo '	$(RM) "$$(DESTDIR)$(instdir_SQ)/Git/I18N.pm"; cp Git/I18N.pm "$$(DESTDIR)$(instdir_SQ)/Git"' >> $@
 	echo '	$(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
 	'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
 	echo '	cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
 	echo instlibdir: >> $@
 	echo '	echo $(instdir_SQ)' >> $@
+	echo '	echo $(instdir_SQ)/Git' >> $@
This break "make NO_PERL_MAKEMAKER=Nah git-add--interactive", or
anything that is a perl script, it appears.

The resulting perl/perl.mak ends with

	instlibdir:
                echo foo
                echo foo/Git

but the top-level Makefile wants to see output from

	make instlibdir

in this directory as a single line in this rule:

$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
	$(QUIET_GEN)$(RM) $@ $@+ && \
	INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
	echo "<$$INSTLIBDIR>" && \
	sed -e '1{' \
	    -e '	s|#!.*perl|#!$(PERL_PATH_SQ)|' \
	    -e '	h' \
	    -e '	s=.*=use lib (split(/$(pathsep)/, $$ENV{GITPERLLIB} || "'"$$INSTLIBDIR"'"));=' \
	    -e '	H' \
	    -e '	x' \
	    -e '}' \
	    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
	    $@.perl >$@+ && \

Re: [PATCH 2/2] perl/Makefile: install Git::I18N under NO_PERL_MAKEMAKER

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:53:16

On Sat, Mar 10, 2012 at 22:38, Junio C Hamano [off-list ref] wrote:
quoted
      echo '  $(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@
+     echo '  $(RM) blib/lib/Git/I18N.pm; cp Git/I18N.pm blib/lib/Git/' >> $@
      echo '  $(RM) blib/lib/Error.pm' >> $@
      '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
      echo '  cp private-Error.pm blib/lib/Error.pm' >> $@
      echo install: >> $@
      echo '  mkdir -p "$$(DESTDIR)$(instdir_SQ)"' >> $@
+     echo '  mkdir -p "$$(DESTDIR)$(instdir_SQ)/Git"' >> $@
      echo '  $(RM) "$$(DESTDIR)$(instdir_SQ)/Git.pm"; cp Git.pm "$$(DESTDIR)$(instdir_SQ)"' >> $@
+     echo '  $(RM) "$$(DESTDIR)$(instdir_SQ)/Git/I18N.pm"; cp Git/I18N.pm "$$(DESTDIR)$(instdir_SQ)/Git"' >> $@
      echo '  $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
      '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
      echo '  cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
      echo instlibdir: >> $@
      echo '  echo $(instdir_SQ)' >> $@
+     echo '  echo $(instdir_SQ)/Git' >> $@
This break "make NO_PERL_MAKEMAKER=Nah git-add--interactive", or
anything that is a perl script, it appears.

The resulting perl/perl.mak ends with

       instlibdir:
               echo foo
               echo foo/Git

but the top-level Makefile wants to see output from

       make instlibdir
Fail, I just tested installing it to /tmp. Sorry about that.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help