-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.PL
106 lines (94 loc) · 2.66 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#!/usr/bin/perl
# Copyright PROCURA B.V. (c) 2006-2009 H.Merijn Brand
require 5.005; # <- also see postamble at the bottom for META.yml
use strict;
use ExtUtils::MakeMaker;
eval { require Text::CSV_XS };
if (!$@ && $Text::CSV_XS::VERSION < 0.15) {
print <<'MSG';
You seem to have installed a previous version of the Text::CSV_XS module.
Note that you might encounter problems in existing applications (not the
DBD::CSV driver) due to incompatible changes in the print and getline
methods. See "perldoc CSV_XS.pm" for details.
MSG
sleep 5;
}
my %wm = (
NAME => "Text::CSV_XS",
ABSTRACT => "Comma-Separated Values manipulation routines",
AUTHOR => "H.Merijn Brand <h.merijn\@xs4all.nl>",
VERSION_FROM => "CSV_XS.pm",
PREREQ_PM => { "DynaLoader" => 0,
"Config" => 0,
"IO::Handle" => 0,
"Test::More" => 0,
"Test::Harness" => 0,
},
clean => { FILES => join " ", qw(
CSV_XS.c.gcov
CSV_XS.gcda
CSV_XS.gcno
CSV_XS.xs.gcov
cover_db
valgrind.log
)
},
);
$ExtUtils::MakeMaker::VERSION > 6.30 and $wm{LICENSE} = "perl";
my $rv = WriteMakefile (%wm);
1;
package MY;
sub postamble
{
my $valgrind = join " ", qw(
PERL_DESTRUCT_LEVEL=2 PERL_DL_NONLAZY=1
valgrind
--suppressions=sandbox/perl.supp
--leak-check=yes
--leak-resolution=high
--show-reachable=yes
--num-callers=50
--log-fd=3
$(FULLPERLRUN) "-MExtUtils::Command::MM" "-e"
"test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')"
$(TEST_FILES) 3>valgrind.log
);
my $min_vsn = ($] >= 5.010 && -d "xt" && -d "tmp" && ($ENV{AUTOMATED_TESTING} || 0) != 1)
? join "\n" =>
'test ::',
' -@env TEST_FILES="xt/*.t" make -e test_dynamic',
''
: "";
join "\n" =>
'cover test_cover:',
' ccache -C',
' -@rm -f *.gc??',
' cover -test',
'',
'leakcheck:',
" $valgrind",
' -@tail -5 valgrind.log',
'',
'leaktest:',
q{ sandbox/leaktest $(FULLPERLRUN) "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)},
'',
'leaktrace:',
q{ sandbox/leaktrace $(FULLPERLRUN) "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)},
'',
'checkmeta:',
' perl sandbox/genPPPort_h.pl',
' perl sandbox/genMETA.pl -c',
'',
'fixmeta: distmeta',
' perl sandbox/genMETA.pl',
'',
'tgzdist: checkmeta fixmeta $(DISTVNAME).tar.gz distcheck',
' -@mv -f $(DISTVNAME).tar.gz $(DISTVNAME).tgz',
' -@cpants_lint.pl $(DISTVNAME).tgz',
' -@rm -f Debian_CPANTS.txt',
'',
'test_speed: pure_all',
' PERL_DL_NONLAZY=1 $(FULLPERLRUN) -I"$(INST_LIB)" -I"$(INST_ARCHLIB)" examples/speed.pl',
'',
$min_vsn;
} # postamble