Commit | Line | Data |
90bc5263 |
1 | #!/usr/bin/perl -w |
2 | |
3 | # This Makefile.PL is provided for installation compatibility. |
4 | # Extra developer actions are in the Build.PL. |
5 | |
6 | use ExtUtils::MakeMaker qw/WriteMakefile prompt/; |
7 | |
8 | use strict; |
9 | |
10 | my $core = grep { $_ eq 'PERL_CORE=1' } @ARGV; |
11 | |
12 | my %mm_args = ( |
13 | 'NAME' => 'Test::Harness', |
14 | 'VERSION_FROM' => 'lib/Test/Harness.pm', |
15 | 'PREREQ_PM' => { |
16 | 'File::Spec' => 0.8, |
17 | }, |
18 | 'INSTALLDIRS' => 'perl', |
19 | 'PL_FILES' => {}, |
20 | 'test' => { 'TESTS' => 't/*.t t/compat/*.t' }, |
27fc0087 |
21 | |
90bc5263 |
22 | # In the core pods will be built by installman, and prove found by |
23 | # utils/prove.PL |
27fc0087 |
24 | $core |
25 | ? ( 'MAN3PODS' => {} ) |
26 | : ( 'EXE_FILES' => ['bin/prove'], |
90bc5263 |
27 | ), |
28 | ); |
29 | |
30 | { |
31 | local $^W = 0; # Silence warning about non-numeric version |
32 | if ( $ExtUtils::MakeMaker::VERSION >= '6.31' ) { |
33 | $mm_args{LICENSE} = 'perl'; |
34 | } |
35 | } |
36 | |
37 | WriteMakefile(%mm_args); |
38 | |
39 | package MY; |
40 | |
41 | # Lifted from MM_Any.pm and modified so that make test tests against our |
42 | # own code rather than the incumbent. If we don't do this we end up |
43 | # loading a confused mixture of installed and new modules. |
44 | sub test_via_harness { |
45 | my ( $self, $perl, $tests ) = @_; |
46 | |
47 | return $self->SUPER::test_via_harness( |
48 | qq{$perl "-I\$(INST_LIB)" "-I\$(INST_ARCHLIB)"}, $tests ); |
49 | } |