Code

add NORETURN_PTR for function pointers
[git.git] / perl / Makefile.PL
index 6aecd897f8fe5b69b1805e94a20c578c10246a4d..0b9deca2cc6ef77897a23b2096a7acdd577c2482 100644 (file)
@@ -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'
 );