1use ExtUtils::MakeMaker;
2
3sub MY::postamble {
4 return <<'MAKE_FRAG';
5instlibdir:
6 @echo '$(INSTALLSITELIB)'
7
8MAKE_FRAG
9}
10
11my %pm = ('Git.pm' => '$(INST_LIBDIR)/Git.pm');
12
13# We come with our own bundled Error.pm. It's not in the set of default
14# Perl modules so install it if it's not available on the system yet.
15eval { require Error };
16if ($@ || $Error::VERSION < 0.15009) {
17 $pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';
18}
19
20my %extra;
21$extra{DESTDIR} = $ENV{DESTDIR} if $ENV{DESTDIR};
22
23# redirect stdout, otherwise the message "Writing perl.mak for Git"
24# disrupts the output for the target 'instlibdir'
25open STDOUT, ">&STDERR";
26
27WriteMakefile(
28 NAME => 'Git',
29 VERSION_FROM => 'Git.pm',
30 PM => \%pm,
31 MAKEFILE => 'perl.mak',
32 %extra
33);