]> git.ipfire.org Git - thirdparty/git.git/blame - perl/Makefile.PL
Merge branch 'maint'
[thirdparty/git.git] / perl / Makefile.PL
CommitLineData
b1edc53d
PB
1use ExtUtils::MakeMaker;
2
3sub MY::postamble {
4 return <<'MAKE_FRAG';
5instlibdir:
18b0fc1c 6 @echo '$(INSTALLSITELIB)'
e2a38710 7
efe47f8f
BC
8ifneq (,$(DESTDIR))
9ifeq (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)
13endif
14endif
15
b1edc53d
PB
16MAKE_FRAG
17}
18
5c4082fd
PB
19my %pm = ('Git.pm' => '$(INST_LIBDIR)/Git.pm');
20
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.
1d8c9dc4 23eval { require Error };
4a40cbd9 24if ($@ || $Error::VERSION < 0.15009) {
1d8c9dc4 25 $pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';
5c4082fd
PB
26}
27
8bef6204
JS
28# redirect stdout, otherwise the message "Writing perl.mak for Git"
29# disrupts the output for the target 'instlibdir'
30open STDOUT, ">&STDERR";
31
b1edc53d
PB
32WriteMakefile(
33 NAME => 'Git',
34 VERSION_FROM => 'Git.pm',
5c4082fd 35 PM => \%pm,
2cdf87eb 36 MAKEFILE => 'perl.mak',
28072a5d 37 INSTALLSITEMAN3DIR => '$(SITEPREFIX)/share/man/man3'
b1edc53d 38);