Skip to content

Commit 058fb41

Browse files
drafnelgitster
authored andcommitted
perl/Makefile: update NO_PERL_MAKEMAKER section
The perl modules must be copied to blib/lib so they are available for testing. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent c84bb14 commit 058fb41

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

perl/Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,18 @@ clean:
2222
ifdef NO_PERL_MAKEMAKER
2323
instdir_SQ = $(subst ','\'',$(prefix)/lib)
2424
$(makfile): ../GIT-CFLAGS Makefile
25-
echo all: > $@
26-
echo ' :' >> $@
25+
echo all: private-Error.pm Git.pm > $@
26+
echo ' mkdir -p blib/lib' >> $@
27+
echo ' $(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@
28+
echo ' $(RM) blib/lib/Error.pm' >> $@
29+
'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
30+
echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
2731
echo install: >> $@
2832
echo ' mkdir -p $(instdir_SQ)' >> $@
2933
echo ' $(RM) $(instdir_SQ)/Git.pm; cp Git.pm $(instdir_SQ)' >> $@
30-
echo ' $(RM) $(instdir_SQ)/Error.pm; \
31-
cp private-Error.pm $(instdir_SQ)/Error.pm' >> $@
34+
echo ' $(RM) $(instdir_SQ)/Error.pm' >> $@
35+
'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
36+
echo ' cp private-Error.pm $(instdir_SQ)/Error.pm' >> $@
3237
echo instlibdir: >> $@
3338
echo ' echo $(instdir_SQ)' >> $@
3439
else

0 commit comments

Comments
 (0)