/
Makefile-5004.pm
70 lines (52 loc) · 1.22 KB
/
Makefile-5004.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/perl
# rocco // vim: ts=2 sw=2 expandtab
use strict;
use ExtUtils::MakeMaker;
use lib qw(./mylib);
use PoeBuildInfo qw(
TEST_FILES
CLEAN_FILES
CORE_REQUIREMENTS
);
### Touch files that will be generated at "make dist" time.
### ExtUtils::MakeMaker and Module::Build will complain about them if
### they aren't present now.
open(TOUCH, ">>CHANGES") and close TOUCH;
open(TOUCH, ">>META.yml") and close TOUCH;
### Touch gen-tests.perl so it always triggers.
utime(time(), time(), "mylib/gen-tests.perl");
### Generate Makefile.PL.
sub MY::postamble {
return <<EOF;
coverage: Makefile
\cI$^X mylib/coverage.perl
cover: coverage
ppmdist:
\cIecho Use a modern version of Perl to build the PPM distribution.
\cIfalse
EOF
}
WriteMakefile(
NAME => 'POE',
VERSION_FROM => 'lib/POE.pm',
dist => {
COMPRESS => 'gzip -9f',
SUFFIX => 'gz',
PREOP => (
'echo Use a modern version of Perl to build distributions.; ' .
'false'
),
},
clean => {
FILES => CLEAN_FILES,
},
test => {
TESTS => TEST_FILES,
},
# Not executed on "make test".
PL_FILES => {
'mylib/gen-tests.perl' => [ 'lib/POE.pm' ],
},
PREREQ_PM => { CORE_REQUIREMENTS },
);
1;