| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package ExtUtils::Builder::MakeMaker; |
|
2
|
|
|
|
|
|
|
$ExtUtils::Builder::MakeMaker::VERSION = '0.020'; |
|
3
|
1
|
|
|
1
|
|
244296
|
use strict; |
|
|
1
|
|
|
|
|
21
|
|
|
|
1
|
|
|
|
|
50
|
|
|
4
|
1
|
|
|
1
|
|
8
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
110
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our @ISA; |
|
7
|
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
1176
|
use ExtUtils::MakeMaker 6.68; |
|
|
1
|
|
|
|
|
148449
|
|
|
|
1
|
|
|
|
|
178
|
|
|
9
|
1
|
|
|
1
|
|
795
|
use ExtUtils::Builder::Planner; |
|
|
1
|
|
|
|
|
6
|
|
|
|
1
|
|
|
|
|
52
|
|
|
10
|
1
|
|
|
1
|
|
8
|
use ExtUtils::Builder::Util 'unix_to_native_path'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
71
|
|
|
11
|
1
|
|
|
1
|
|
1806
|
use ExtUtils::Config::MakeMaker; |
|
|
1
|
|
|
|
|
778
|
|
|
|
1
|
|
|
|
|
73
|
|
|
12
|
1
|
|
|
1
|
|
711
|
use ExtUtils::Manifest (); |
|
|
1
|
|
|
|
|
15430
|
|
|
|
1
|
|
|
|
|
44
|
|
|
13
|
1
|
|
|
1
|
|
9
|
use version (); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
1200
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub import { |
|
16
|
0
|
|
|
0
|
|
|
my ($class, @args) = @_; |
|
17
|
0
|
0
|
|
|
|
|
if (!MM->isa(__PACKAGE__)) { |
|
18
|
0
|
|
|
|
|
|
@ISA = @MM::ISA; |
|
19
|
0
|
|
|
|
|
|
@MM::ISA = __PACKAGE__; |
|
20
|
0
|
|
|
|
|
|
splice @ExtUtils::MakeMaker::Overridable, -1, 0, 'make_plans'; |
|
21
|
|
|
|
|
|
|
} |
|
22
|
0
|
|
|
|
|
|
return; |
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my $escape_command = sub { |
|
26
|
|
|
|
|
|
|
my ($maker, $elements) = @_; |
|
27
|
|
|
|
|
|
|
return join ' ', map { (my $temp = m{[^\w/\$().-]} ? $maker->quote_literal($_) : $_) =~ s/\n/\\\n\t/g; $temp } @{$elements}; |
|
28
|
|
|
|
|
|
|
}; |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
my %double_colon = map { $_ => 1 } qw/all pure_all subdirs config dynamic static clean distdir test install/; |
|
31
|
|
|
|
|
|
|
my $make_entry = sub { |
|
32
|
|
|
|
|
|
|
my ($maker, $target, $dependencies, $actions) = @_; |
|
33
|
|
|
|
|
|
|
my @commands = map { $maker->$escape_command($_) } map { $_->to_command(perl => '$(ABSPERLRUN)') } @{$actions}; |
|
34
|
|
|
|
|
|
|
my @dependencies = map { $maker->quote_dep($_) } @{$dependencies}; |
|
35
|
|
|
|
|
|
|
my $colon = $double_colon{$target} ? '::' : ':'; |
|
36
|
|
|
|
|
|
|
return join "\n\t", join(' ', $target, $colon, @dependencies), @commands; |
|
37
|
|
|
|
|
|
|
}; |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub postamble { |
|
40
|
0
|
|
|
0
|
0
|
|
my ($maker, %args) = @_; |
|
41
|
0
|
|
|
|
|
|
my @ret = split "\n\n", $maker->SUPER::postamble(%args); |
|
42
|
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
my $planner = ExtUtils::Builder::Planner->new; |
|
44
|
0
|
|
|
0
|
|
|
$planner->add_delegate('makemaker', sub { $maker }); |
|
|
0
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
$planner->load_extension('ExtUtils::Builder::CPAN::Tool'); |
|
46
|
0
|
|
|
|
|
|
my $config = ExtUtils::Config::MakeMaker->new($maker); |
|
47
|
0
|
|
|
0
|
|
|
$planner->add_delegate('config', sub { $config }); |
|
|
0
|
|
|
|
|
|
|
|
48
|
0
|
|
|
0
|
|
|
$planner->add_delegate('distribution', sub { $maker->{DIST_NAME} }); |
|
|
0
|
|
|
|
|
|
|
|
49
|
0
|
|
|
0
|
|
|
$planner->add_delegate('version', sub { version->new($maker->{VERSION}) }); |
|
|
0
|
|
|
|
|
|
|
|
50
|
0
|
|
|
0
|
|
|
$planner->add_delegate('main_module', sub { $maker->{NAME} }); |
|
|
0
|
|
|
|
|
|
|
|
51
|
0
|
|
|
0
|
|
|
$planner->add_delegate('pureperl_only', sub { $maker->{PUREPERL_ONLY} }); |
|
|
0
|
|
|
|
|
|
|
|
52
|
0
|
|
|
0
|
|
|
$planner->add_delegate('perl_path', sub { $maker->{ABSPERLRUN} }); |
|
|
0
|
|
|
|
|
|
|
|
53
|
0
|
|
|
0
|
|
|
$planner->add_delegate('uninst', sub { $maker->{UNINST} }); |
|
|
0
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
$planner->add_seen(unix_to_native_path($_)) for sort keys %{ ExtUtils::Manifest::maniread() }; |
|
|
0
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
|
57
|
0
|
0
|
|
|
|
|
$maker->make_plans($planner, %args) if $maker->can('make_plans'); |
|
58
|
0
|
|
|
|
|
|
for my $file (glob 'planner/*.pl') { |
|
59
|
0
|
|
|
|
|
|
$planner->new_scope->run_dsl($file); |
|
60
|
|
|
|
|
|
|
} |
|
61
|
|
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
|
my $plan = $planner->materialize; |
|
63
|
0
|
|
|
|
|
|
push @ret, map { $maker->$make_entry($_->target, [ $_->dependencies ], [ $_ ]) } $plan->nodes; |
|
|
0
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
|
65
|
0
|
0
|
0
|
|
|
|
if ($maker->is_make_type('gmake') || $maker->is_make_type('bsdmake')) { |
|
66
|
0
|
|
|
|
|
|
my @phonies = grep { !$double_colon{$_} } $plan->phonies; |
|
|
0
|
|
|
|
|
|
|
|
67
|
0
|
0
|
|
|
|
|
push @ret, $maker->$make_entry('.PHONY', \@phonies) if @phonies |
|
68
|
|
|
|
|
|
|
} |
|
69
|
|
|
|
|
|
|
|
|
70
|
0
|
|
|
|
|
|
return join "\n\n", @ret; |
|
71
|
|
|
|
|
|
|
} |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
1; |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
#ABSTRACT: A MakeMaker consumer for ExtUtils::Builder Plan objects |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
__END__ |