X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=perl%2FMakefile.PL;h=0b9deca2cc6ef77897a23b2096a7acdd577c2482;hb=baf18fc261ca475343fe3cb9cd2c0dded4bc1bb7;hp=6aecd897f8fe5b69b1805e94a20c578c10246a4d;hpb=5071877d2c623ffc41b48bbb49908a61051a6228;p=git.git diff --git a/perl/Makefile.PL b/perl/Makefile.PL index 6aecd897f..0b9deca2c 100644 --- a/perl/Makefile.PL +++ b/perl/Makefile.PL @@ -5,6 +5,14 @@ sub MY::postamble { instlibdir: @echo '$(INSTALLSITELIB)' +ifneq (,$(DESTDIR)) +ifeq (0,$(shell expr '$(MM_VERSION)' '>' 6.10)) +$(error ExtUtils::MakeMaker version "$(MM_VERSION)" is older than 6.11 and so \ + is likely incompatible with the DESTDIR mechanism. Try setting \ + NO_PERL_MAKEMAKER=1 instead) +endif +endif + MAKE_FRAG } @@ -17,9 +25,6 @@ if ($@ || $Error::VERSION < 0.15009) { $pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm'; } -my %extra; -$extra{DESTDIR} = $ENV{DESTDIR} if $ENV{DESTDIR}; - # redirect stdout, otherwise the message "Writing perl.mak for Git" # disrupts the output for the target 'instlibdir' open STDOUT, ">&STDERR"; @@ -29,6 +34,5 @@ WriteMakefile( VERSION_FROM => 'Git.pm', PM => \%pm, MAKEFILE => 'perl.mak', - INSTALLSITEMAN3DIR => '$(SITEPREFIX)/share/man/man3', - %extra + INSTALLSITEMAN3DIR => '$(SITEPREFIX)/share/man/man3' );