doc: do not override Makefile if POD2* is set
[ssoma.git] / Makefile.PL
blobb16c17cbf0e84e0f0090e191db3e894e4bd5077f
1 #!/usr/bin/perl
2 # Copyright 2013-2016 all contributors <meta@public-inbox.org>
3 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
5 # Note: this may be rewritten in another language in the future,
6 # so don't depend on any public Perl API
7 use strict;
8 use ExtUtils::MakeMaker;
9 my @EXE_FILES = split("\n", `git ls-files 'script/' 2>/dev/null`);
10 my $PM_FILES = `git ls-files lib '*.pm' 2>/dev/null`;
11 $PM_FILES =~ tr/\n/ /;
13 WriteMakefile(
14 NAME => 'ssoma',
15 VERSION => '0.2.0',
16 AUTHOR => 'Eric Wong <e@80x24.org>',
17 ABSTRACT => 'some sort of mail archiver',
18 EXE_FILES => \@EXE_FILES,
19 PREREQ_PM => {
20 # Keep this sorted and synced to the INSTALL document
21 'Digest::SHA' => 0,
22 'Email::LocalDelivery' => 0,
23 'Email::MIME' => 0,
24 'IPC::Run' => 0,
25 'File::Path::Expand' => 0,
26 'Net::IMAP::Simple' => 0,
30 sub MY::postamble {
31 <<EOF;
32 -include Documentation/include.mk
33 N := \$(shell echo \$\$(( \$\$(nproc 2>/dev/null || echo 2) + 1)))
34 my_syntax := \$(addsuffix .syntax, $PM_FILES \$(EXE_FILES))
36 %.syntax ::
37 @\$(PERL) -I lib -c \$(subst .syntax,,\$@)
39 syntax:: \$(my_syntax)
42 check:: pure_all
43 prove -lv -j\$(N)
45 EOF