3 use ExtUtils::MakeMaker;
7 # Don't forget to update the perl/Makefile, too.
8 # Don't forget to test with NO_PERL_MAKEMAKER=YesPlease
10 # Sanity: die at first unknown option
11 Getopt::Long::Configure qw/ pass_through /;
14 GetOptions("localedir=s" => \$localedir);
19 @echo '$(INSTALLSITELIB)'
22 ifeq (0,$(shell expr '$(MM_VERSION)' '>' 6.10))
23 $(error ExtUtils::MakeMaker version "$(MM_VERSION)" is older than 6.11 and so \
24 is likely incompatible with the DESTDIR mechanism. Try setting \
25 NO_PERL_MAKEMAKER=1 instead)
32 # Find all the .pm files in "Git/" and Git.pm
35 return unless /\.pm$/;
37 # sometimes File::Find prepends a ./ Strip it.
38 my $pm_path = $File::Find::name;
39 $pm_path =~ s{^\./}{};
41 $pm{$pm_path} = '$(INST_LIBDIR)/'.$pm_path;
45 # We come with our own bundled Error.pm. It's not in the set of default
46 # Perl modules so install it if it's not available on the system yet.
47 if ( !eval { require Error } || $Error::VERSION < 0.15009) {
48 $pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';
51 # redirect stdout, otherwise the message "Writing perl.mak for Git"
52 # disrupts the output for the target 'instlibdir'
53 open STDOUT, ">&STDERR";
57 VERSION_FROM => 'Git.pm',
59 PM_FILTER => qq[\$(PERL) -pe "s<\\Q++LOCALEDIR++\\E><$localedir>"],
60 MAKEFILE => 'perl.mak',
61 INSTALLSITEMAN3DIR => '$(SITEPREFIX)/share/man/man3'