1 use ExtUtils::MakeMaker;
3 sub MY::postamble {
4 return <<'MAKE_FRAG';
5 instlibdir:
6 @echo '$(INSTALLSITELIB)'
8 ifneq (,$(DESTDIR))
9 ifeq (0,$(shell expr '$(MM_VERSION)' '>' 6.10))
10 $(error ExtUtils::MakeMaker version "$(MM_VERSION)" is older than 6.11 and so \
11 is likely incompatible with the DESTDIR mechanism. Try setting \
12 NO_PERL_MAKEMAKER=1 instead)
13 endif
14 endif
16 MAKE_FRAG
17 }
19 my %pm = ('Git.pm' => '$(INST_LIBDIR)/Git.pm');
21 # We come with our own bundled Error.pm. It's not in the set of default
22 # Perl modules so install it if it's not available on the system yet.
23 eval { require Error };
24 if ($@ || $Error::VERSION < 0.15009) {
25 $pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';
26 }
28 # redirect stdout, otherwise the message "Writing perl.mak for Git"
29 # disrupts the output for the target 'instlibdir'
30 open STDOUT, ">&STDERR";
32 WriteMakefile(
33 NAME => 'Git',
34 VERSION_FROM => 'Git.pm',
35 PM => \%pm,
36 MAKEFILE => 'perl.mak',
37 INSTALLSITEMAN3DIR => '$(SITEPREFIX)/share/man/man3'
38 );