root/trunk/Makefile.PL

Revision 86, 0.8 kB (checked in by clinton, 4 years ago)

Require explicit passing of apxs option to perl Makefile.PL tid10737 tid10892,

Line 
1 use ExtUtils::MakeMaker;
2 use strict;
3 use warnings;
4
5 use lib qw(../blib/lib lib );
6 use Apache::TestMM qw(test clean); #enable 'make test'
7
8 # prerequisites
9 my %require =
10   (
11    # 'Apache' => 1.27,
12    "Apache::Test" => "",
13    'Apache2::Const' => 2,
14   );
15 my @scripts = qw(t/TEST);
16
17 # Require apxs option
18 unless (grep {$_ eq '-apxs' } @ARGV) {
19     die "You must provide the '-apxs PATH_TO_APXS' option to 'perl Makefile.PL'";
20 }
21
22 # accept the configs from command line
23 Apache::TestMM::filter_args();
24 Apache::TestMM::generate_script('t/TEST');
25
26 WriteMakefile(
27               NAME            => 'Mungo',
28               VERSION_FROM    => 'lib/Mungo.pm',
29               PREREQ_PM       => \%require,
30               clean        => {
31                                FILES => "@{ clean_files() }",
32                               },
33 );
34
35
36 sub clean_files {
37     return [@scripts];
38 }
Note: See TracBrowser for help on using the browser.