]> git.ipfire.org Git - thirdparty/git.git/blob - perl/Makefile.PL
pass DESTDIR to the generated perl/Makefile
[thirdparty/git.git] / perl / Makefile.PL
1 use ExtUtils::MakeMaker;
2
3 sub MY::postamble {
4 return <<'MAKE_FRAG';
5 instlibdir:
6 @echo '$(INSTALLSITEARCH)'
7
8 check:
9 perl -MDevel::PPPort -le 'Devel::PPPort::WriteFile(".ppport.h")' && \
10 perl .ppport.h --compat-version=5.6.0 Git.xs && \
11 rm .ppport.h
12
13 MAKE_FRAG
14 }
15
16 my %pm = ('Git.pm' => '$(INST_LIBDIR)/Git.pm');
17
18 # We come with our own bundled Error.pm. It's not in the set of default
19 # Perl modules so install it if it's not available on the system yet.
20 eval { require Error };
21 if ($@) {
22 $pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';
23 }
24
25 my %extra;
26 $extra{DESTDIR} = $ENV{DESTDIR} if $ENV{DESTDIR};
27
28 WriteMakefile(
29 NAME => 'Git',
30 VERSION_FROM => 'Git.pm',
31 PM => \%pm,
32 MYEXTLIB => '../libgit.a',
33 INC => '-I. -I..',
34 %extra
35 );