Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] perl/Makefile: update NO_PERL_MAKEMAKER section

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:00
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

Brandon Casey [off-list ref] writes:
The perl modules must be copied to blib/lib so they are available for
testing.
True, but private-Error needs to be handled a bit more carefully, I
think.

How about this on top of your patch?

 perl/Makefile |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/perl/Makefile b/perl/Makefile
index 2b0d3d5..b8547db 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -25,13 +25,15 @@ $(makfile): ../GIT-CFLAGS Makefile
 	echo all: private-Error.pm Git.pm > $@
 	echo '	mkdir -p blib/lib' >> $@
 	echo '	$(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@
-	echo '	$(RM) blib/lib/Error.pm; \
-	cp private-Error.pm blib/lib/Error.pm' >> $@
+	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 $(instdir_SQ)' >> $@
 	echo '	$(RM) $(instdir_SQ)/Git.pm; cp Git.pm $(instdir_SQ)' >> $@
-	echo '	$(RM) $(instdir_SQ)/Error.pm; \
-	cp private-Error.pm $(instdir_SQ)/Error.pm' >> $@
+	echo '	$(RM) $(instdir_SQ)/Error.pm' >> $@
+	'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
+	echo '	cp private-Error.pm $(instdir_SQ)/Error.pm' >> $@
 	echo instlibdir: >> $@
 	echo '	echo $(instdir_SQ)' >> $@
 else
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help