-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.PL
103 lines (92 loc) · 3.28 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
use ExtUtils::MakeMaker;
use 5.010;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
%mm_args = (
'NAME' => 'Math::PRBS',
'AUTHOR' => 'Peter C. jones <petercj AT cpan.org>',
'VERSION' => '0.004001',
'ABSTRACT' => 'Dummy module for testing appveyor.yml',
'PREREQ_PM' => {
'Exporter' => 5.57, # needed for `use Exporter qw(import);` notation
'version' => 0.77,
'warnings' => 0,
'strict' => 0,
'Carp' => 0,
'Test::More' => 0.86,
'Win32::GuiTest' => 1.64,
},
);
{
no warnings;
if( $ExtUtils::MakeMaker::VERSION >= '6.31' ) {
$mm_args{LICENSE} = 'perl_5';
}
if( $ExtUtils::MakeMaker::VERSION >= '6.48' ) {
$mm_args{MIN_PERL_VERSION} = '5.10.0';
}
if( $ExtUtils::MakeMaker::VERSION >= '6.52' ) {
$mm_args{CONFIGURE_REQUIRES} = {
'ExtUtils::MakeMaker' => 0,
'Exporter' => 5.57, # needed for `use Exporter qw(import);` notation
'warnings' => 0,
'strict' => 0,
'Test::More' => 0.86,
'constant' => 0,
'Config' => 0,
'File::Fetch' => 0,
'File::Spec' => 0,
'File::Which' => 0,
'Archive::Extract' => 0,
},
}
if( $ExtUtils::MakeMaker::VERSION >= '6.64' ) {
$mm_args{TEST_REQUIRES} = {
'warnings' => 0,
'strict' => 0,
'Test::More' => 0.86,
'constant' => 0,
'Config' => 0,
};
}
if( $ExtUtils::MakeMaker::VERSION >= '6.18' ) {
$mm_args{SIGN} = 1 if MM->can('signature_target') && $ENV{MM_SIGN_DIST};
}
}
# use lib './helpbuild';
# use myMakeHelper;
# my %helper = myMakeHelper();
# use Data::Dumper; print Dumper \%helper;
sub MY::postamble {
my (undef,%h) = @_;
#require Data::Dumper;
#print STDERR Data::Dumper->Dump([\%h], [qw(mm_args{postamble})]);
my $POSTAMBLE =<<'POSTAMBLE';
# TEST_D is used to test for the existence of a directory
TEST_D = $(ABSPERLRUN) -MExtUtils::Command -e test_d --
# addition to realclean: also delete coverage database, if testcover was run
realclean ::
$(NOECHO) ( $(TEST_D) cover_db && $(RM_RF) cover_db ) || $(ECHO) realclean:: skip "rm -rf cover_db"
$(NOECHO) ( $(TEST_F) MYMETA.json.lock && $(RM_RF) MYMETA.json.lock ) || $(ECHO) realclean:: skip "rm -rf MYMETA.json.lock"
$(NOECHO) $(ECHO) "1;" > t/nppPath.inc.pl
# run a test coverage report
testcover ::
$(NOECHO) cover -test -report html
test ::
$(NOECHO) $(ECHO) need to clean up after myself
# run author-tests on the original
authtest ::
$(TEST_D) xt && $(MAKE) test TEST_FILES='xt/*.t'
# run author-tests on the distribution
distauthtest :: disttest
cd $(DISTVNAME) && $(TEST_D) xt && $(MAKE) test TEST_FILES='xt/*.t'
$(NOECHO) $(ECHO) ----- START SIGNATURE
cat $(DISTVNAME)/SIGNATURE
$(NOECHO) $(ECHO) ----- END SIGNATURE
POSTAMBLE
$POSTAMBLE .= sprintf qq{\t\$(RM_RF) "%s"\n}, $helper{zip} if exists $helper{zip};
$POSTAMBLE .= sprintf qq{\t\$(RM_RF) "%s"\n}, $helper{npp_folder} if exists $helper{npp_folder};
$POSTAMBLE .= "\n";
return $POSTAMBLE;
}
WriteMakefile( %mm_args )