-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.PL
43 lines (37 loc) · 1.21 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
use strict;
use warnings;
use ExtUtils::MakeMaker;
#
# We allow a number of env vars to control the behaviour of Makefile.PL:
#
# KHARON_ENABLE_DEVELOPER Turns on compiler warnings. This may
# break on many arches because warnings
# vary depending on the version of the
# compiler.
# KHARON_KNCPATH Path to knc (defaults to /usr/bin/knc).
# (May not contain commas.)
our @warnings = qw/ -Werror -Wall
-Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith -Wno-sign-compare
-Wno-traditional -Wreturn-type -Wswitch
-Wno-shadow -Wcast-qual -Wwrite-strings -Wextra
-Wno-unused-parameter -Wsign-compare/;
if (!defined($ENV{KHARON_ENABLE_DEVELOPER}) || !$ENV{KHARON_ENABLE_DEVELOPER}) {
@warnings = ();
}
my %args = (
NAME => 'Kharon',
AUTHOR => q{Roland C. Dowdeswell <[email protected]>},
VERSION_FROM => 'lib/Kharon.pm',
ABSTRACT_FROM => 'lib/Kharon.pm',
LICENSE => 'MIT',
PL_FILES => {},
DIR => ['ArrayHash'],
OPTIMIZE => '-O2 -g ' . join(' ', @warnings),
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'Kharon-*' },
);
if (defined($ENV{KHARON_KNCPATH})) {
$args{PM_FILTER} = qq{sed -e 's,/usr/bin/knc,$ENV{KHARON_KNCPATH},g'};
}
WriteMakefile(%args);