-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile.PL
64 lines (60 loc) · 1.76 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
58
59
60
61
62
63
64
use 5.008009;
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'JavaScript::Duktape::XS',
VERSION_FROM => 'lib/JavaScript/Duktape/XS.pm',
ABSTRACT_FROM => 'lib/JavaScript/Duktape/XS.pm',
LICENSE => 'mit',
MIN_PERL_VERSION => 5.014000,
PREREQ_PM => {
'JSON::PP' => 0,
'XSLoader' => 0,
},
TEST_REQUIRES => {
'Data::Dumper' => 0,
'JSON::PP' => 0,
'Path::Tiny' => 0,
'Scalar::Util' => 0,
'Test::Exception' => 0,
'Test::More' => 0,
'Test::Output' => 0,
'Text::Trim' => 0,
'Time::HiRes' => 0,
},
AUTHOR => [
'Gonzalo Diethelm ([email protected])',
],
LIBS => [''],
# DEFINE => '-DGMEM_CHECK',
INC => '-I.',
OBJECT => '$(O_FILES)',
META_MERGE => {
'meta-spec' => { version => 2 },
resources => {
repository => {
type => 'git',
url => '[email protected]:gonzus/JavaScript-Duktape-XS',
web => 'https://github.com/gonzus/JavaScript-Duktape-XS',
},
},
},
);
# 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";
}