gitweb: use new Git::Repo API, and add optional caching
[git/gitweb-caching.git] / perl / Makefile.PL
blob6c621605a4f4bd507b2cb47562f8e145d4d11ce8
1 use ExtUtils::MakeMaker;
3 sub MY::postamble {
4         return <<'MAKE_FRAG';
5 instlibdir:
6         @echo '$(INSTALLSITELIB)'
8 MAKE_FRAG
11 # Note that when changing %pm, you'll have to remove pm_to_blib rather
12 # than the blib directory to .force the .pm files to be re-installed
13 # to blib/lib.
14 my %pm = ('Git.pm' => '$(INST_LIBDIR)/Git.pm',
15           'Git/Repo.pm' => '$(INST_LIBDIR)/Git/Repo.pm',
16           'Git/RepoRoot.pm' => '$(INST_LIBDIR)/Git/RepoRoot.pm',
17           'Git/Commit.pm' => '$(INST_LIBDIR)/Git/Commit.pm',
18           'Git/Tag.pm' => '$(INST_LIBDIR)/Git/Tag.pm',
19           'Git/Object.pm' => '$(INST_LIBDIR)/Git/Object.pm');
21 # We come with our own bundled Error.pm. It's not in the set of default
22 # Perl modules so install it if it's not available on the system yet.
23 eval { require Error };
24 if ($@ || $Error::VERSION < 0.15009) {
25         $pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';
28 # redirect stdout, otherwise the message "Writing perl.mak for Git"
29 # disrupts the output for the target 'instlibdir'
30 open STDOUT, ">&STDERR";
32 WriteMakefile(
33         NAME            => 'Git',
34         VERSION_FROM    => 'Git.pm',
35         PM              => \%pm,
36         MAKEFILE        => 'perl.mak',
37         INSTALLSITEMAN3DIR => '$(SITEPREFIX)/share/man/man3'