-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.PL
57 lines (52 loc) · 1.43 KB
/
Makefile.PL
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
use 5.008009;
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'Devel::Probe',
VERSION_FROM => 'lib/Devel/Probe.pm',
ABSTRACT_FROM => 'lib/Devel/Probe.pm',
LICENSE => 'mit',
MIN_PERL_VERSION => 5.018000,
PREREQ_PM => {
'XSLoader' => 0,
'Carp' => 0,
'Storable' => 0,
},
TEST_REQUIRES => {
'Test::More' => 0,
'Devel::Leak' => 0,
},
AUTHOR => [
'Gonzalo Diethelm ([email protected])',
],
INC => '-I.',
OBJECT => '$(O_FILES)',
META_MERGE => {
'meta-spec' => { version => 2 },
resources => {
repository => {
type => 'git',
url => '[email protected]:gonzus/Devel-Probe.git',
web => 'https://github.com/gonzus/Devel-Probe.git',
},
},
},
);
# Add options CCFLAGS without overwriting the defaults
package MY;
sub cflags {
my $self = shift;
my $cflags = $self->SUPER::cflags(@_);
my @cflags = split /\n/, $cflags;
# turn on a bunch of warning flags
my @warning_flags_always = qw/
all
extra
declaration-after-statement
comment
/;
$self->{CCFLAGS} .= " -W$_" for @warning_flags_always;
foreach (@cflags) {
$_ = "CCFLAGS = $self->{CCFLAGS}" if /^CCFLAGS/;
}
return $self->{CFLAGS} = join("\n", @cflags) . "\n";
}