Merge branch 'master' into pb/gitpm
[gitweb.git] / perl / Makefile.PL
index d401a6609bb552627dc3d85c53018d8941420687..97ee9af9c9834d759c33b17bca7b66eaef200e4f 100644 (file)
@@ -5,6 +5,11 @@ sub MY::postamble {
 instlibdir:
        @echo '$(INSTALLSITEARCH)'
 
+check:
+       perl -MDevel::PPPort -le 'Devel::PPPort::WriteFile(".ppport.h")' && \
+       perl .ppport.h --compat-version=5.6.0 Git.xs && \
+       rm .ppport.h
+
 MAKE_FRAG
 }
 
@@ -12,9 +17,9 @@ my %pm = ('Git.pm' => '$(INST_LIBDIR)/Git.pm');
 
 # We come with our own bundled Error.pm. It's not in the set of default
 # Perl modules so install it if it's not available on the system yet.
-eval { require 'Error' };
+eval { require Error };
 if ($@) {
-       $pm{'Error.pm'} = '$(INST_LIBDIR)/Error.pm';
+       $pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';
 }
 
 WriteMakefile(
@@ -24,8 +29,3 @@ WriteMakefile(
        MYEXTLIB        => '../libgit.a',
        INC             => '-I. -I..',
 );
-
-
-use Devel::PPPort;
-
--s 'ppport.h' or Devel::PPPort::WriteFile();