move DProf to Devel/DProf
[p5sagit/p5-mst-13.2.git] / ext / Devel / DProf / Makefile.PL
1 use ExtUtils::MakeMaker;
2 require 5.003;
3 die qq{
4
5 Your perl is too old for this version of DProf. The last version of
6 DProf that works for perls older than 5.004 is DProf-19960930 and
7 should be available from Dean Roehrich\'s directory on CPAN:
8
9     CPAN/authors/id/DMR/
10
11 Please either upgrade your perl or get that older DProf from CPAN.
12
13 } if $] < 5.004;
14
15 if ($] < 5.005) {
16   $defines = '';
17 } else {
18   $defines = '-DPERLDBf_NONAME=0x40 -DPERLDBf_GOTO=0x80 -DG_NODEBUG=32 -DPL_NEEDED';
19 }
20
21 $Verbose = 1;
22 WriteMakefile(
23         'NAME'          => 'Devel::DProf',
24         'DISTNAME'      => 'DProf',
25         'VERSION_FROM'  => 'DProf.pm',
26         'clean'         => {'FILES' => 'tmon.out t/tmon.out t/err dprofpp T/tmon.out'},
27         'EXE_FILES'     => ['dprofpp'],
28         'PL_FILES'      => {'dprofpp.PL' => 'dprofpp'},
29         'XSPROTOARG'    => '-noprototypes',
30         'DEFINE'        => $defines,
31         'dist' => { COMPRESS => 'gzip', SUFFIX => 'gz' },
32 );
33
34 sub MY::test_via_harness { "" }
35 #sub MY::test_via_harness {
36 #       my( $self, $perl, $tests ) = @_;
37 #       my $t = quotemeta( $tests );
38 #       my $res;
39 #
40 #       $res = $self->MM::test_via_harness( $perl, $tests );
41 #       $res =~ s/^(\s+)/$1-/;
42 #       $res =~ s/(&runtests)/\$\$switches $1/;
43 #       $res =~ s/(; runtests)/; \$\$switches=q{-d:DProf}$1/;
44 #       $res =~ s,$t,t/bug.t,;
45 #       $res;
46 #}
47
48 sub MY::test_via_script {
49         my( $self, $perl, $script ) = @_;
50         my $res;
51
52         $res = $self->MM::test_via_script( $perl, $script );
53         $res =~ s/(test.pl)/$1 -p $perl/;
54         $res;
55 }