| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Alien::Build::Plugin::Build::Make; |
|
2
|
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
159042
|
use strict; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
57
|
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
44
|
|
|
5
|
2
|
|
|
2
|
|
31
|
use 5.008001; |
|
|
2
|
|
|
|
|
5
|
|
|
6
|
2
|
|
|
2
|
|
8
|
use Carp (); |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
32
|
|
|
7
|
2
|
|
|
2
|
|
273
|
use Capture::Tiny qw( capture ); |
|
|
2
|
|
|
|
|
17327
|
|
|
|
2
|
|
|
|
|
109
|
|
|
8
|
2
|
|
|
2
|
|
483
|
use Alien::Build::Plugin; |
|
|
2
|
|
|
|
|
3681
|
|
|
|
2
|
|
|
|
|
11
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# ABSTRACT: Make plugin for Alien::Build |
|
11
|
|
|
|
|
|
|
our $VERSION = '0.02'; # VERSION |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has '+make_type' => undef; |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub init |
|
17
|
|
|
|
|
|
|
{ |
|
18
|
5
|
|
|
5
|
1
|
55292
|
my($self, $meta) = @_; |
|
19
|
|
|
|
|
|
|
|
|
20
|
5
|
|
|
|
|
19
|
$meta->add_requires('configure', 'Alien::Build::Plugin::Build::Make', '0.01'); |
|
21
|
|
|
|
|
|
|
|
|
22
|
5
|
|
|
|
|
91
|
my $type = $self->make_type; |
|
23
|
|
|
|
|
|
|
|
|
24
|
5
|
50
|
|
|
|
46
|
return unless defined $type; |
|
25
|
|
|
|
|
|
|
|
|
26
|
5
|
50
|
33
|
|
|
22
|
$type = 'gmake' if $^O eq 'MSWin32' && $type eq 'umake'; |
|
27
|
|
|
|
|
|
|
|
|
28
|
5
|
100
|
|
|
|
26
|
if($type eq 'nmake') |
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
{ |
|
30
|
1
|
|
|
1
|
|
19
|
$meta->interpolator->replace_helper( make => sub { 'nmake' } ); |
|
|
1
|
|
|
|
|
6700
|
|
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
elsif($type eq 'dmake') |
|
34
|
|
|
|
|
|
|
{ |
|
35
|
1
|
|
|
1
|
|
4
|
$meta->interpolator->replace_helper( make => sub { 'dmake' } ); |
|
|
1
|
|
|
|
|
1520
|
|
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
elsif($type eq 'gmake') |
|
39
|
|
|
|
|
|
|
{ |
|
40
|
2
|
|
|
|
|
4
|
my $found = 0; |
|
41
|
2
|
|
|
|
|
6
|
foreach my $make (qw( gmake make mingw32-make )) |
|
42
|
|
|
|
|
|
|
{ |
|
43
|
6
|
|
|
6
|
|
224
|
my($out, $err) = capture { system $make, '--version' }; |
|
|
6
|
|
|
|
|
22996
|
|
|
44
|
6
|
100
|
|
|
|
4963
|
if($out =~ /GNU Make/) |
|
45
|
|
|
|
|
|
|
{ |
|
46
|
2
|
|
|
3
|
|
27
|
$meta->interpolator->replace_helper( make => sub { $make } ); |
|
|
3
|
|
|
|
|
43174
|
|
|
47
|
2
|
|
|
|
|
934
|
$found = 1; |
|
48
|
|
|
|
|
|
|
} |
|
49
|
|
|
|
|
|
|
} |
|
50
|
2
|
50
|
|
|
|
39
|
unless($found) |
|
51
|
|
|
|
|
|
|
{ |
|
52
|
0
|
|
|
|
|
|
$meta->add_requires('share' => 'Alien::gmake' => '0.20'); |
|
53
|
0
|
|
|
0
|
|
|
$meta->interpolator->replace_helper('make' => sub { require Alien::gmake; Alien::gmake->exe }); |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
} |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
elsif($type eq 'umake') |
|
58
|
|
|
|
|
|
|
{ |
|
59
|
|
|
|
|
|
|
# nothing |
|
60
|
|
|
|
|
|
|
} |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
else |
|
63
|
|
|
|
|
|
|
{ |
|
64
|
0
|
|
|
|
|
|
Carp::croak("unknown make type = ", $self->make_type); |
|
65
|
|
|
|
|
|
|
} |
|
66
|
|
|
|
|
|
|
} |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
__END__ |