perl / Makefile.PLon commit Git.pm: Support for perl/ being built by a different compiler (8d7f586)
   1use ExtUtils::MakeMaker;
   2
   3sub MY::postamble {
   4        return <<'MAKE_FRAG';
   5instlibdir:
   6        @echo $(INSTALLSITEARCH)
   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 ($@) {
  17        $pm{'Error.pm'} = '$(INST_LIBDIR)/Error.pm';
  18}
  19
  20WriteMakefile(
  21        NAME            => 'Git',
  22        VERSION_FROM    => 'Git.pm',
  23        PM              => \%pm,
  24        MYEXTLIB        => '../libgit.a',
  25        INC             => '-I. -I..',
  26);
  27
  28
  29use Devel::PPPort;
  30
  31-s 'ppport.h' or Devel::PPPort::WriteFile();