relax usage of the progress API
[git/dscho.git] / perl / Makefile.PL
blob6aecd897f8fe5b69b1805e94a20c578c10246a4d
1 use ExtUtils::MakeMaker;
3 sub MY::postamble {
4         return <<'MAKE_FRAG';
5 instlibdir:
6         @echo '$(INSTALLSITELIB)'
8 MAKE_FRAG
11 my %pm = ('Git.pm' => '$(INST_LIBDIR)/Git.pm');
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.
15 eval { require Error };
16 if ($@ || $Error::VERSION < 0.15009) {
17         $pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';
20 my %extra;
21 $extra{DESTDIR} = $ENV{DESTDIR} if $ENV{DESTDIR};
23 # redirect stdout, otherwise the message "Writing perl.mak for Git"
24 # disrupts the output for the target 'instlibdir'
25 open STDOUT, ">&STDERR";
27 WriteMakefile(
28         NAME            => 'Git',
29         VERSION_FROM    => 'Git.pm',
30         PM              => \%pm,
31         MAKEFILE        => 'perl.mak',
32         INSTALLSITEMAN3DIR => '$(SITEPREFIX)/share/man/man3',
33         %extra