ef9d82d7b63f0c2bee5777025450af4c5eb3abb2
   1use ExtUtils::MakeMaker;
   2
   3sub MY::postamble {
   4        return <<'MAKE_FRAG';
   5instlibdir:
   6        @echo '$(INSTALLSITEARCH)'
   7
   8check:
   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
  13MAKE_FRAG
  14}
  15
  16my %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.
  20eval { require Error };
  21if ($@) {
  22        $pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';
  23}
  24
  25my %extra;
  26$extra{DESTDIR} = $ENV{DESTDIR} if $ENV{DESTDIR};
  27
  28WriteMakefile(
  29        NAME            => 'Git',
  30        VERSION_FROM    => 'Git.pm',
  31        PM              => \%pm,
  32        MYEXTLIB        => '../libgit.a',
  33        INC             => '-I. -I..',
  34        %extra
  35);