git: simplify sysopen usage
[ssoma.git] / Makefile.PL
blobbbf784d770213deeee4b06506178d54268d79e76
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::Address' => 0,
23 'Email::LocalDelivery' => 0,
24 'Email::MIME' => 0,
25 'IPC::Run' => 0,
26 'File::Path::Expand' => 0,
27 'Net::IMAP::Simple' => 0,
31 sub MY::postamble {
32 <<EOF;
33 -include Documentation/include.mk
34 N := \$(shell echo \$\$(( \$\$(nproc 2>/dev/null || echo 2) + 1)))
35 my_syntax := \$(addsuffix .syntax, $PM_FILES \$(EXE_FILES))
37 %.syntax ::
38 @\$(PERL) -I lib -c \$(subst .syntax,,\$@)
40 syntax:: \$(my_syntax)
43 check:: pure_all
44 prove -lv -j\$(N)
46 EOF