| 1 | package Alien::Autotools; | ||||||||||
| 2 | |||||||||||
| 3 | 4 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 4 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 4 | ▶ | use base qw( Exporter ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 4 | ▶ | use File::Which (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 4 | ▶ | use Path::Tiny (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 4 | ▶ | use Alien::autoconf 0.18; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 4 | ▶ | use Alien::automake 0.18; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 4 | ▶ | use Alien::libtool 0.15; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 4 | ▶ | use Alien::m4 0.18; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | 4 | our @EXPORT_OK = qw(autoconf_dir automake_dir libtool_dir); | |||||||||
| 14 | |||||||||||
| 15 | # ABSTRACT: Build and install the GNU build system. | ||||||||||
| 16 | 4 | our $VERSION = '1.08'; # VERSION | |||||||||
| 17 | |||||||||||
| 18 | |||||||||||
| 19 | sub bin_dir | ||||||||||
| 20 | 3 | ▶ | { | ||||||||
|
Subroutine
bin_dir: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 21 | 12 | my @dir = map { $_->bin_dir } | |||||||||
| 22 | 3 | map { "Alien::$_" } | |||||||||
| 23 | qw( autoconf automake libtool m4 ); | ||||||||||
| 24 | 3 | @dir; | |||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | sub _dir_from_exe | ||||||||||
| 28 | 0 | ▶ | { | ||||||||
|
Subroutine
_dir_from_exe: not called CC=2 SCAR=17.9
| |||||||||||
| 29 | 0 | my($name) = @_; | |||||||||
| 30 | 0 | my $path = File::Which::which($name); | |||||||||
| 31 | 0 | ▶ | die "unable to find $name in PATH" unless $path; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 32 | 0 | Path::Tiny->new($path)->parent->stringify; | |||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | 4 | my %helper; | |||||||||
| 36 | |||||||||||
| 37 | sub alien_helper | ||||||||||
| 38 | 2 | ▶ | { | ||||||||
|
Subroutine
alien_helper: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||
| 39 | 2 | ▶ | return \%helper if keys %helper; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 40 | |||||||||||
| 41 | 2 | foreach my $alien ( map { "Alien::$_" } qw( autoconf automake libtool m4 )) | |||||||||
| 42 | { | ||||||||||
| 43 | 8 | my %sub = %{ $alien->alien_helper }; | |||||||||
| 44 | 8 | %helper = (%helper, %sub); | |||||||||
| 45 | } | ||||||||||
| 46 | |||||||||||
| 47 | 2 | return \%helper; | |||||||||
| 48 | } | ||||||||||
| 49 | |||||||||||
| 50 | |||||||||||
| 51 | sub aclocal_dir | ||||||||||
| 52 | 2 | ▶ | { | ||||||||
|
Subroutine
aclocal_dir: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 53 | 2 | my @dir; | |||||||||
| 54 | 2 | foreach my $alien (map { "Alien::$_" } qw( autoconf automake libtool m4 )) | |||||||||
| 55 | { | ||||||||||
| 56 | 8 | my $dir = Path::Tiny->new($alien->dist_dir)->child(qw( share aclocal )); | |||||||||
| 57 | 8 | ▶ | push @dir, $dir if -d $dir; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 58 | } | ||||||||||
| 59 | 2 | @dir; | |||||||||
| 60 | } | ||||||||||
| 61 | |||||||||||
| 62 | |||||||||||
| 63 | sub versions | ||||||||||
| 64 | 1 | ▶ | { | ||||||||
|
Subroutine
versions: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 65 | 1 | my %ver; | |||||||||
| 66 | 1 | foreach my $alien (qw( autoconf automake libtool m4 )) | |||||||||
| 67 | { | ||||||||||
| 68 | 4 | my $class = "Alien::$alien"; | |||||||||
| 69 | 4 | $ver{$alien} = $class->version; | |||||||||
| 70 | } | ||||||||||
| 71 | 1 | %ver; | |||||||||
| 72 | } | ||||||||||
| 73 | |||||||||||
| 74 | |||||||||||
| 75 | sub autoconf_dir () | ||||||||||
| 76 | 2 | ▶ | { | ||||||||
|
Subroutine
autoconf_dir: called CC=2 SCAR=7.2
Pod
documented
| |||||||||||
| 77 | 2 | my($dir) = Alien::autoconf->bin_dir; | |||||||||
| 78 | 2 | ▶ | $dir | ||||||||
|
Branch: 1 branch
| |||||||||||
| 79 | ? $dir | ||||||||||
| 80 | : _dir_from_exe('autoconf'); | ||||||||||
| 81 | } | ||||||||||
| 82 | |||||||||||
| 83 | |||||||||||
| 84 | sub automake_dir () | ||||||||||
| 85 | 2 | ▶ | { | ||||||||
|
Subroutine
automake_dir: called CC=2 SCAR=7.2
Pod
documented
| |||||||||||
| 86 | 2 | my($dir) = Alien::automake->bin_dir; | |||||||||
| 87 | 2 | ▶ | $dir | ||||||||
|
Branch: 1 branch
| |||||||||||
| 88 | ? $dir | ||||||||||
| 89 | : _dir_from_exe('automake'); | ||||||||||
| 90 | } | ||||||||||
| 91 | |||||||||||
| 92 | |||||||||||
| 93 | sub libtool_dir () | ||||||||||
| 94 | 2 | ▶ | { | ||||||||
|
Subroutine
libtool_dir: called CC=2 SCAR=7.2
Pod
documented
| |||||||||||
| 95 | 2 | my($dir) = Alien::libtool->bin_dir; | |||||||||
| 96 | 2 | ▶ | $dir | ||||||||
|
Branch: 1 branch
| |||||||||||
| 97 | ? $dir | ||||||||||
| 98 | : _dir_from_exe('libtool'); | ||||||||||
| 99 | } | ||||||||||
| 100 | |||||||||||
| 101 | 0 | ▶ | sub cflags {} | ||||||||
|
Subroutine
cflags: not called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 102 | 0 | ▶ | sub libs {} | ||||||||
|
Subroutine
libs: not called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 103 | 0 | ▶ | sub dynamic_libs {} | ||||||||
|
Subroutine
dynamic_libs: not called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 104 | |||||||||||
| 105 | 4 | 1; | |||||||||
| 106 | |||||||||||
| 107 | __END__ | ||||||||||