← Index
NYTProf Performance Profile   « line view »
For Makefile.PL
  Run on Sun Mar 1 16:04:44 2015
Reported on Sun Mar 1 16:09:02 2015

FilenameC:/tmp64ng/perl/lib/ExtUtils/MM_Unix.pm
StatementsExecuted 5559 statements in 156ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11193.6ms93.6msExtUtils::MM_Unix::::CORE:backtick ExtUtils::MM_Unix::CORE:backtick (opcode)
438115.6ms15.6msExtUtils::MM_Unix::::CORE:ftfile ExtUtils::MM_Unix::CORE:ftfile (opcode)
31115.6ms15.6msExtUtils::MM_Unix::::parse_version ExtUtils::MM_Unix::parse_version
1110s0sExtUtils::MM_Unix::::BEGIN@10 ExtUtils::MM_Unix::BEGIN@10
1110s0sExtUtils::MM_Unix::::BEGIN@1250 ExtUtils::MM_Unix::BEGIN@1250
1110s0sExtUtils::MM_Unix::::BEGIN@14 ExtUtils::MM_Unix::BEGIN@14
1110s0sExtUtils::MM_Unix::::BEGIN@17 ExtUtils::MM_Unix::BEGIN@17
1110s0sExtUtils::MM_Unix::::BEGIN@2472 ExtUtils::MM_Unix::BEGIN@2472
1110s0sExtUtils::MM_Unix::::BEGIN@25 ExtUtils::MM_Unix::BEGIN@25
1110s0sExtUtils::MM_Unix::::BEGIN@43 ExtUtils::MM_Unix::BEGIN@43
1110s0sExtUtils::MM_Unix::::BEGIN@5 ExtUtils::MM_Unix::BEGIN@5
1110s0sExtUtils::MM_Unix::::BEGIN@7 ExtUtils::MM_Unix::BEGIN@7
1110s0sExtUtils::MM_Unix::::BEGIN@8 ExtUtils::MM_Unix::BEGIN@8
1110s0sExtUtils::MM_Unix::::BEGIN@9 ExtUtils::MM_Unix::BEGIN@9
4210s0sExtUtils::MM_Unix::::CORE:close ExtUtils::MM_Unix::CORE:close (opcode)
27310s0sExtUtils::MM_Unix::::CORE:ftdir ExtUtils::MM_Unix::CORE:ftdir (opcode)
3110s0sExtUtils::MM_Unix::::CORE:fteexec ExtUtils::MM_Unix::CORE:fteexec (opcode)
12110s0sExtUtils::MM_Unix::::CORE:fteread ExtUtils::MM_Unix::CORE:fteread (opcode)
3110s0sExtUtils::MM_Unix::::CORE:ftis ExtUtils::MM_Unix::CORE:ftis (opcode)
2110s0sExtUtils::MM_Unix::::CORE:ftlink ExtUtils::MM_Unix::CORE:ftlink (opcode)
12581910s0sExtUtils::MM_Unix::::CORE:match ExtUtils::MM_Unix::CORE:match (opcode)
5310s0sExtUtils::MM_Unix::::CORE:open ExtUtils::MM_Unix::CORE:open (opcode)
3110s0sExtUtils::MM_Unix::::CORE:qr ExtUtils::MM_Unix::CORE:qr (opcode)
178110s0sExtUtils::MM_Unix::::CORE:readline ExtUtils::MM_Unix::CORE:readline (opcode)
35510s0sExtUtils::MM_Unix::::CORE:regcomp ExtUtils::MM_Unix::CORE:regcomp (opcode)
391010s0sExtUtils::MM_Unix::::CORE:sort ExtUtils::MM_Unix::CORE:sort (opcode)
5472410s0sExtUtils::MM_Unix::::CORE:subst ExtUtils::MM_Unix::CORE:subst (opcode)
6110s0sExtUtils::MM_Unix::::CORE:substcont ExtUtils::MM_Unix::CORE:substcont (opcode)
0000s0sExtUtils::MM_Unix::::__ANON__[:1565] ExtUtils::MM_Unix::__ANON__[:1565]
0000s0sExtUtils::MM_Unix::::__ANON__[:2474] ExtUtils::MM_Unix::__ANON__[:2474]
0000s0sExtUtils::MM_Unix::::_fixin_replace_shebang ExtUtils::MM_Unix::_fixin_replace_shebang
0000s0sExtUtils::MM_Unix::::_has_pod ExtUtils::MM_Unix::_has_pod
0000s0sExtUtils::MM_Unix::::_ppd_version ExtUtils::MM_Unix::_ppd_version
0000s0sExtUtils::MM_Unix::::_rename ExtUtils::MM_Unix::_rename
0000s0sExtUtils::MM_Unix::::all_target ExtUtils::MM_Unix::all_target
3110s0sExtUtils::MM_Unix::::c_o ExtUtils::MM_Unix::c_o
23110s0sExtUtils::MM_Unix::::cd ExtUtils::MM_Unix::cd
3110s0sExtUtils::MM_Unix::::cflags ExtUtils::MM_Unix::cflags
6220s0sExtUtils::MM_Unix::::const_cccmd ExtUtils::MM_Unix::const_cccmd
3110s0sExtUtils::MM_Unix::::const_config ExtUtils::MM_Unix::const_config
3110s0sExtUtils::MM_Unix::::const_loadlibs ExtUtils::MM_Unix::const_loadlibs
3110s0sExtUtils::MM_Unix::::constants ExtUtils::MM_Unix::constants
3110s0sExtUtils::MM_Unix::::depend ExtUtils::MM_Unix::depend
1110s0sExtUtils::MM_Unix::::dist ExtUtils::MM_Unix::dist
1110s0sExtUtils::MM_Unix::::dist_basics ExtUtils::MM_Unix::dist_basics
1110s0sExtUtils::MM_Unix::::dist_ci ExtUtils::MM_Unix::dist_ci
1110s187msExtUtils::MM_Unix::::dist_core ExtUtils::MM_Unix::dist_core
1110s187msExtUtils::MM_Unix::::dist_target ExtUtils::MM_Unix::dist_target
0000s0sExtUtils::MM_Unix::::dlsyms ExtUtils::MM_Unix::dlsyms
3110s0sExtUtils::MM_Unix::::dynamic_bs ExtUtils::MM_Unix::dynamic_bs
0000s0sExtUtils::MM_Unix::::dynamic_lib ExtUtils::MM_Unix::dynamic_lib
0000s0sExtUtils::MM_Unix::::escape_newlines ExtUtils::MM_Unix::escape_newlines
0000s0sExtUtils::MM_Unix::::exescan ExtUtils::MM_Unix::exescan
3110s46.8msExtUtils::MM_Unix::::extliblist ExtUtils::MM_Unix::extliblist
1110s93.6msExtUtils::MM_Unix::::find_perl ExtUtils::MM_Unix::find_perl
0000s0sExtUtils::MM_Unix::::fixin ExtUtils::MM_Unix::fixin
3110s0sExtUtils::MM_Unix::::force ExtUtils::MM_Unix::force
3110s0sExtUtils::MM_Unix::::get_version ExtUtils::MM_Unix::get_version
0000s0sExtUtils::MM_Unix::::guess_name ExtUtils::MM_Unix::guess_name
18630s0sExtUtils::MM_Unix::::has_link_code ExtUtils::MM_Unix::has_link_code
3110s0sExtUtils::MM_Unix::::init_DEST ExtUtils::MM_Unix::init_DEST
0000s0sExtUtils::MM_Unix::::init_DIRFILESEP ExtUtils::MM_Unix::init_DIRFILESEP
0000s0sExtUtils::MM_Unix::::init_MAN1PODS ExtUtils::MM_Unix::init_MAN1PODS
0000s0sExtUtils::MM_Unix::::init_MAN3PODS ExtUtils::MM_Unix::init_MAN3PODS
3110s0sExtUtils::MM_Unix::::init_MANPODS ExtUtils::MM_Unix::init_MANPODS
3110s93.6msExtUtils::MM_Unix::::init_PERL ExtUtils::MM_Unix::init_PERL
3110s0sExtUtils::MM_Unix::::init_PERM ExtUtils::MM_Unix::init_PERM
3110s0sExtUtils::MM_Unix::::init_PM ExtUtils::MM_Unix::init_PM
3110s0sExtUtils::MM_Unix::::init_dirscan ExtUtils::MM_Unix::init_dirscan
3110s0sExtUtils::MM_Unix::::init_dist ExtUtils::MM_Unix::init_dist
3110s0sExtUtils::MM_Unix::::init_lib2arch ExtUtils::MM_Unix::init_lib2arch
0000s0sExtUtils::MM_Unix::::init_linker ExtUtils::MM_Unix::init_linker
3110s0sExtUtils::MM_Unix::::init_main ExtUtils::MM_Unix::init_main
0000s0sExtUtils::MM_Unix::::init_platform ExtUtils::MM_Unix::init_platform
0000s0sExtUtils::MM_Unix::::init_tools ExtUtils::MM_Unix::init_tools
3110s15.6msExtUtils::MM_Unix::::init_xs ExtUtils::MM_Unix::init_xs
1110s0sExtUtils::MM_Unix::::install ExtUtils::MM_Unix::install
3110s0sExtUtils::MM_Unix::::installbin ExtUtils::MM_Unix::installbin
3110s0sExtUtils::MM_Unix::::linkext ExtUtils::MM_Unix::linkext
3110s0sExtUtils::MM_Unix::::lsdir ExtUtils::MM_Unix::lsdir
3110s0sExtUtils::MM_Unix::::macro ExtUtils::MM_Unix::macro
3110s0sExtUtils::MM_Unix::::makeaperl ExtUtils::MM_Unix::makeaperl
0000s0sExtUtils::MM_Unix::::makefile ExtUtils::MM_Unix::makefile
0000s0sExtUtils::MM_Unix::::max_exec_len ExtUtils::MM_Unix::max_exec_len
0000s0sExtUtils::MM_Unix::::maybe_command ExtUtils::MM_Unix::maybe_command
301020s0sExtUtils::MM_Unix::::needs_linking ExtUtils::MM_Unix::needs_linking
0000s0sExtUtils::MM_Unix::::oneliner ExtUtils::MM_Unix::oneliner
0000s0sExtUtils::MM_Unix::::os_flavor ExtUtils::MM_Unix::os_flavor
0000s0sExtUtils::MM_Unix::::parse_abstract ExtUtils::MM_Unix::parse_abstract
0000s0sExtUtils::MM_Unix::::pasthru ExtUtils::MM_Unix::pasthru
0000s0sExtUtils::MM_Unix::::perl_script ExtUtils::MM_Unix::perl_script
3110s562msExtUtils::MM_Unix::::perldepend ExtUtils::MM_Unix::perldepend
0000s0sExtUtils::MM_Unix::::platform_constants ExtUtils::MM_Unix::platform_constants
3110s609msExtUtils::MM_Unix::::pm_to_blib ExtUtils::MM_Unix::pm_to_blib
3110s0sExtUtils::MM_Unix::::post_constants ExtUtils::MM_Unix::post_constants
3110s0sExtUtils::MM_Unix::::post_initialize ExtUtils::MM_Unix::post_initialize
3110s0sExtUtils::MM_Unix::::postamble ExtUtils::MM_Unix::postamble
3110s4.45sExtUtils::MM_Unix::::ppd ExtUtils::MM_Unix::ppd
36110s0sExtUtils::MM_Unix::::prefixify ExtUtils::MM_Unix::prefixify
3110s0sExtUtils::MM_Unix::::processPL ExtUtils::MM_Unix::processPL
0000s0sExtUtils::MM_Unix::::quote_literal ExtUtils::MM_Unix::quote_literal
72310s0sExtUtils::MM_Unix::::quote_paren ExtUtils::MM_Unix::quote_paren
0000s0sExtUtils::MM_Unix::::replace_manpage_separator ExtUtils::MM_Unix::replace_manpage_separator
1110s0sExtUtils::MM_Unix::::shdist_target ExtUtils::MM_Unix::shdist_target
3110s0sExtUtils::MM_Unix::::static ExtUtils::MM_Unix::static
0000s0sExtUtils::MM_Unix::::static_lib ExtUtils::MM_Unix::static_lib
3110s0sExtUtils::MM_Unix::::staticmake ExtUtils::MM_Unix::staticmake
2110s374msExtUtils::MM_Unix::::subdir_x ExtUtils::MM_Unix::subdir_x
3110s374msExtUtils::MM_Unix::::subdirs ExtUtils::MM_Unix::subdirs
1110s0sExtUtils::MM_Unix::::tardist_target ExtUtils::MM_Unix::tardist_target
1110s0sExtUtils::MM_Unix::::tarfile_target ExtUtils::MM_Unix::tarfile_target
3110s920msExtUtils::MM_Unix::::test ExtUtils::MM_Unix::test
0000s0sExtUtils::MM_Unix::::test_via_harness ExtUtils::MM_Unix::test_via_harness
0000s0sExtUtils::MM_Unix::::test_via_script ExtUtils::MM_Unix::test_via_script
3110s0sExtUtils::MM_Unix::::tool_xsubpp ExtUtils::MM_Unix::tool_xsubpp
3110s0sExtUtils::MM_Unix::::top_targets ExtUtils::MM_Unix::top_targets
1110s0sExtUtils::MM_Unix::::uutardist_target ExtUtils::MM_Unix::uutardist_target
0000s0sExtUtils::MM_Unix::::writedoc ExtUtils::MM_Unix::writedoc
3110s0sExtUtils::MM_Unix::::xs_c ExtUtils::MM_Unix::xs_c
0000s0sExtUtils::MM_Unix::::xs_cpp ExtUtils::MM_Unix::xs_cpp
0000s0sExtUtils::MM_Unix::::xs_o ExtUtils::MM_Unix::xs_o
1110s0sExtUtils::MM_Unix::::zipdist_target ExtUtils::MM_Unix::zipdist_target
1110s0sExtUtils::MM_Unix::::zipfile_target ExtUtils::MM_Unix::zipfile_target
1110s0sExtUtils::MakeMaker::_version::::BEGIN@2801ExtUtils::MakeMaker::_version::BEGIN@2801
3110s0sExtUtils::MakeMaker::_version::::CORE:matchExtUtils::MakeMaker::_version::CORE:match (opcode)
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package ExtUtils::MM_Unix;
2
310srequire 5.006;
4
520s20s
# spent 0s within ExtUtils::MM_Unix::BEGIN@5 which was called: # once (0s+0s) by main::BEGIN@1 at line 5
use strict;
# spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@5 # spent 0s making 1 call to strict::import
6
720s20s
# spent 0s within ExtUtils::MM_Unix::BEGIN@7 which was called: # once (0s+0s) by main::BEGIN@1 at line 7
use Carp;
# spent 0s making 1 call to Exporter::import # spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@7
820s20s
# spent 0s within ExtUtils::MM_Unix::BEGIN@8 which was called: # once (0s+0s) by main::BEGIN@1 at line 8
use ExtUtils::MakeMaker::Config;
# spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@8 # spent 0s making 1 call to ExtUtils::MakeMaker::Config::import
920s20s
# spent 0s within ExtUtils::MM_Unix::BEGIN@9 which was called: # once (0s+0s) by main::BEGIN@1 at line 9
use File::Basename qw(basename dirname);
# spent 0s making 1 call to Exporter::import # spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@9
1020s10s
# spent 0s within ExtUtils::MM_Unix::BEGIN@10 which was called: # once (0s+0s) by main::BEGIN@1 at line 10
use DirHandle;
# spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@10
11
1210sour %Config_Override;
13
1420s20s
# spent 0s within ExtUtils::MM_Unix::BEGIN@14 which was called: # once (0s+0s) by main::BEGIN@1 at line 14
use ExtUtils::MakeMaker qw($Verbose neatvalue);
# spent 0s making 1 call to Exporter::import # spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@14
15
16# If we make $VERSION an our variable parse_version() breaks
1720s20s
# spent 0s within ExtUtils::MM_Unix::BEGIN@17 which was called: # once (0s+0s) by main::BEGIN@1 at line 17
use vars qw($VERSION);
# spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@17 # spent 0s making 1 call to vars::import
1810s$VERSION = '7.04';
1910s$VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval]
# spent 0s executing statements in string eval
20
2110srequire ExtUtils::MM_Any;
2210sour @ISA = qw(ExtUtils::MM_Any);
23
2410smy %Is;
25
# spent 0s within ExtUtils::MM_Unix::BEGIN@25 which was called: # once (0s+0s) by main::BEGIN@1 at line 41
BEGIN {
2610s $Is{OS2} = $^O eq 'os2';
2710s $Is{Win32} = $^O eq 'MSWin32' || $Config{osname} eq 'NetWare';
2810s $Is{Dos} = $^O eq 'dos';
2910s $Is{VMS} = $^O eq 'VMS';
3010s $Is{OSF} = $^O eq 'dec_osf';
3110s $Is{IRIX} = $^O eq 'irix';
3210s $Is{NetBSD} = $^O eq 'netbsd';
3310s $Is{Interix} = $^O eq 'interix';
3410s $Is{SunOS4} = $^O eq 'sunos';
3510s $Is{Solaris} = $^O eq 'solaris';
3610s $Is{SunOS} = $Is{SunOS4} || $Is{Solaris};
3710s10s $Is{BSD} = ($^O =~ /^(?:free|net|open)bsd$/ or
# spent 0s making 1 call to ExtUtils::MM_Unix::CORE:match
38 grep( $^O eq $_, qw(bsdos interix dragonfly) )
39 );
4010s10s $Is{Android} = $^O =~ /android/;
# spent 0s making 1 call to ExtUtils::MM_Unix::CORE:match
4110s10s}
# spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@25
42
43
# spent 0s within ExtUtils::MM_Unix::BEGIN@43 which was called: # once (0s+0s) by main::BEGIN@1 at line 49
BEGIN {
4410s if( $Is{VMS} ) {
45 # For things like vmsify()
46 require VMS::Filespec;
47 VMS::Filespec->import;
48 }
4910s10s}
# spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@43
50
51
52=head1 NAME
53
54ExtUtils::MM_Unix - methods used by ExtUtils::MakeMaker
55
56=head1 SYNOPSIS
57
58C<require ExtUtils::MM_Unix;>
59
60=head1 DESCRIPTION
61
62The methods provided by this package are designed to be used in
63conjunction with ExtUtils::MakeMaker. When MakeMaker writes a
64Makefile, it creates one or more objects that inherit their methods
65from a package C<MM>. MM itself doesn't provide any methods, but it
66ISA ExtUtils::MM_Unix class. The inheritance tree of MM lets operating
67specific packages take the responsibility for all the methods provided
68by MM_Unix. We are trying to reduce the number of the necessary
69overrides by defining rather primitive operations within
70ExtUtils::MM_Unix.
71
72If you are going to write a platform specific MM package, please try
73to limit the necessary overrides to primitive methods, and if it is not
74possible to do so, let's work out how to achieve that gain.
75
76If you are overriding any of these methods in your Makefile.PL (in the
77MY class), please report that to the makemaker mailing list. We are
78trying to minimize the necessary method overrides and switch to data
79driven Makefile.PLs wherever possible. In the long run less methods
80will be overridable via the MY class.
81
82=head1 METHODS
83
84The following description of methods is still under
85development. Please refer to the code for not suitably documented
86sections and complain loudly to the makemaker@perl.org mailing list.
87Better yet, provide a patch.
88
89Not all of the methods below are overridable in a
90Makefile.PL. Overridable methods are marked as (o). All methods are
91overridable by a platform specific MM_*.pm file.
92
93Cross-platform methods are being moved into MM_Any. If you can't find
94something that used to be in here, look in MM_Any.
95
96=cut
97
98# So we don't have to keep calling the methods over and over again,
99# we have these globals to cache the values. Faster and shrtr.
10010s10smy $Curdir = __PACKAGE__->curdir;
# spent 0s making 1 call to File::Spec::Unix::curdir
10110s10smy $Rootdir = __PACKAGE__->rootdir;
# spent 0s making 1 call to File::Spec::Win32::rootdir
10210s10smy $Updir = __PACKAGE__->updir;
# spent 0s making 1 call to File::Spec::Unix::updir
103
104
105=head2 Methods
106
107=over 4
108
109=item os_flavor
110
111Simply says that we're Unix.
112
113=cut
114
115sub os_flavor {
116 return('Unix');
117}
118
119
120=item c_o (o)
121
122Defines the suffix rules to compile different flavors of C files to
123object files.
124
125=cut
126
127
# spent 0s within ExtUtils::MM_Unix::c_o which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub c_o {
128# --- Translation Sections ---
129
13030s my($self) = shift;
13130s30s return '' unless $self->needs_linking();
# spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call
13230s my(@m);
133
13430s my $command = '$(CCCMD)';
13530s my $flags = '$(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE)';
136
13730s if (my $cpp = $Config{cpprun}) {
13830s30s my $cpp_cmd = $self->const_cccmd;
# spent 0s making 3 calls to ExtUtils::MM_Unix::const_cccmd, avg 0s/call
13930s30s $cpp_cmd =~ s/^CCCMD\s*=\s*\$\(CC\)/$cpp/;
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
14030s push @m, qq{
141.c.i:
142 $cpp_cmd $flags \$*.c > \$*.i
143};
144 }
145
14630s push @m, qq{
147.c.s:
148 $command -S $flags \$*.c
149
150.c\$(OBJ_EXT):
151 $command $flags \$*.c
152
153.cpp\$(OBJ_EXT):
154 $command $flags \$*.cpp
155
156.cxx\$(OBJ_EXT):
157 $command $flags \$*.cxx
158
159.cc\$(OBJ_EXT):
160 $command $flags \$*.cc
161};
162
16330s push @m, qq{
164.C\$(OBJ_EXT):
165 $command $flags \$*.C
166} if !$Is{OS2} and !$Is{Win32} and !$Is{Dos}; #Case-specific
167
16830s return join "", @m;
169}
170
171=item cflags (o)
172
173Does very much the same as the cflags script in the perl
174distribution. It doesn't return the whole compiler command line, but
175initializes all of its parts. The const_cccmd method then actually
176returns the definition of the CCCMD macro which uses these parts.
177
178=cut
179
180#'
181
182
# spent 0s within ExtUtils::MM_Unix::cflags which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Win32::cflags at line 636 of ExtUtils/MM_Win32.pm, avg 0s/call
sub cflags {
18330s my($self,$libperl)=@_;
18430s return $self->{CFLAGS} if $self->{CFLAGS};
18530s30s return '' unless $self->needs_linking();
# spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call
186
18730s my($prog, $uc, $perltype, %cflags);
18830s $libperl ||= $self->{LIBPERL_A} || "libperl$self->{LIB_EXT}" ;
18930s30s $libperl =~ s/\.\$\(A\)$/$self->{LIB_EXT}/;
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
190
19130s @cflags{qw(cc ccflags optimize shellflags)}
192 = @Config{qw(cc ccflags optimize shellflags)};
193
194 # Perl 5.21.4 adds the (gcc) warning (-Wall ...) and std (-std=c89)
195 # flags to the %Config, and the modules in the core should be built
196 # with the warning flags, but NOT the -std=c89 flags (the latter
197 # would break using any system header files that are strict C99).
19830s my @ccextraflags = qw(ccwarnflags);
19930s if ($ENV{PERL_CORE}) {
200 for my $x (@ccextraflags) {
201 if (exists $Config{$x}) {
202 $cflags{$x} = $Config{$x};
203 }
204 }
205 }
206
20730s my($optdebug) = "";
208
20930s $cflags{shellflags} ||= '';
210
21130s my(%map) = (
212 D => '-DDEBUGGING',
213 E => '-DEMBED',
214 DE => '-DDEBUGGING -DEMBED',
215 M => '-DEMBED -DMULTIPLICITY',
216 DM => '-DDEBUGGING -DEMBED -DMULTIPLICITY',
217 );
218
21930s60s if ($libperl =~ /libperl(\w*)\Q$self->{LIB_EXT}/){
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:regcomp, avg 0s/call
220 $uc = uc($1);
221 } else {
222 $uc = ""; # avoid warning
223 }
22430s $perltype = $map{$uc} ? $map{$uc} : "";
225
22630s30s if ($uc =~ /^D/) {
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call
227 $optdebug = "-g";
228 }
229
230
23130s my($name);
23230s30s ( $name = $self->{NAME} . "_cflags" ) =~ s/:/_/g ;
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
23330s if ($prog = $Config{$name}) {
234 # Expand hints for this extension via the shell
235 print "Processing $name hint:\n" if $Verbose;
236 my(@o)=`cc=\"$cflags{cc}\"
237 ccflags=\"$cflags{ccflags}\"
238 optimize=\"$cflags{optimize}\"
239 perltype=\"$cflags{perltype}\"
240 optdebug=\"$cflags{optdebug}\"
241 eval '$prog'
242 echo cc=\$cc
243 echo ccflags=\$ccflags
244 echo optimize=\$optimize
245 echo perltype=\$perltype
246 echo optdebug=\$optdebug
247 `;
248 foreach my $line (@o){
249 chomp $line;
250 if ($line =~ /(.*?)=\s*(.*)\s*$/){
251 $cflags{$1} = $2;
252 print " $1 = $2\n" if $Verbose;
253 } else {
254 print "Unrecognised result from hint: '$line'\n";
255 }
256 }
257 }
258
25930s if ($optdebug) {
260 $cflags{optimize} = $optdebug;
261 }
262
26330s for (qw(ccflags optimize perltype)) {
26490s $cflags{$_} ||= '';
26590s90s $cflags{$_} =~ s/^\s+//;
# spent 0s making 9 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
26690s90s $cflags{$_} =~ s/\s+/ /g;
# spent 0s making 9 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
26790s90s $cflags{$_} =~ s/\s+$//;
# spent 0s making 9 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
26890s $self->{uc $_} ||= $cflags{$_};
269 }
270
27130s if ($self->{POLLUTE}) {
272 $self->{CCFLAGS} .= ' -DPERL_POLLUTE ';
273 }
274
27530s for my $x (@ccextraflags) {
27630s next unless exists $cflags{$x};
277 $self->{CCFLAGS} .= $cflags{$x} =~ m!^\s! ? $cflags{$x} : ' ' . $cflags{$x};
278 }
279
28030s my $pollute = '';
28130s30s if ($Config{usemymalloc} and not $Config{bincompat5005}
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call
282 and not $Config{ccflags} =~ /-DPERL_POLLUTE_MALLOC\b/
283 and $self->{PERL_MALLOC_OK}) {
284 $pollute = '$(PERL_MALLOC_DEF)';
285 }
286
28730s30s $self->{CCFLAGS} = quote_paren($self->{CCFLAGS});
# spent 0s making 3 calls to ExtUtils::MM_Unix::quote_paren, avg 0s/call
28830s30s $self->{OPTIMIZE} = quote_paren($self->{OPTIMIZE});
# spent 0s making 3 calls to ExtUtils::MM_Unix::quote_paren, avg 0s/call
289
29030s return $self->{CFLAGS} = qq{
291CCFLAGS = $self->{CCFLAGS}
292OPTIMIZE = $self->{OPTIMIZE}
293PERLTYPE = $self->{PERLTYPE}
294MPOLLUTE = $pollute
295};
296
297}
298
299
300=item const_cccmd (o)
301
302Returns the full compiler call for C programs and stores the
303definition in CONST_CCCMD.
304
305=cut
306
307
# spent 0s within ExtUtils::MM_Unix::const_cccmd which was called 6 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::c_o at line 138, avg 0s/call
sub const_cccmd {
30860s my($self,$libperl)=@_;
30960s return $self->{CONST_CCCMD} if $self->{CONST_CCCMD};
31030s30s return '' unless $self->needs_linking();
# spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call
31130s return $self->{CONST_CCCMD} =
312 q{CCCMD = $(CC) -c $(PASTHRU_INC) $(INC) \\
313 $(CCFLAGS) $(OPTIMIZE) \\
314 $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \\
315 $(XS_DEFINE_VERSION)};
316}
317
318=item const_config (o)
319
320Defines a couple of constants in the Makefile that are imported from
321%Config.
322
323=cut
324
325
# spent 0s within ExtUtils::MM_Unix::const_config which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub const_config {
326# --- Constants Sections ---
327
32830s my($self) = shift;
32930s my @m = <<"END";
330
331# These definitions are from config.sh (via $INC{'Config.pm'}).
332# They may have been overridden via Makefile.PL or on the command line.
333END
334
33530s my(%once_only);
33630s foreach my $key (@{$self->{CONFIG}}){
337 # SITE*EXP macros are defined in &constants; avoid duplicates here
338660s next if $once_only{$key};
339660s660s $self->{uc $key} = quote_paren($self->{uc $key});
# spent 0s making 66 calls to ExtUtils::MM_Unix::quote_paren, avg 0s/call
340660s push @m, uc($key) , ' = ' , $self->{uc $key}, "\n";
341660s $once_only{$key} = 1;
342 }
34330s join('', @m);
344}
345
346=item const_loadlibs (o)
347
348Defines EXTRALIBS, LDLOADLIBS, BSLOADLIBS, LD_RUN_PATH. See
349L<ExtUtils::Liblist> for details.
350
351=cut
352
353
# spent 0s within ExtUtils::MM_Unix::const_loadlibs which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub const_loadlibs {
35430s my($self) = shift;
35530s30s return "" unless $self->needs_linking;
# spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call
35630s my @m;
35730s push @m, qq{
358# $self->{NAME} might depend on some other libraries:
359# See ExtUtils::Liblist for details
360#
361};
36230s for my $tmp (qw/
363 EXTRALIBS LDLOADLIBS BSLOADLIBS
364 /) {
36590s next unless defined $self->{$tmp};
36690s push @m, "$tmp = $self->{$tmp}\n";
367 }
368 # don't set LD_RUN_PATH if empty
36930s for my $tmp (qw/
370 LD_RUN_PATH
371 /) {
37230s next unless $self->{$tmp};
373 push @m, "$tmp = $self->{$tmp}\n";
374 }
37530s return join "", @m;
376}
377
378=item constants (o)
379
380 my $make_frag = $mm->constants;
381
382Prints out macros for lots of constants.
383
384=cut
385
386
# spent 0s within ExtUtils::MM_Unix::constants which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Win32::constants at line 245 of ExtUtils/MM_Win32.pm, avg 0s/call
sub constants {
38730s my($self) = @_;
38830s my @m = ();
389
39030s $self->{DFSEP} = '$(DIRFILESEP)'; # alias for internal use
391
39230s30s for my $macro (qw(
# spent 0s making 3 calls to ExtUtils::MM_Any::installvars, avg 0s/call
393
394 AR_STATIC_ARGS DIRFILESEP DFSEP
395 NAME NAME_SYM
396 VERSION VERSION_MACRO VERSION_SYM DEFINE_VERSION
397 XS_VERSION XS_VERSION_MACRO XS_DEFINE_VERSION
398 INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB
399 INST_MAN1DIR INST_MAN3DIR
400 MAN1EXT MAN3EXT
401 INSTALLDIRS INSTALL_BASE DESTDIR PREFIX
402 PERLPREFIX SITEPREFIX VENDORPREFIX
403 ),
404 (map { ("INSTALL".$_,
405 "DESTINSTALL".$_)
406 } $self->installvars),
407 qw(
408 PERL_LIB
409 PERL_ARCHLIB PERL_ARCHLIBDEP
410 LIBPERL_A MYEXTLIB
411 FIRST_MAKEFILE MAKEFILE_OLD MAKE_APERL_FILE
412 PERLMAINCC PERL_SRC PERL_INC PERL_INCDEP
413 PERL FULLPERL ABSPERL
414 PERLRUN FULLPERLRUN ABSPERLRUN
415 PERLRUNINST FULLPERLRUNINST ABSPERLRUNINST
416 PERL_CORE
417 PERM_DIR PERM_RW PERM_RWX
418
419 ) )
420 {
4212640s next unless defined $self->{$macro};
422
423 # pathnames can have sharp signs in them; escape them so
424 # make doesn't think it is a comment-start character.
4252550s2550s $self->{$macro} =~ s/#/\\#/g;
# spent 0s making 255 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
4262550s60s $self->{$macro} = $self->quote_dep($self->{$macro})
# spent 0s making 6 calls to ExtUtils::MM_Win32::quote_dep, avg 0s/call
427 if $ExtUtils::MakeMaker::macro_dep{$macro};
4282550s push @m, "$macro = $self->{$macro}\n";
429 }
430
43130s push @m, qq{
432MAKEMAKER = $self->{MAKEMAKER}
433MM_VERSION = $self->{MM_VERSION}
434MM_REVISION = $self->{MM_REVISION}
435};
436
43730s push @m, q{
438# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle).
439# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle)
440# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
441# DLBASE = Basename part of dynamic library. May be just equal BASEEXT.
442};
443
44430s for my $macro (qw/
445 MAKE
446 FULLEXT BASEEXT PARENT_NAME DLBASE VERSION_FROM INC DEFINE OBJECT
447 LDFROM LINKTYPE BOOTDEP
448 / )
449 {
450360s next unless defined $self->{$macro};
451310s push @m, "$macro = $self->{$macro}\n";
452 }
453
454 push @m, "
455# Handy lists of source code files:
456XS_FILES = ".$self->wraplist(sort keys %{$self->{XS}})."
457C_FILES = ".$self->wraplist(@{$self->{C}})."
458O_FILES = ".$self->wraplist(@{$self->{O_FILES}})."
459H_FILES = ".$self->wraplist(@{$self->{H}})."
460MAN1PODS = ".$self->wraplist(sort keys %{$self->{MAN1PODS}})."
46130s270sMAN3PODS = ".$self->wraplist(sort keys %{$self->{MAN3PODS}})."
# spent 0s making 18 calls to ExtUtils::MM_Any::wraplist, avg 0s/call # spent 0s making 9 calls to ExtUtils::MM_Unix::CORE:sort, avg 0s/call
462";
463
464
46530s60s push @m, q{
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:ftis, avg 0s/call # spent 0s making 3 calls to File::Spec::Win32::catfile, avg 0s/call
466# Where is the Config information that we are using/depend on
467CONFIGDEP = $(PERL_ARCHLIBDEP)$(DFSEP)Config.pm $(PERL_INCDEP)$(DFSEP)config.h
468} if -e File::Spec->catfile( $self->{PERL_INC}, 'config.h' );
469
470
47130s push @m, qq{
472# Where to build things
473INST_LIBDIR = $self->{INST_LIBDIR}
474INST_ARCHLIBDIR = $self->{INST_ARCHLIBDIR}
475
476INST_AUTODIR = $self->{INST_AUTODIR}
477INST_ARCHAUTODIR = $self->{INST_ARCHAUTODIR}
478
479INST_STATIC = $self->{INST_STATIC}
480INST_DYNAMIC = $self->{INST_DYNAMIC}
481INST_BOOT = $self->{INST_BOOT}
482};
483
48430s push @m, qq{
485# Extra linker info
486EXPORT_LIST = $self->{EXPORT_LIST}
487PERL_ARCHIVE = $self->{PERL_ARCHIVE}
488PERL_ARCHIVEDEP = $self->{PERL_ARCHIVEDEP}
489PERL_ARCHIVE_AFTER = $self->{PERL_ARCHIVE_AFTER}
490};
491
492 push @m, "
493
494TO_INST_PM = ".$self->wraplist(sort keys %{$self->{PM}})."
495
49630s120sPM_TO_BLIB = ".$self->wraplist(map { ($_ => $self->{PM}->{$_}) } sort keys %{$self->{PM}})."
# spent 0s making 6 calls to ExtUtils::MM_Any::wraplist, avg 0s/call # spent 0s making 6 calls to ExtUtils::MM_Unix::CORE:sort, avg 0s/call
497";
498
49930s join('',@m);
500}
501
502
503=item depend (o)
504
505Same as macro for the depend attribute.
506
507=cut
508
509
# spent 0s within ExtUtils::MM_Unix::depend which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub depend {
51030s my($self,%attribs) = @_;
51130s my(@m,$key,$val);
51230s while (($key,$val) = each %attribs){
513 last unless defined $key;
514 push @m, "$key : $val\n";
515 }
51630s join "", @m;
517}
518
519
520=item init_DEST
521
522 $mm->init_DEST
523
524Defines the DESTDIR and DEST* variables paralleling the INSTALL*.
525
526=cut
527
528
# spent 0s within ExtUtils::MM_Unix::init_DEST which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 655 of ExtUtils/MakeMaker.pm, avg 0s/call
sub init_DEST {
52930s my $self = shift;
530
531 # Initialize DESTDIR
53230s $self->{DESTDIR} ||= '';
533
534 # Make DEST variables.
53530s30s foreach my $var ($self->installvars) {
# spent 0s making 3 calls to ExtUtils::MM_Any::installvars, avg 0s/call
536540s my $destvar = 'DESTINSTALL'.$var;
537540s $self->{$destvar} ||= '$(DESTDIR)$(INSTALL'.$var.')';
538 }
539}
540
541
542=item init_dist
543
544 $mm->init_dist;
545
546Defines a lot of macros for distribution support.
547
548 macro description default
549
550 TAR tar command to use tar
551 TARFLAGS flags to pass to TAR cvf
552
553 ZIP zip command to use zip
554 ZIPFLAGS flags to pass to ZIP -r
555
556 COMPRESS compression command to gzip --best
557 use for tarfiles
558 SUFFIX suffix to put on .gz
559 compressed files
560
561 SHAR shar command to use shar
562
563 PREOP extra commands to run before
564 making the archive
565 POSTOP extra commands to run after
566 making the archive
567
568 TO_UNIX a command to convert linefeeds
569 to Unix style in your archive
570
571 CI command to checkin your ci -u
572 sources to version control
573 RCS_LABEL command to label your sources rcs -Nv$(VERSION_SYM): -q
574 just after CI is run
575
576 DIST_CP $how argument to manicopy() best
577 when the distdir is created
578
579 DIST_DEFAULT default target to use to tardist
580 create a distribution
581
582 DISTVNAME name of the resulting archive $(DISTNAME)-$(VERSION)
583 (minus suffixes)
584
585=cut
586
587
# spent 0s within ExtUtils::MM_Unix::init_dist which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 652 of ExtUtils/MakeMaker.pm, avg 0s/call
sub init_dist {
58830s my $self = shift;
589
59030s $self->{TAR} ||= 'tar';
59130s $self->{TARFLAGS} ||= 'cvf';
59230s $self->{ZIP} ||= 'zip';
59330s $self->{ZIPFLAGS} ||= '-r';
59430s $self->{COMPRESS} ||= 'gzip --best';
59530s $self->{SUFFIX} ||= '.gz';
59630s $self->{SHAR} ||= 'shar';
59730s $self->{PREOP} ||= '$(NOECHO) $(NOOP)'; # eg update MANIFEST
59830s $self->{POSTOP} ||= '$(NOECHO) $(NOOP)'; # eg remove the distdir
59930s $self->{TO_UNIX} ||= '$(NOECHO) $(NOOP)';
600
60130s $self->{CI} ||= 'ci -u';
60230s $self->{RCS_LABEL}||= 'rcs -Nv$(VERSION_SYM): -q';
60330s $self->{DIST_CP} ||= 'best';
60430s $self->{DIST_DEFAULT} ||= 'tardist';
605
60630s30s ($self->{DISTNAME} = $self->{NAME}) =~ s{::}{-}g unless $self->{DISTNAME};
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
60730s $self->{DISTVNAME} ||= $self->{DISTNAME}.'-'.$self->{VERSION};
608}
609
610=item dist (o)
611
612 my $dist_macros = $mm->dist(%overrides);
613
614Generates a make fragment defining all the macros initialized in
615init_dist.
616
617%overrides can be used to override any of the above.
618
619=cut
620
621
# spent 0s within ExtUtils::MM_Unix::dist which was called: # once (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm
sub dist {
62210s my($self, %attribs) = @_;
623
62410s my $make = '';
62510s if ( $attribs{SUFFIX} && $attribs{SUFFIX} !~ m!^\.! ) {
626 $attribs{SUFFIX} = '.' . $attribs{SUFFIX};
627 }
62810s foreach my $key (qw(
629 TAR TARFLAGS ZIP ZIPFLAGS COMPRESS SUFFIX SHAR
630 PREOP POSTOP TO_UNIX
631 CI RCS_LABEL DIST_CP DIST_DEFAULT
632 DISTNAME DISTVNAME
633 ))
634 {
635160s my $value = $attribs{$key} || $self->{$key};
636160s $make .= "$key = $value\n";
637 }
638
63910s return $make;
640}
641
642=item dist_basics (o)
643
644Defines the targets distclean, distcheck, skipcheck, manifest, veryclean.
645
646=cut
647
648
# spent 0s within ExtUtils::MM_Unix::dist_basics which was called: # once (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm
sub dist_basics {
64910s my($self) = shift;
650
65110s return <<'MAKE_FRAG';
652distclean :: realclean distcheck
653 $(NOECHO) $(NOOP)
654
655distcheck :
656 $(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck
657
658skipcheck :
659 $(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck
660
661manifest :
662 $(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest
663
664veryclean : realclean
665 $(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old
666
667MAKE_FRAG
668
669}
670
671=item dist_ci (o)
672
673Defines a check in target for RCS.
674
675=cut
676
677
# spent 0s within ExtUtils::MM_Unix::dist_ci which was called: # once (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm
sub dist_ci {
67810s my($self) = shift;
67910s return q{
680ci :
681 $(PERLRUN) "-MExtUtils::Manifest=maniread" \\
682 -e "@all = keys %{ maniread() };" \\
683 -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \\
684 -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});"
685};
686}
687
688=item dist_core (o)
689
690 my $dist_make_fragment = $MM->dist_core;
691
692Puts the targets necessary for 'make dist' together into one make
693fragment.
694
695=cut
696
697
# spent 187ms (0s+187) within ExtUtils::MM_Unix::dist_core which was called: # once (0s+187ms) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm
sub dist_core {
69810s my($self) = shift;
699
70010s my $make_frag = '';
70110s foreach my $target (qw(dist tardist uutardist tarfile zipdist zipfile
702 shdist))
703 {
70470s my $method = $target.'_target';
70570s $make_frag .= "\n";
70670s7187ms $make_frag .= $self->$method();
# spent 187ms making 1 call to ExtUtils::MM_Unix::dist_target # spent 0s making 1 call to ExtUtils::MM_Unix::shdist_target # spent 0s making 1 call to ExtUtils::MM_Unix::tardist_target # spent 0s making 1 call to ExtUtils::MM_Unix::tarfile_target # spent 0s making 1 call to ExtUtils::MM_Unix::uutardist_target # spent 0s making 1 call to ExtUtils::MM_Unix::zipdist_target # spent 0s making 1 call to ExtUtils::MM_Unix::zipfile_target
707 }
708
70910s return $make_frag;
710}
711
712
713=item B<dist_target>
714
715 my $make_frag = $MM->dist_target;
716
717Returns the 'dist' target to make an archive for distribution. This
718target simply checks to make sure the Makefile is up-to-date and
719depends on $(DIST_DEFAULT).
720
721=cut
722
723
# spent 187ms (0s+187) within ExtUtils::MM_Unix::dist_target which was called: # once (0s+187ms) by ExtUtils::MM_Unix::dist_core at line 706
sub dist_target {
72410s my($self) = shift;
725
72610s1187ms my $date_check = $self->oneliner(<<'CODE', ['-l']);
# spent 187ms making 1 call to ExtUtils::MM_Win32::oneliner
727print 'Warning: Makefile possibly out of date with $(VERSION_FROM)'
728 if -e '$(VERSION_FROM)' and -M '$(VERSION_FROM)' < -M '$(FIRST_MAKEFILE)';
729CODE
730
73110s return sprintf <<'MAKE_FRAG', $date_check;
732dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE)
733 $(NOECHO) %s
734MAKE_FRAG
735}
736
737=item B<tardist_target>
738
739 my $make_frag = $MM->tardist_target;
740
741Returns the 'tardist' target which is simply so 'make tardist' works.
742The real work is done by the dynamically named tardistfile_target()
743method, tardist should have that as a dependency.
744
745=cut
746
747
# spent 0s within ExtUtils::MM_Unix::tardist_target which was called: # once (0s+0s) by ExtUtils::MM_Unix::dist_core at line 706
sub tardist_target {
74810s my($self) = shift;
749
75010s return <<'MAKE_FRAG';
751tardist : $(DISTVNAME).tar$(SUFFIX)
752 $(NOECHO) $(NOOP)
753MAKE_FRAG
754}
755
756=item B<zipdist_target>
757
758 my $make_frag = $MM->zipdist_target;
759
760Returns the 'zipdist' target which is simply so 'make zipdist' works.
761The real work is done by the dynamically named zipdistfile_target()
762method, zipdist should have that as a dependency.
763
764=cut
765
766
# spent 0s within ExtUtils::MM_Unix::zipdist_target which was called: # once (0s+0s) by ExtUtils::MM_Unix::dist_core at line 706
sub zipdist_target {
76710s my($self) = shift;
768
76910s return <<'MAKE_FRAG';
770zipdist : $(DISTVNAME).zip
771 $(NOECHO) $(NOOP)
772MAKE_FRAG
773}
774
775=item B<tarfile_target>
776
777 my $make_frag = $MM->tarfile_target;
778
779The name of this target is the name of the tarball generated by
780tardist. This target does the actual work of turning the distdir into
781a tarball.
782
783=cut
784
785
# spent 0s within ExtUtils::MM_Unix::tarfile_target which was called: # once (0s+0s) by ExtUtils::MM_Unix::dist_core at line 706
sub tarfile_target {
78610s my($self) = shift;
787
78810s return <<'MAKE_FRAG';
789$(DISTVNAME).tar$(SUFFIX) : distdir
790 $(PREOP)
791 $(TO_UNIX)
792 $(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME)
793 $(RM_RF) $(DISTVNAME)
794 $(COMPRESS) $(DISTVNAME).tar
795 $(NOECHO) $(ECHO) 'Created $(DISTVNAME).tar$(SUFFIX)'
796 $(POSTOP)
797MAKE_FRAG
798}
799
800=item zipfile_target
801
802 my $make_frag = $MM->zipfile_target;
803
804The name of this target is the name of the zip file generated by
805zipdist. This target does the actual work of turning the distdir into
806a zip file.
807
808=cut
809
810
# spent 0s within ExtUtils::MM_Unix::zipfile_target which was called: # once (0s+0s) by ExtUtils::MM_Unix::dist_core at line 706
sub zipfile_target {
81110s my($self) = shift;
812
81310s return <<'MAKE_FRAG';
814$(DISTVNAME).zip : distdir
815 $(PREOP)
816 $(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME)
817 $(RM_RF) $(DISTVNAME)
818 $(NOECHO) $(ECHO) 'Created $(DISTVNAME).zip'
819 $(POSTOP)
820MAKE_FRAG
821}
822
823=item uutardist_target
824
825 my $make_frag = $MM->uutardist_target;
826
827Converts the tarfile into a uuencoded file
828
829=cut
830
831
# spent 0s within ExtUtils::MM_Unix::uutardist_target which was called: # once (0s+0s) by ExtUtils::MM_Unix::dist_core at line 706
sub uutardist_target {
83210s my($self) = shift;
833
83410s return <<'MAKE_FRAG';
835uutardist : $(DISTVNAME).tar$(SUFFIX)
836 uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu
837 $(NOECHO) $(ECHO) 'Created $(DISTVNAME).tar$(SUFFIX)_uu'
838MAKE_FRAG
839}
840
841
842=item shdist_target
843
844 my $make_frag = $MM->shdist_target;
845
846Converts the distdir into a shell archive.
847
848=cut
849
850
# spent 0s within ExtUtils::MM_Unix::shdist_target which was called: # once (0s+0s) by ExtUtils::MM_Unix::dist_core at line 706
sub shdist_target {
85110s my($self) = shift;
852
85310s return <<'MAKE_FRAG';
854shdist : distdir
855 $(PREOP)
856 $(SHAR) $(DISTVNAME) > $(DISTVNAME).shar
857 $(RM_RF) $(DISTVNAME)
858 $(NOECHO) $(ECHO) 'Created $(DISTVNAME).shar'
859 $(POSTOP)
860MAKE_FRAG
861}
862
863
864=item dlsyms (o)
865
866Used by some OS' to define DL_FUNCS and DL_VARS and write the *.exp files.
867
868Normally just returns an empty string.
869
870=cut
871
872sub dlsyms {
873 return '';
874}
875
876
877=item dynamic_bs (o)
878
879Defines targets for bootstrap files.
880
881=cut
882
883
# spent 0s within ExtUtils::MM_Unix::dynamic_bs which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub dynamic_bs {
88430s my($self, %attribs) = @_;
88530s30s return '
# spent 0s making 3 calls to ExtUtils::MM_Unix::has_link_code, avg 0s/call
886BOOTSTRAP =
887' unless $self->has_link_code();
888
88930s my $target = $Is{VMS} ? '$(MMS$TARGET)' : '$@';
890
89130s return sprintf <<'MAKE_FRAG', ($target) x 2;
892BOOTSTRAP = $(BASEEXT).bs
893
894# As Mkbootstrap might not write a file (if none is required)
895# we use touch to prevent make continually trying to remake it.
896# The DynaLoader only reads a non-empty file.
897$(BOOTSTRAP) : $(FIRST_MAKEFILE) $(BOOTDEP) $(INST_ARCHAUTODIR)$(DFSEP).exists
898 $(NOECHO) $(ECHO) "Running Mkbootstrap for $(NAME) ($(BSLOADLIBS))"
899 $(NOECHO) $(PERLRUN) \
900 "-MExtUtils::Mkbootstrap" \
901 -e "Mkbootstrap('$(BASEEXT)','$(BSLOADLIBS)');"
902 $(NOECHO) $(TOUCH) "%s"
903 $(CHMOD) $(PERM_RW) "%s"
904MAKE_FRAG
905}
906
907=item dynamic_lib (o)
908
909Defines how to produce the *.so (or equivalent) files.
910
911=cut
912
913sub dynamic_lib {
914 my($self, %attribs) = @_;
915 return '' unless $self->needs_linking(); #might be because of a subdir
916
917 return '' unless $self->has_link_code;
918
919 my($otherldflags) = $attribs{OTHERLDFLAGS} || "";
920 my($inst_dynamic_dep) = $attribs{INST_DYNAMIC_DEP} || "";
921 my($armaybe) = $attribs{ARMAYBE} || $self->{ARMAYBE} || ":";
922 my($ldfrom) = '$(LDFROM)';
923 $armaybe = 'ar' if ($Is{OSF} and $armaybe eq ':');
924 my(@m);
925 my $ld_opt = $Is{OS2} ? '$(OPTIMIZE) ' : ''; # Useful on other systems too?
926 my $ld_fix = $Is{OS2} ? '|| ( $(RM_F) $@ && sh -c false )' : '';
927 push(@m,'
928# This section creates the dynamically loadable $(INST_DYNAMIC)
929# from $(OBJECT) and possibly $(MYEXTLIB).
930ARMAYBE = '.$armaybe.'
931OTHERLDFLAGS = '.$ld_opt.$otherldflags.'
932INST_DYNAMIC_DEP = '.$inst_dynamic_dep.'
933INST_DYNAMIC_FIX = '.$ld_fix.'
934
935$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)$(DFSEP).exists $(EXPORT_LIST) $(PERL_ARCHIVEDEP) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP)
936');
937 if ($armaybe ne ':'){
938 $ldfrom = 'tmp$(LIB_EXT)';
939 push(@m,' $(ARMAYBE) cr '.$ldfrom.' $(OBJECT)'."\n");
940 push(@m,' $(RANLIB) '."$ldfrom\n");
941 }
942 $ldfrom = "-all $ldfrom -none" if $Is{OSF};
943
944 # The IRIX linker doesn't use LD_RUN_PATH
945 my $ldrun = $Is{IRIX} && $self->{LD_RUN_PATH} ?
946 qq{-rpath "$self->{LD_RUN_PATH}"} : '';
947
948 # For example in AIX the shared objects/libraries from previous builds
949 # linger quite a while in the shared dynalinker cache even when nobody
950 # is using them. This is painful if one for instance tries to restart
951 # a failed build because the link command will fail unnecessarily 'cos
952 # the shared object/library is 'busy'.
953 push(@m,' $(RM_F) $@
954');
955
956 my $libs = '$(LDLOADLIBS)';
957
958 if (($Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
959 # Use nothing on static perl platforms, and to the flags needed
960 # to link against the shared libperl library on shared perl
961 # platforms. We peek at lddlflags to see if we need -Wl,-R
962 # or -R to add paths to the run-time library search path.
963 if ($Config{'lddlflags'} =~ /-Wl,-R/) {
964 $libs .= ' "-L$(PERL_INC)" "-Wl,-R$(INSTALLARCHLIB)/CORE" "-Wl,-R$(PERL_ARCHLIB)/CORE" -lperl';
965 } elsif ($Config{'lddlflags'} =~ /-R/) {
966 $libs .= ' "-L$(PERL_INC)" "-R$(INSTALLARCHLIB)/CORE" "-R$(PERL_ARCHLIB)/CORE" -lperl';
967 } elsif ( $Is{Android} ) {
968 # The Android linker will not recognize symbols from
969 # libperl unless the module explicitly depends on it.
970 $libs .= ' "-L$(PERL_INC)" -lperl';
971 }
972 }
973
974 my $ld_run_path_shell = "";
975 if ($self->{LD_RUN_PATH} ne "") {
976 $ld_run_path_shell = 'LD_RUN_PATH="$(LD_RUN_PATH)" ';
977 }
978
979 push @m, sprintf <<'MAKE', $ld_run_path_shell, $ldrun, $ldfrom, $libs;
980 %s$(LD) %s $(LDDLFLAGS) %s $(OTHERLDFLAGS) -o $@ $(MYEXTLIB) \
981 $(PERL_ARCHIVE) %s $(PERL_ARCHIVE_AFTER) $(EXPORT_LIST) \
982 $(INST_DYNAMIC_FIX)
983MAKE
984
985 push @m, <<'MAKE';
986 $(CHMOD) $(PERM_RWX) $@
987 $(NOECHO) $(RM_RF) $(BOOTSTRAP)
988 - $(CP_NONEMPTY) $(BOOTSTRAP) $(INST_BOOT) $(PERM_RW)
989MAKE
990
991 return join('',@m);
992}
993
994=item exescan
995
996Deprecated method. Use libscan instead.
997
998=cut
999
1000sub exescan {
1001 my($self,$path) = @_;
1002 $path;
1003}
1004
1005=item extliblist
1006
1007Called by init_others, and calls ext ExtUtils::Liblist. See
1008L<ExtUtils::Liblist> for details.
1009
1010=cut
1011
1012
# spent 46.8ms (0s+46.8) within ExtUtils::MM_Unix::extliblist which was called 3 times, avg 15.6ms/call: # 3 times (0s+46.8ms) by ExtUtils::MM_Any::init_others at line 2273 of ExtUtils/MM_Any.pm, avg 15.6ms/call
sub extliblist {
101330s my($self,$libs) = @_;
101430s require ExtUtils::Liblist;
101530s30s $self->ext($libs, $Verbose);
# spent 0s making 3 calls to ExtUtils::Liblist::ext, avg 0s/call
1016}
1017
1018=item find_perl
1019
1020Finds the executables PERL and FULLPERL
1021
1022=cut
1023
1024
# spent 93.6ms (0s+93.6) within ExtUtils::MM_Unix::find_perl which was called: # once (0s+93.6ms) by ExtUtils::MM_Unix::init_PERL at line 1930
sub find_perl {
102510s my($self, $ver, $names, $dirs, $trace) = @_;
1026
102710s if ($trace >= 2){
1028 print "Looking for perl $ver by these names:
1029@$names
1030in these dirs:
1031@$dirs
1032";
1033 }
1034
103510s my $stderr_duped = 0;
103610s local *STDERR_COPY;
1037
103810s unless ($Is{BSD}) {
1039 # >& and lexical filehandles together give 5.6.2 indigestion
104010s10s if( open(STDERR_COPY, '>&STDERR') ) { ## no critic
# spent 0s making 1 call to ExtUtils::MM_Unix::CORE:open
1041 $stderr_duped = 1;
1042 }
1043 else {
1044 warn <<WARNING;
1045find_perl() can't dup STDERR: $!
1046You might see some garbage while we search for Perl
1047WARNING
1048 }
1049 }
1050
105110s foreach my $name (@$names){
105210s foreach my $dir (@$dirs){
105310s next unless defined $dir; # $self->{PERL_SRC} may be undefined
105410s my ($abs, $val);
105510s10s if ($self->file_name_is_absolute($name)) { # /foo/bar
# spent 0s making 1 call to File::Spec::Win32::file_name_is_absolute
1056 $abs = $name;
1057 } elsif ($self->canonpath($name) eq
1058 $self->canonpath(basename($name))) { # foo
1059 $abs = $self->catfile($dir, $name);
1060 } else { # foo/bar
1061 $abs = $self->catfile($Curdir, $name);
1062 }
106310s print "Checking $abs\n" if ($trace >= 2);
106410s10s next unless $self->maybe_command($abs);
# spent 0s making 1 call to ExtUtils::MM_Win32::maybe_command
106510s print "Executing $abs\n" if ($trace >= 2);
1066
106710s my $version_check = qq{"$abs" -le "require $ver; print qq{VER_OK}"};
1068
1069 # To avoid using the unportable 2>&1 to suppress STDERR,
1070 # we close it before running the command.
1071 # However, thanks to a thread library bug in many BSDs
1072 # ( http://www.freebsd.org/cgi/query-pr.cgi?pr=51535 )
1073 # we cannot use the fancier more portable way in here
1074 # but instead need to use the traditional 2>&1 construct.
107510s if ($Is{BSD}) {
1076 $val = `$version_check 2>&1`;
1077 } else {
107810s10s close STDERR if $stderr_duped;
# spent 0s making 1 call to ExtUtils::MM_Unix::CORE:close
1079193.6ms193.6ms $val = `$version_check`;
# spent 93.6ms making 1 call to ExtUtils::MM_Unix::CORE:backtick
1080
1081 # 5.6.2's 3-arg open doesn't work with >&
108210s10s open STDERR, ">&STDERR_COPY" ## no critic
# spent 0s making 1 call to ExtUtils::MM_Unix::CORE:open
1083 if $stderr_duped;
1084 }
1085
108610s10s if ($val =~ /^VER_OK/m) {
# spent 0s making 1 call to ExtUtils::MM_Unix::CORE:match
108710s print "Using PERL=$abs\n" if $trace;
108810s return $abs;
1089 } elsif ($trace >= 2) {
1090 print "Result: '$val' ".($? >> 8)."\n";
1091 }
1092 }
1093 }
1094 print "Unable to find a perl $ver (by these names: @$names, in these dirs: @$dirs)\n";
1095 0; # false and not empty
1096}
1097
1098
1099=item fixin
1100
1101 $mm->fixin(@files);
1102
1103Inserts the sharpbang or equivalent magic number to a set of @files.
1104
1105=cut
1106
1107sub fixin { # stolen from the pink Camel book, more or less
1108 my ( $self, @files ) = @_;
1109
1110 for my $file (@files) {
1111 my $file_new = "$file.new";
1112 my $file_bak = "$file.bak";
1113
1114 open( my $fixin, '<', $file ) or croak "Can't process '$file': $!";
1115 local $/ = "\n";
1116 chomp( my $line = <$fixin> );
1117 next unless $line =~ s/^\s*\#!\s*//; # Not a shebang file.
1118
1119 my $shb = $self->_fixin_replace_shebang( $file, $line );
1120 next unless defined $shb;
1121
1122 open( my $fixout, ">", "$file_new" ) or do {
1123 warn "Can't create new $file: $!\n";
1124 next;
1125 };
1126
1127 # Print out the new #! line (or equivalent).
1128 local $\;
1129 local $/;
1130 print $fixout $shb, <$fixin>;
1131 close $fixin;
1132 close $fixout;
1133
1134 chmod 0666, $file_bak;
1135 unlink $file_bak;
1136 unless ( _rename( $file, $file_bak ) ) {
1137 warn "Can't rename $file to $file_bak: $!";
1138 next;
1139 }
1140 unless ( _rename( $file_new, $file ) ) {
1141 warn "Can't rename $file_new to $file: $!";
1142 unless ( _rename( $file_bak, $file ) ) {
1143 warn "Can't rename $file_bak back to $file either: $!";
1144 warn "Leaving $file renamed as $file_bak\n";
1145 }
1146 next;
1147 }
1148 unlink $file_bak;
1149 }
1150 continue {
1151 system("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
1152 }
1153}
1154
1155
1156sub _rename {
1157 my($old, $new) = @_;
1158
1159 foreach my $file ($old, $new) {
1160 if( $Is{VMS} and basename($file) !~ /\./ ) {
1161 # rename() in 5.8.0 on VMS will not rename a file if it
1162 # does not contain a dot yet it returns success.
1163 $file = "$file.";
1164 }
1165 }
1166
1167 return rename($old, $new);
1168}
1169
1170sub _fixin_replace_shebang {
1171 my ( $self, $file, $line ) = @_;
1172
1173 # Now figure out the interpreter name.
1174 my ( $cmd, $arg ) = split ' ', $line, 2;
1175 $cmd =~ s!^.*/!!;
1176
1177 # Now look (in reverse) for interpreter in absolute PATH (unless perl).
1178 my $interpreter;
1179 if ( $cmd =~ m{^perl(?:\z|[^a-z])} ) {
1180 if ( $Config{startperl} =~ m,^\#!.*/perl, ) {
1181 $interpreter = $Config{startperl};
1182 $interpreter =~ s,^\#!,,;
1183 }
1184 else {
1185 $interpreter = $Config{perlpath};
1186 }
1187 }
1188 else {
1189 my (@absdirs)
1190 = reverse grep { $self->file_name_is_absolute($_) } $self->path;
1191 $interpreter = '';
1192
1193 foreach my $dir (@absdirs) {
1194 if ( $self->maybe_command($cmd) ) {
1195 warn "Ignoring $interpreter in $file\n"
1196 if $Verbose && $interpreter;
1197 $interpreter = $self->catfile( $dir, $cmd );
1198 }
1199 }
1200 }
1201
1202 # Figure out how to invoke interpreter on this machine.
1203
1204 my ($does_shbang) = $Config{'sharpbang'} =~ /^\s*\#\!/;
1205 my ($shb) = "";
1206 if ($interpreter) {
1207 print "Changing sharpbang in $file to $interpreter"
1208 if $Verbose;
1209 # this is probably value-free on DOSISH platforms
1210 if ($does_shbang) {
1211 $shb .= "$Config{'sharpbang'}$interpreter";
1212 $shb .= ' ' . $arg if defined $arg;
1213 $shb .= "\n";
1214 }
1215 }
1216 else {
1217 warn "Can't find $cmd in PATH, $file unchanged"
1218 if $Verbose;
1219 return;
1220 }
1221 return $shb
1222}
1223
1224=item force (o)
1225
1226Writes an empty FORCE: target.
1227
1228=cut
1229
1230
# spent 0s within ExtUtils::MM_Unix::force which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub force {
123130s my($self) = shift;
123230s '# Phony target to force checking subdirectories.
1233FORCE :
1234 $(NOECHO) $(NOOP)
1235';
1236}
1237
1238=item guess_name
1239
1240Guess the name of this package by examining the working directory's
1241name. MakeMaker calls this only if the developer has not supplied a
1242NAME attribute.
1243
1244=cut
1245
1246# ';
1247
1248sub guess_name {
1249 my($self) = @_;
1250215.6ms20s
# spent 0s within ExtUtils::MM_Unix::BEGIN@1250 which was called: # once (0s+0s) by main::BEGIN@1 at line 1250
use Cwd 'cwd';
# spent 0s making 1 call to Exporter::import # spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@1250
1251 my $name = basename(cwd());
1252 $name =~ s|[\-_][\d\.\-]+\z||; # this is new with MM 5.00, we
1253 # strip minus or underline
1254 # followed by a float or some such
1255 print "Warning: Guessing NAME [$name] from current directory name.\n";
1256 $name;
1257}
1258
1259=item has_link_code
1260
1261Returns true if C, XS, MYEXTLIB or similar objects exist within this
1262object that need a compiler. Does not descend into subdirectories as
1263needs_linking() does.
1264
1265=cut
1266
1267
# spent 0s within ExtUtils::MM_Unix::has_link_code which was called 18 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Any::realclean at line 1554 of ExtUtils/MM_Any.pm, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_xs at line 2071, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::dynamic_bs at line 885, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::needs_linking at line 2670, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Win32::dynamic_lib at line 337 of ExtUtils/MM_Win32.pm, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Win32::static_lib at line 296 of ExtUtils/MM_Win32.pm, avg 0s/call
sub has_link_code {
1268180s my($self) = shift;
1269180s return $self->{HAS_LINK_CODE} if defined $self->{HAS_LINK_CODE};
127030s if ($self->{OBJECT} or @{$self->{C} || []} or $self->{MYEXTLIB}){
127130s $self->{HAS_LINK_CODE} = 1;
127230s return 1;
1273 }
1274 return $self->{HAS_LINK_CODE} = 0;
1275}
1276
1277
1278=item init_dirscan
1279
1280Scans the directory structure and initializes DIR, XS, XS_FILES,
1281C, C_FILES, O_FILES, H, H_FILES, PL_FILES, EXE_FILES.
1282
1283Called by init_main.
1284
1285=cut
1286
1287
# spent 0s within ExtUtils::MM_Unix::init_dirscan which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 656 of ExtUtils/MakeMaker.pm, avg 0s/call
sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc)
128830s my($self) = @_;
128930s my(%dir, %xs, %c, %o, %h, %pl_files, %pm);
1290
129130s my %ignore = map {( $_ => 1 )} qw(Makefile.PL Build.PL test.pl t);
1292
1293 # ignore the distdir
129430s $Is{VMS} ? $ignore{"$self->{DISTVNAME}.dir"} = 1
1295 : $ignore{$self->{DISTVNAME}} = 1;
1296
129730s60s my $distprefix = $Is{VMS} ? qr/^\Q$self->{DISTNAME}\E-v?[\d\.]+\.dir$/i
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:qr, avg 0s/call # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:regcomp, avg 0s/call
1298 : qr/^\Q$self->{DISTNAME}\E-v?[\d\.]+$/;
1299
130030s @ignore{map lc, keys %ignore} = values %ignore if $Is{VMS};
1301
130230s if ( defined $self->{XS} and !defined $self->{C} ) {
1303 my @c_files = grep { m/\.c(pp|xx)?\z/i } values %{$self->{XS}};
1304 my @o_files = grep { m/(?:.(?:o(?:bj)?)|\$\(OBJ_EXT\))\z/i } values %{$self->{XS}};
1305 %c = map { $_ => 1 } @c_files;
1306 %o = map { $_ => 1 } @o_files;
1307 }
1308
130930s60s foreach my $name ($self->lsdir($Curdir)){
# spent 0s making 3 calls to DirHandle::DESTROY, avg 0s/call # spent 0s making 3 calls to ExtUtils::MM_Unix::lsdir, avg 0s/call
1310250s250s next if $name =~ /\#/;
# spent 0s making 25 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call
1311250s500s next if $name =~ $distprefix && -d $name;
# spent 0s making 25 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call # spent 0s making 25 calls to ExtUtils::MM_Unix::CORE:regcomp, avg 0s/call
1312250s $name = lc($name) if $Is{VMS};
1313250s next if $name eq $Curdir or $name eq $Updir or $ignore{$name};
1314150s150s next unless $self->libscan($name);
# spent 0s making 15 calls to ExtUtils::MM_Any::libscan, avg 0s/call
1315150s710s if (-d $name){
# spent 0s making 3 calls to ExtUtils::MM_Any::catfile, avg 0s/call # spent 0s making 15 calls to ExtUtils::MM_Unix::CORE:ftdir, avg 0s/call # spent 0s making 53 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call
131620s20s next if -l $name; # We do not support symlinks at all
# spent 0s making 2 calls to ExtUtils::MM_Unix::CORE:ftlink, avg 0s/call
131720s next if $self->{NORECURS};
131820s40s $dir{$name} = $name if (-f $self->catfile($name,"Makefile.PL"));
# spent 0s making 2 calls to ExtUtils::MM_Any::catfile, avg 0s/call # spent 0s making 2 calls to ExtUtils::MM_Unix::CORE:ftfile, avg 0s/call
1319 } elsif ($name =~ /\.xs\z/){
132060s30s my($c); ($c = $name) =~ s/\.xs\z/.c/;
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
132130s $xs{$name} = $c;
132230s $c{$c} = 1;
1323 } elsif ($name =~ /\.c(pp|xx|c)?\z/i){ # .c .C .cpp .cxx .cc
1324 $c{$name} = 1
1325 unless $name =~ m/perlmain\.c/; # See MAP_TARGET
1326 } elsif ($name =~ /\.h\z/i){
1327 $h{$name} = 1;
1328 } elsif ($name =~ /\.PL\z/) {
1329 ($pl_files{$name} = $name) =~ s/\.PL\z// ;
1330 } elsif (($Is{VMS} || $Is{Dos}) && $name =~ /[._]pl$/i) {
1331 # case-insensitive filesystem, one dot per name, so foo.h.PL
1332 # under Unix appears as foo.h_pl under VMS or fooh.pl on Dos
1333 local($/); open(my $pl, '<', $name); my $txt = <$pl>; close $pl;
1334 if ($txt =~ /Extracting \S+ \(with variable substitutions/) {
1335 ($pl_files{$name} = $name) =~ s/[._]pl\z//i ;
1336 }
1337 else {
1338 $pm{$name} = $self->catfile($self->{INST_LIBDIR},$name);
1339 }
1340 } elsif ($name =~ /\.(p[ml]|pod)\z/){
1341 $pm{$name} = $self->catfile($self->{INST_LIBDIR},$name);
1342 }
1343 }
1344
134530s $self->{PL_FILES} ||= \%pl_files;
134630s30s $self->{DIR} ||= [sort keys %dir];
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:sort, avg 0s/call
134730s $self->{XS} ||= \%xs;
134830s30s $self->{C} ||= [sort keys %c];
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:sort, avg 0s/call
134930s30s $self->{H} ||= [sort keys %h];
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:sort, avg 0s/call
135030s $self->{PM} ||= \%pm;
1351
135230s my @o_files = @{$self->{C}};
135330s90s %o = (%o, map { $_ => 1 } grep s/\.c(pp|xx|c)?\z/$self->{OBJ_EXT}/i, @o_files);
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call # spent 0s making 6 calls to ExtUtils::MM_Unix::CORE:substcont, avg 0s/call
135430s30s $self->{O_FILES} = [sort keys %o];
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:sort, avg 0s/call
1355}
1356
1357
1358=item init_MANPODS
1359
1360Determines if man pages should be generated and initializes MAN1PODS
1361and MAN3PODS as appropriate.
1362
1363=cut
1364
1365
# spent 0s within ExtUtils::MM_Unix::init_MANPODS which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 658 of ExtUtils/MakeMaker.pm, avg 0s/call
sub init_MANPODS {
136630s my $self = shift;
1367
1368 # Set up names of manual pages to generate from pods
136930s foreach my $man (qw(MAN1 MAN3)) {
137060s60s if ( $self->{"${man}PODS"}
# spent 0s making 6 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call
1371 or $self->{"INSTALL${man}DIR"} =~ /^(none|\s*)$/
1372 ) {
1373 $self->{"${man}PODS"} ||= {};
1374 }
1375 else {
1376 my $init_method = "init_${man}PODS";
1377 $self->$init_method();
1378 }
1379 }
1380}
1381
1382
1383sub _has_pod {
1384 my($self, $file) = @_;
1385
1386 my($ispod)=0;
1387 if (open( my $fh, '<', $file )) {
1388 while (<$fh>) {
1389 if (/^=(?:head\d+|item|pod)\b/) {
1390 $ispod=1;
1391 last;
1392 }
1393 }
1394 close $fh;
1395 } else {
1396 # If it doesn't exist yet, we assume, it has pods in it
1397 $ispod = 1;
1398 }
1399
1400 return $ispod;
1401}
1402
1403
1404=item init_MAN1PODS
1405
1406Initializes MAN1PODS from the list of EXE_FILES.
1407
1408=cut
1409
1410sub init_MAN1PODS {
1411 my($self) = @_;
1412
1413 if ( exists $self->{EXE_FILES} ) {
1414 foreach my $name (@{$self->{EXE_FILES}}) {
1415 next unless $self->_has_pod($name);
1416
1417 $self->{MAN1PODS}->{$name} =
1418 $self->catfile("\$(INST_MAN1DIR)",
1419 basename($name).".\$(MAN1EXT)");
1420 }
1421 }
1422}
1423
1424
1425=item init_MAN3PODS
1426
1427Initializes MAN3PODS from the list of PM files.
1428
1429=cut
1430
1431sub init_MAN3PODS {
1432 my $self = shift;
1433
1434 my %manifypods = (); # we collect the keys first, i.e. the files
1435 # we have to convert to pod
1436
1437 foreach my $name (keys %{$self->{PM}}) {
1438 if ($name =~ /\.pod\z/ ) {
1439 $manifypods{$name} = $self->{PM}{$name};
1440 } elsif ($name =~ /\.p[ml]\z/ ) {
1441 if( $self->_has_pod($name) ) {
1442 $manifypods{$name} = $self->{PM}{$name};
1443 }
1444 }
1445 }
1446
1447 my $parentlibs_re = join '|', @{$self->{PMLIBPARENTDIRS}};
1448
1449 # Remove "Configure.pm" and similar, if it's not the only pod listed
1450 # To force inclusion, just name it "Configure.pod", or override
1451 # MAN3PODS
1452 foreach my $name (keys %manifypods) {
1453 if ($self->{PERL_CORE} and $name =~ /(config|setup).*\.pm/is) {
1454 delete $manifypods{$name};
1455 next;
1456 }
1457 my($manpagename) = $name;
1458 $manpagename =~ s/\.p(od|m|l)\z//;
1459 # everything below lib is ok
1460 unless($manpagename =~ s!^\W*($parentlibs_re)\W+!!s) {
1461 $manpagename = $self->catfile(
1462 split(/::/,$self->{PARENT_NAME}),$manpagename
1463 );
1464 }
1465 $manpagename = $self->replace_manpage_separator($manpagename);
1466 $self->{MAN3PODS}->{$name} =
1467 $self->catfile("\$(INST_MAN3DIR)", "$manpagename.\$(MAN3EXT)");
1468 }
1469}
1470
1471
1472=item init_PM
1473
1474Initializes PMLIBDIRS and PM from PMLIBDIRS.
1475
1476=cut
1477
1478
# spent 0s within ExtUtils::MM_Unix::init_PM which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 657 of ExtUtils/MakeMaker.pm, avg 0s/call
sub init_PM {
147930s my $self = shift;
1480
1481 # Some larger extensions often wish to install a number of *.pm/pl
1482 # files into the library in various locations.
1483
1484 # The attribute PMLIBDIRS holds an array reference which lists
1485 # subdirectories which we should search for library files to
1486 # install. PMLIBDIRS defaults to [ 'lib', $self->{BASEEXT} ]. We
1487 # recursively search through the named directories (skipping any
1488 # which don't exist or contain Makefile.PL files).
1489
1490 # For each *.pm or *.pl file found $self->libscan() is called with
1491 # the default installation path in $_[1]. The return value of
1492 # libscan defines the actual installation location. The default
1493 # libscan function simply returns the path. The file is skipped
1494 # if libscan returns false.
1495
1496 # The default installation location passed to libscan in $_[1] is:
1497 #
1498 # ./*.pm => $(INST_LIBDIR)/*.pm
1499 # ./xyz/... => $(INST_LIBDIR)/xyz/...
1500 # ./lib/... => $(INST_LIB)/...
1501 #
1502 # In this way the 'lib' directory is seen as the root of the actual
1503 # perl library whereas the others are relative to INST_LIBDIR
1504 # (which includes PARENT_NAME). This is a subtle distinction but one
1505 # that's important for nested modules.
1506
150730s unless( $self->{PMLIBDIRS} ) {
1508 if( $Is{VMS} ) {
1509 # Avoid logical name vs directory collisions
1510 $self->{PMLIBDIRS} = ['./lib', "./$self->{BASEEXT}"];
1511 }
1512 else {
151330s $self->{PMLIBDIRS} = ['lib', $self->{BASEEXT}];
1514 }
1515 }
1516
1517 #only existing directories that aren't in $dir are allowed
1518
1519 # Avoid $_ wherever possible:
1520 # @{$self->{PMLIBDIRS}} = grep -d && !$dir{$_}, @{$self->{PMLIBDIRS}};
152130s my (@pmlibdirs) = @{$self->{PMLIBDIRS}};
152230s @{$self->{PMLIBDIRS}} = ();
152330s my %dir = map { ($_ => $_) } @{$self->{DIR}};
152430s foreach my $pmlibdir (@pmlibdirs) {
152560s60s -d $pmlibdir && !$dir{$pmlibdir} && push @{$self->{PMLIBDIRS}}, $pmlibdir;
# spent 0s making 6 calls to ExtUtils::MM_Unix::CORE:ftdir, avg 0s/call
1526 }
1527
152830s unless( $self->{PMLIBPARENTDIRS} ) {
1529 @{$self->{PMLIBPARENTDIRS}} = ('lib');
1530 }
1531
153230s return if $self->{PM} and $self->{ARGS}{PM};
1533
153430s if (@{$self->{PMLIBDIRS}}){
1535 print "Searching PMLIBDIRS: @{$self->{PMLIBDIRS}}\n"
1536 if ($Verbose >= 2);
1537 require File::Find;
1538 File::Find::find(sub {
1539 if (-d $_){
1540 unless ($self->libscan($_)){
1541 $File::Find::prune = 1;
1542 }
1543 return;
1544 }
1545 return if /\#/;
1546 return if /~$/; # emacs temp files
1547 return if /,v$/; # RCS files
1548 return if m{\.swp$}; # vim swap files
1549
1550 my $path = $File::Find::name;
1551 my $prefix = $self->{INST_LIBDIR};
1552 my $striplibpath;
1553
1554 my $parentlibs_re = join '|', @{$self->{PMLIBPARENTDIRS}};
1555 $prefix = $self->{INST_LIB}
1556 if ($striplibpath = $path) =~ s{^(\W*)($parentlibs_re)\W}
1557 {$1}i;
1558
1559 my($inst) = $self->catfile($prefix,$striplibpath);
1560 local($_) = $inst; # for backwards compatibility
1561 $inst = $self->libscan($inst);
1562 print "libscan($path) => '$inst'\n" if ($Verbose >= 2);
1563 return unless $inst;
1564 $self->{PM}{$path} = $inst;
1565 }, @{$self->{PMLIBDIRS}});
1566 }
1567}
1568
1569
1570=item init_DIRFILESEP
1571
1572Using / for Unix. Called by init_main.
1573
1574=cut
1575
1576sub init_DIRFILESEP {
1577 my($self) = shift;
1578
1579 $self->{DIRFILESEP} = '/';
1580}
1581
1582
1583=item init_main
1584
1585Initializes AR, AR_STATIC_ARGS, BASEEXT, CONFIG, DISTNAME, DLBASE,
1586EXE_EXT, FULLEXT, FULLPERL, FULLPERLRUN, FULLPERLRUNINST, INST_*,
1587INSTALL*, INSTALLDIRS, LIB_EXT, LIBPERL_A, MAP_TARGET, NAME,
1588OBJ_EXT, PARENT_NAME, PERL, PERL_ARCHLIB, PERL_INC, PERL_LIB,
1589PERL_SRC, PERLRUN, PERLRUNINST, PREFIX, VERSION,
1590VERSION_SYM, XS_VERSION.
1591
1592=cut
1593
1594
# spent 0s within ExtUtils::MM_Unix::init_main which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 650 of ExtUtils/MakeMaker.pm, avg 0s/call
sub init_main {
159530s my($self) = @_;
1596
1597 # --- Initialize Module Name and Paths
1598
1599 # NAME = Foo::Bar::Oracle
1600 # FULLEXT = Foo/Bar/Oracle
1601 # BASEEXT = Oracle
1602 # PARENT_NAME = Foo::Bar
1603### Only UNIX:
1604### ($self->{FULLEXT} =
1605### $self->{NAME}) =~ s!::!/!g ; #eg. BSD/Foo/Socket
160630s30s $self->{FULLEXT} = $self->catdir(split /::/, $self->{NAME});
# spent 0s making 3 calls to File::Spec::Win32::catdir, avg 0s/call
1607
1608
1609 # Copied from DynaLoader:
1610
161130s my(@modparts) = split(/::/,$self->{NAME});
161230s my($modfname) = $modparts[-1];
1613
1614 # Some systems have restrictions on files names for DLL's etc.
1615 # mod2fname returns appropriate file base name (typically truncated)
1616 # It may also edit @modparts if required.
1617 # We require DynaLoader to make sure that mod2fname is loaded
161860s eval { require DynaLoader };
161930s if (defined &DynaLoader::mod2fname) {
1620 $modfname = &DynaLoader::mod2fname(\@modparts);
1621 }
1622
162330s30s ($self->{PARENT_NAME}, $self->{BASEEXT}) = $self->{NAME} =~ m!(?:([\w:]+)::)?(\w+)\z! ;
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call
162430s $self->{PARENT_NAME} ||= '';
1625
162630s if (defined &DynaLoader::mod2fname) {
1627 # As of 5.001m, dl_os2 appends '_'
1628 $self->{DLBASE} = $modfname;
1629 } else {
163030s $self->{DLBASE} = '$(BASEEXT)';
1631 }
1632
1633
1634 # --- Initialize PERL_LIB, PERL_SRC
1635
1636 # *Real* information: where did we get these two from? ...
163730s30s my $inc_config_dir = dirname($INC{'Config.pm'});
# spent 0s making 3 calls to File::Basename::dirname, avg 0s/call
163830s30s my $inc_carp_dir = dirname($INC{'Carp.pm'});
# spent 0s making 3 calls to File::Basename::dirname, avg 0s/call
1639
164030s unless ($self->{PERL_SRC}){
164130s foreach my $dir_count (1..8) { # 8 is the VMS limit for nesting
1642240s240s my $dir = $self->catdir(($Updir) x $dir_count);
# spent 0s making 24 calls to File::Spec::Win32::catdir, avg 0s/call
1643
1644240s480s if (-f $self->catfile($dir,"config_h.SH") &&
# spent 0s making 24 calls to ExtUtils::MM_Any::catfile, avg 0s/call # spent 0s making 24 calls to ExtUtils::MM_Unix::CORE:ftfile, avg 0s/call
1645 -f $self->catfile($dir,"perl.h") &&
1646 -f $self->catfile($dir,"lib","strict.pm")
1647 ) {
1648 $self->{PERL_SRC}=$dir ;
1649 last;
1650 }
1651 }
1652 }
1653
165430s warn "PERL_CORE is set but I can't find your PERL_SRC!\n" if
1655 $self->{PERL_CORE} and !$self->{PERL_SRC};
1656
165730s if ($self->{PERL_SRC}){
1658 $self->{PERL_LIB} ||= $self->catdir("$self->{PERL_SRC}","lib");
1659
1660 $self->{PERL_ARCHLIB} = $self->{PERL_LIB};
1661 $self->{PERL_INC} = ($Is{Win32}) ?
1662 $self->catdir($self->{PERL_LIB},"CORE") : $self->{PERL_SRC};
1663
1664 # catch a situation that has occurred a few times in the past:
1665 unless (
1666 -s $self->catfile($self->{PERL_SRC},'cflags')
1667 or
1668 $Is{VMS}
1669 &&
1670 -s $self->catfile($self->{PERL_SRC},'vmsish.h')
1671 or
1672 $Is{Win32}
1673 ){
1674 warn qq{
1675You cannot build extensions below the perl source tree after executing
1676a 'make clean' in the perl source tree.
1677
1678To rebuild extensions distributed with the perl source you should
1679simply Configure (to include those extensions) and then build perl as
1680normal. After installing perl the source tree can be deleted. It is
1681not needed for building extensions by running 'perl Makefile.PL'
1682usually without extra arguments.
1683
1684It is recommended that you unpack and build additional extensions away
1685from the perl source tree.
1686};
1687 }
1688 } else {
1689 # we should also consider $ENV{PERL5LIB} here
169030s my $old = $self->{PERL_LIB} || $self->{PERL_ARCHLIB} || $self->{PERL_INC};
169130s $self->{PERL_LIB} ||= $Config{privlibexp};
169230s $self->{PERL_ARCHLIB} ||= $Config{archlibexp};
169330s30s $self->{PERL_INC} = $self->catdir("$self->{PERL_ARCHLIB}","CORE"); # wild guess for now
# spent 0s making 3 calls to File::Spec::Win32::catdir, avg 0s/call
169430s my $perl_h;
1695
169630s60s if (not -f ($perl_h = $self->catfile($self->{PERL_INC},"perl.h"))
# spent 0s making 3 calls to ExtUtils::MM_Any::catfile, avg 0s/call # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:ftfile, avg 0s/call
1697 and not $old){
1698 # Maybe somebody tries to build an extension with an
1699 # uninstalled Perl outside of Perl build tree
1700 my $lib;
1701 for my $dir (@INC) {
1702 $lib = $dir, last if -e $self->catfile($dir, "Config.pm");
1703 }
1704 if ($lib) {
1705 # Win32 puts its header files in /perl/src/lib/CORE.
1706 # Unix leaves them in /perl/src.
1707 my $inc = $Is{Win32} ? $self->catdir($lib, "CORE" )
1708 : dirname $lib;
1709 if (-e $self->catfile($inc, "perl.h")) {
1710 $self->{PERL_LIB} = $lib;
1711 $self->{PERL_ARCHLIB} = $lib;
1712 $self->{PERL_INC} = $inc;
1713 $self->{UNINSTALLED_PERL} = 1;
1714 print <<EOP;
1715... Detected uninstalled Perl. Trying to continue.
1716EOP
1717 }
1718 }
1719 }
1720 }
1721
172230s if ($Is{Android}) {
1723 # Android fun times!
1724 # ../../perl -I../../lib -MFile::Glob -e1 works
1725 # ../../../perl -I../../../lib -MFile::Glob -e1 fails to find
1726 # the .so for File::Glob.
1727 # This always affects core perl, but may also affect an installed
1728 # perl built with -Duserelocatableinc.
1729 $self->{PERL_LIB} = File::Spec->rel2abs($self->{PERL_LIB});
1730 $self->{PERL_ARCHLIB} = File::Spec->rel2abs($self->{PERL_ARCHLIB});
1731 }
173230s $self->{PERL_INCDEP} = $self->{PERL_INC};
173330s $self->{PERL_ARCHLIBDEP} = $self->{PERL_ARCHLIB};
1734
1735 # We get SITELIBEXP and SITEARCHEXP directly via
1736 # Get_from_Config. When we are running standard modules, these
1737 # won't matter, we will set INSTALLDIRS to "perl". Otherwise we
1738 # set it to "site". I prefer that INSTALLDIRS be set from outside
1739 # MakeMaker.
174030s $self->{INSTALLDIRS} ||= "site";
1741
174230s $self->{MAN1EXT} ||= $Config{man1ext};
174330s $self->{MAN3EXT} ||= $Config{man3ext};
1744
1745 # Get some stuff out of %Config if we haven't yet done so
174630s print "CONFIG must be an array ref\n"
1747 if ($self->{CONFIG} and ref $self->{CONFIG} ne 'ARRAY');
174830s $self->{CONFIG} = [] unless (ref $self->{CONFIG});
174930s push(@{$self->{CONFIG}}, @ExtUtils::MakeMaker::Get_from_Config);
175030s push(@{$self->{CONFIG}}, 'shellflags') if $Config{shellflags};
175130s my(%once_only);
175230s foreach my $m (@{$self->{CONFIG}}){
1753660s next if $once_only{$m};
1754660s print "CONFIG key '$m' does not exist in Config.pm\n"
1755 unless exists $Config{$m};
1756660s $self->{uc $m} ||= $Config{$m};
1757660s $once_only{$m} = 1;
1758 }
1759
1760# This is too dangerous:
1761# if ($^O eq "next") {
1762# $self->{AR} = "libtool";
1763# $self->{AR_STATIC_ARGS} = "-o";
1764# }
1765# But I leave it as a placeholder
1766
176730s $self->{AR_STATIC_ARGS} ||= "cr";
1768
1769 # These should never be needed
177030s $self->{OBJ_EXT} ||= '.o';
177130s $self->{LIB_EXT} ||= '.a';
1772
177330s $self->{MAP_TARGET} ||= "perl";
1774
177530s $self->{LIBPERL_A} ||= "libperl$self->{LIB_EXT}";
1776
1777 # make a simple check if we find strict
177830s60s warn "Warning: PERL_LIB ($self->{PERL_LIB}) seems not to be a perl library directory
# spent 0s making 3 calls to ExtUtils::MM_Any::catfile, avg 0s/call # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:ftfile, avg 0s/call
1779 (strict.pm not found)"
1780 unless -f $self->catfile("$self->{PERL_LIB}","strict.pm") ||
1781 $self->{NAME} eq "ExtUtils::MakeMaker";
1782}
1783
1784=item init_tools
1785
1786Initializes tools to use their common (and faster) Unix commands.
1787
1788=cut
1789
1790sub init_tools {
1791 my $self = shift;
1792
1793 $self->{ECHO} ||= 'echo';
1794 $self->{ECHO_N} ||= 'echo -n';
1795 $self->{RM_F} ||= "rm -f";
1796 $self->{RM_RF} ||= "rm -rf";
1797 $self->{TOUCH} ||= "touch";
1798 $self->{TEST_F} ||= "test -f";
1799 $self->{TEST_S} ||= "test -s";
1800 $self->{CP} ||= "cp";
1801 $self->{MV} ||= "mv";
1802 $self->{CHMOD} ||= "chmod";
1803 $self->{FALSE} ||= 'false';
1804 $self->{TRUE} ||= 'true';
1805
1806 $self->{LD} ||= 'ld';
1807
1808 return $self->SUPER::init_tools(@_);
1809
1810 # After SUPER::init_tools so $Config{shell} has a
1811 # chance to get set.
1812 $self->{SHELL} ||= '/bin/sh';
1813
1814 return;
1815}
1816
1817
1818=item init_linker
1819
1820Unix has no need of special linker flags.
1821
1822=cut
1823
1824sub init_linker {
1825 my($self) = shift;
1826 $self->{PERL_ARCHIVE} ||= '';
1827 $self->{PERL_ARCHIVEDEP} ||= '';
1828 $self->{PERL_ARCHIVE_AFTER} ||= '';
1829 $self->{EXPORT_LIST} ||= '';
1830}
1831
1832
1833=begin _protected
1834
1835=item init_lib2arch
1836
1837 $mm->init_lib2arch
1838
1839=end _protected
1840
1841=cut
1842
1843
# spent 0s within ExtUtils::MM_Unix::init_lib2arch which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Any::init_INSTALL_from_PREFIX at line 1820 of ExtUtils/MM_Any.pm, avg 0s/call
sub init_lib2arch {
184430s my($self) = shift;
1845
1846 # The user who requests an installation directory explicitly
1847 # should not have to tell us an architecture installation directory
1848 # as well. We look if a directory exists that is named after the
1849 # architecture. If not we take it as a sign that it should be the
1850 # same as the requested installation directory. Otherwise we take
1851 # the found one.
185230s for my $libpair ({l=>"privlib", a=>"archlib"},
1853 {l=>"sitelib", a=>"sitearch"},
1854 {l=>"vendorlib", a=>"vendorarch"},
1855 )
1856 {
185790s my $lib = "install$libpair->{l}";
185890s my $Lib = uc $lib;
185990s my $Arch = uc "install$libpair->{a}";
186090s if( $self->{$Lib} && ! $self->{$Arch} ){
1861 my($ilib) = $Config{$lib};
1862
1863 $self->prefixify($Arch,$ilib,$self->{$Lib});
1864
1865 unless (-d $self->{$Arch}) {
1866 print "Directory $self->{$Arch} not found\n"
1867 if $Verbose;
1868 $self->{$Arch} = $self->{$Lib};
1869 }
1870 print "Defaulting $Arch to $self->{$Arch}\n" if $Verbose;
1871 }
1872 }
1873}
1874
1875
1876=item init_PERL
1877
1878 $mm->init_PERL;
1879
1880Called by init_main. Sets up ABSPERL, PERL, FULLPERL and all the
1881*PERLRUN* permutations.
1882
1883 PERL is allowed to be miniperl
1884 FULLPERL must be a complete perl
1885
1886 ABSPERL is PERL converted to an absolute path
1887
1888 *PERLRUN contains everything necessary to run perl, find it's
1889 libraries, etc...
1890
1891 *PERLRUNINST is *PERLRUN + everything necessary to find the
1892 modules being built.
1893
1894=cut
1895
1896
# spent 93.6ms (0s+93.6) within ExtUtils::MM_Unix::init_PERL which was called 3 times, avg 31.2ms/call: # 3 times (0s+93.6ms) by ExtUtils::MakeMaker::new at line 660 of ExtUtils/MakeMaker.pm, avg 31.2ms/call
sub init_PERL {
189730s my($self) = shift;
1898
189930s my @defpath = ();
190030s30s foreach my $component ($self->{PERL_SRC}, $self->path(),
# spent 0s making 3 calls to File::Spec::Win32::path, avg 0s/call
1901 $Config{binexp})
1902 {
19031560s push @defpath, $component if defined $component;
1904 }
1905
1906 # Build up a set of file names (not command names).
190730s30s my $thisperl = $self->canonpath($^X);
# spent 0s making 3 calls to File::Spec::Win32::canonpath, avg 0s/call
190830s60s $thisperl .= $Config{exe_ext} unless
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:regcomp, avg 0s/call
1909 $Is{VMS} ? $thisperl =~ m/$Config{exe_ext}(;\d+)?$/i
1910
1911 : $thisperl =~ m/$Config{exe_ext}$/i;
1912
1913 # We need a relative path to perl when in the core.
191430s $thisperl = $self->abs2rel($thisperl) if $self->{PERL_CORE};
1915
191630s my @perls = ($thisperl);
191730s push @perls, map { "$_$Config{exe_ext}" }
1918 ("perl$Config{version}", 'perl5', 'perl');
1919
1920 # miniperl has priority over all but the canonical perl when in the
1921 # core. Otherwise its a last resort.
192230s my $miniperl = "miniperl$Config{exe_ext}";
192330s if( $self->{PERL_CORE} ) {
1924 splice @perls, 1, 0, $miniperl;
1925 }
1926 else {
192730s push @perls, $miniperl;
1928 }
1929
193030s193.6ms $self->{PERL} ||=
# spent 93.6ms making 1 call to ExtUtils::MM_Unix::find_perl
1931 $self->find_perl(5.0, \@perls, \@defpath, $Verbose );
1932
193330s my $perl = $self->{PERL};
193430s30s $perl =~ s/^"//;
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
193530s30s my $has_mcr = $perl =~ s/^MCR\s*//;
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
193630s my $perlflags = '';
193730s my $stripped_perl;
193830s while ($perl) {
193930s30s ($stripped_perl = $perl) =~ s/"$//;
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
194030s30s last if -x $stripped_perl;
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:fteexec, avg 0s/call
1941 last unless $perl =~ s/(\s+\S+)$//;
1942 $perlflags = $1.$perlflags;
1943 }
194430s $self->{PERL} = $stripped_perl;
194530s $self->{PERL} = 'MCR '.$self->{PERL} if $has_mcr || $Is{VMS};
1946
1947 # When built for debugging, VMS doesn't create perl.exe but ndbgperl.exe.
194830s my $perl_name = 'perl';
194930s $perl_name = 'ndbgperl' if $Is{VMS} &&
1950 defined $Config{usevmsdebug} && $Config{usevmsdebug} eq 'define';
1951
1952 # XXX This logic is flawed. If "miniperl" is anywhere in the path
1953 # it will get confused. It should be fixed to work only on the filename.
1954 # Define 'FULLPERL' to be a non-miniperl (used in test: target)
195530s unless ($self->{FULLPERL}) {
195610s20s ($self->{FULLPERL} = $self->{PERL}) =~ s/\Q$miniperl\E$/$perl_name$Config{exe_ext}/i;
# spent 0s making 1 call to ExtUtils::MM_Unix::CORE:regcomp # spent 0s making 1 call to ExtUtils::MM_Unix::CORE:subst
195710s $self->{FULLPERL} = qq{"$self->{FULLPERL}"}.$perlflags;
1958 }
1959 # Can't have an image name with quotes, and findperl will have
1960 # already escaped spaces.
196130s $self->{FULLPERL} =~ tr/"//d if $Is{VMS};
1962
1963 # Little hack to get around VMS's find_perl putting "MCR" in front
1964 # sometimes.
196530s $self->{ABSPERL} = $self->{PERL};
196630s30s $has_mcr = $self->{ABSPERL} =~ s/^MCR\s*//;
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
196730s30s if( $self->file_name_is_absolute($self->{ABSPERL}) ) {
# spent 0s making 3 calls to File::Spec::Win32::file_name_is_absolute, avg 0s/call
1968 $self->{ABSPERL} = '$(PERL)';
1969 }
1970 else {
1971 $self->{ABSPERL} = $self->rel2abs($self->{ABSPERL});
1972
1973 # Quote the perl command if it contains whitespace
1974 $self->{ABSPERL} = $self->quote_literal($self->{ABSPERL})
1975 if $self->{ABSPERL} =~ /\s/;
1976
1977 $self->{ABSPERL} = 'MCR '.$self->{ABSPERL} if $has_mcr;
1978 }
197930s $self->{PERL} = qq{"$self->{PERL}"}.$perlflags;
1980
1981 # Can't have an image name with quotes, and findperl will have
1982 # already escaped spaces.
198330s $self->{PERL} =~ tr/"//d if $Is{VMS};
1984
1985 # Are we building the core?
198630s $self->{PERL_CORE} = $ENV{PERL_CORE} unless exists $self->{PERL_CORE};
198730s $self->{PERL_CORE} = 0 unless defined $self->{PERL_CORE};
1988
1989 # How do we run perl?
199030s foreach my $perl (qw(PERL FULLPERL ABSPERL)) {
199190s my $run = $perl.'RUN';
1992
199390s $self->{$run} = qq{\$($perl)};
1994
1995 # Make sure perl can find itself before it's installed.
199690s $self->{$run} .= q{ "-I$(PERL_LIB)" "-I$(PERL_ARCHLIB)"}
1997 if $self->{UNINSTALLED_PERL} || $self->{PERL_CORE};
1998
199990s $self->{$perl.'RUNINST'} =
2000 sprintf q{$(%sRUN)%s "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"},
2001 $perl, $perlflags;
2002 }
2003
200430s return 1;
2005}
2006
2007
2008=item init_platform
2009
2010=item platform_constants
2011
2012Add MM_Unix_VERSION.
2013
2014=cut
2015
2016sub init_platform {
2017 my($self) = shift;
2018
2019 $self->{MM_Unix_VERSION} = $VERSION;
2020 $self->{PERL_MALLOC_DEF} = '-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc '.
2021 '-Dfree=Perl_mfree -Drealloc=Perl_realloc '.
2022 '-Dcalloc=Perl_calloc';
2023
2024}
2025
2026sub platform_constants {
2027 my($self) = shift;
2028 my $make_frag = '';
2029
2030 foreach my $macro (qw(MM_Unix_VERSION PERL_MALLOC_DEF))
2031 {
2032 next unless defined $self->{$macro};
2033 $make_frag .= "$macro = $self->{$macro}\n";
2034 }
2035
2036 return $make_frag;
2037}
2038
2039
2040=item init_PERM
2041
2042 $mm->init_PERM
2043
2044Called by init_main. Initializes PERL_*
2045
2046=cut
2047
2048
# spent 0s within ExtUtils::MM_Unix::init_PERM which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 673 of ExtUtils/MakeMaker.pm, avg 0s/call
sub init_PERM {
204930s my($self) = shift;
2050
205130s $self->{PERM_DIR} = 755 unless defined $self->{PERM_DIR};
205230s $self->{PERM_RW} = 644 unless defined $self->{PERM_RW};
205330s $self->{PERM_RWX} = 755 unless defined $self->{PERM_RWX};
2054
205530s return 1;
2056}
2057
2058
2059=item init_xs
2060
2061 $mm->init_xs
2062
2063Sets up macros having to do with XS code. Currently just INST_STATIC,
2064INST_DYNAMIC and INST_BOOT.
2065
2066=cut
2067
2068
# spent 15.6ms (0s+15.6) within ExtUtils::MM_Unix::init_xs which was called 3 times, avg 5.20ms/call: # 3 times (0s+15.6ms) by ExtUtils::MakeMaker::new at line 659 of ExtUtils/MakeMaker.pm, avg 5.20ms/call
sub init_xs {
206930s my $self = shift;
2070
207130s30s if ($self->has_link_code()) {
# spent 0s making 3 calls to ExtUtils::MM_Unix::has_link_code, avg 0s/call
207230s315.6ms $self->{INST_STATIC} =
# spent 15.6ms making 3 calls to ExtUtils::MM_Any::catfile, avg 5.20ms/call
2073 $self->catfile('$(INST_ARCHAUTODIR)', '$(BASEEXT)$(LIB_EXT)');
207430s30s $self->{INST_DYNAMIC} =
# spent 0s making 3 calls to ExtUtils::MM_Any::catfile, avg 0s/call
2075 $self->catfile('$(INST_ARCHAUTODIR)', '$(DLBASE).$(DLEXT)');
207630s30s $self->{INST_BOOT} =
# spent 0s making 3 calls to ExtUtils::MM_Any::catfile, avg 0s/call
2077 $self->catfile('$(INST_ARCHAUTODIR)', '$(BASEEXT).bs');
2078 } else {
2079 $self->{INST_STATIC} = '';
2080 $self->{INST_DYNAMIC} = '';
2081 $self->{INST_BOOT} = '';
2082 }
2083}
2084
2085=item install (o)
2086
2087Defines the install target.
2088
2089=cut
2090
2091
# spent 0s within ExtUtils::MM_Unix::install which was called: # once (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm
sub install {
209210s my($self, %attribs) = @_;
209310s my(@m);
2094
209510s push @m, q{
2096install :: pure_install doc_install
2097 $(NOECHO) $(NOOP)
2098
2099install_perl :: pure_perl_install doc_perl_install
2100 $(NOECHO) $(NOOP)
2101
2102install_site :: pure_site_install doc_site_install
2103 $(NOECHO) $(NOOP)
2104
2105install_vendor :: pure_vendor_install doc_vendor_install
2106 $(NOECHO) $(NOOP)
2107
2108pure_install :: pure_$(INSTALLDIRS)_install
2109 $(NOECHO) $(NOOP)
2110
2111doc_install :: doc_$(INSTALLDIRS)_install
2112 $(NOECHO) $(NOOP)
2113
2114pure__install : pure_site_install
2115 $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
2116
2117doc__install : doc_site_install
2118 $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
2119
2120pure_perl_install :: all
2121 $(NOECHO) $(MOD_INSTALL) \
2122};
2123
212410s20s push @m,
# spent 0s making 2 calls to ExtUtils::MM_Any::catfile, avg 0s/call
2125q{ read "}.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{" \
2126 write "}.$self->catfile('$(DESTINSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').q{" \
2127} unless $self->{NO_PACKLIST};
2128
212910s10s push @m,
# spent 0s making 1 call to File::Spec::Win32::catdir
2130q{ "$(INST_LIB)" "$(DESTINSTALLPRIVLIB)" \
2131 "$(INST_ARCHLIB)" "$(DESTINSTALLARCHLIB)" \
2132 "$(INST_BIN)" "$(DESTINSTALLBIN)" \
2133 "$(INST_SCRIPT)" "$(DESTINSTALLSCRIPT)" \
2134 "$(INST_MAN1DIR)" "$(DESTINSTALLMAN1DIR)" \
2135 "$(INST_MAN3DIR)" "$(DESTINSTALLMAN3DIR)"
2136 $(NOECHO) $(WARN_IF_OLD_PACKLIST) \
2137 "}.$self->catdir('$(SITEARCHEXP)','auto','$(FULLEXT)').q{"
2138
2139
2140pure_site_install :: all
2141 $(NOECHO) $(MOD_INSTALL) \
2142};
214310s20s push @m,
# spent 0s making 2 calls to ExtUtils::MM_Any::catfile, avg 0s/call
2144q{ read "}.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{" \
2145 write "}.$self->catfile('$(DESTINSTALLSITEARCH)','auto','$(FULLEXT)','.packlist').q{" \
2146} unless $self->{NO_PACKLIST};
2147
214810s10s push @m,
# spent 0s making 1 call to File::Spec::Win32::catdir
2149q{ "$(INST_LIB)" "$(DESTINSTALLSITELIB)" \
2150 "$(INST_ARCHLIB)" "$(DESTINSTALLSITEARCH)" \
2151 "$(INST_BIN)" "$(DESTINSTALLSITEBIN)" \
2152 "$(INST_SCRIPT)" "$(DESTINSTALLSITESCRIPT)" \
2153 "$(INST_MAN1DIR)" "$(DESTINSTALLSITEMAN1DIR)" \
2154 "$(INST_MAN3DIR)" "$(DESTINSTALLSITEMAN3DIR)"
2155 $(NOECHO) $(WARN_IF_OLD_PACKLIST) \
2156 "}.$self->catdir('$(PERL_ARCHLIB)','auto','$(FULLEXT)').q{"
2157
2158pure_vendor_install :: all
2159 $(NOECHO) $(MOD_INSTALL) \
2160};
216110s20s push @m,
# spent 0s making 2 calls to ExtUtils::MM_Any::catfile, avg 0s/call
2162q{ read "}.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{" \
2163 write "}.$self->catfile('$(DESTINSTALLVENDORARCH)','auto','$(FULLEXT)','.packlist').q{" \
2164} unless $self->{NO_PACKLIST};
2165
216610s push @m,
2167q{ "$(INST_LIB)" "$(DESTINSTALLVENDORLIB)" \
2168 "$(INST_ARCHLIB)" "$(DESTINSTALLVENDORARCH)" \
2169 "$(INST_BIN)" "$(DESTINSTALLVENDORBIN)" \
2170 "$(INST_SCRIPT)" "$(DESTINSTALLVENDORSCRIPT)" \
2171 "$(INST_MAN1DIR)" "$(DESTINSTALLVENDORMAN1DIR)" \
2172 "$(INST_MAN3DIR)" "$(DESTINSTALLVENDORMAN3DIR)"
2173
2174};
2175
217610s push @m, q{
2177doc_perl_install :: all
2178 $(NOECHO) $(NOOP)
2179
2180doc_site_install :: all
2181 $(NOECHO) $(NOOP)
2182
2183doc_vendor_install :: all
2184 $(NOECHO) $(NOOP)
2185
2186} if $self->{NO_PERLLOCAL};
2187
218810s30s push @m, q{
# spent 0s making 3 calls to ExtUtils::MM_Any::catfile, avg 0s/call
2189doc_perl_install :: all
2190 $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod"
2191 -$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)"
2192 -$(NOECHO) $(DOC_INSTALL) \
2193 "Module" "$(NAME)" \
2194 "installed into" $(INSTALLPRIVLIB) \
2195 LINKTYPE "$(LINKTYPE)" \
2196 VERSION "$(VERSION)" \
2197 EXE_FILES "$(EXE_FILES)" \
2198 >> "}.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{"
2199
2200doc_site_install :: all
2201 $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod"
2202 -$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)"
2203 -$(NOECHO) $(DOC_INSTALL) \
2204 "Module" "$(NAME)" \
2205 "installed into" $(INSTALLSITELIB) \
2206 LINKTYPE "$(LINKTYPE)" \
2207 VERSION "$(VERSION)" \
2208 EXE_FILES "$(EXE_FILES)" \
2209 >> "}.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{"
2210
2211doc_vendor_install :: all
2212 $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod"
2213 -$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)"
2214 -$(NOECHO) $(DOC_INSTALL) \
2215 "Module" "$(NAME)" \
2216 "installed into" $(INSTALLVENDORLIB) \
2217 LINKTYPE "$(LINKTYPE)" \
2218 VERSION "$(VERSION)" \
2219 EXE_FILES "$(EXE_FILES)" \
2220 >> "}.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{"
2221
2222} unless $self->{NO_PERLLOCAL};
2223
222410s30s push @m, q{
# spent 0s making 3 calls to ExtUtils::MM_Any::catfile, avg 0s/call
2225uninstall :: uninstall_from_$(INSTALLDIRS)dirs
2226 $(NOECHO) $(NOOP)
2227
2228uninstall_from_perldirs ::
2229 $(NOECHO) $(UNINSTALL) "}.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{"
2230
2231uninstall_from_sitedirs ::
2232 $(NOECHO) $(UNINSTALL) "}.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{"
2233
2234uninstall_from_vendordirs ::
2235 $(NOECHO) $(UNINSTALL) "}.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{"
2236};
2237
223810s join("",@m);
2239}
2240
2241=item installbin (o)
2242
2243Defines targets to make and to install EXE_FILES.
2244
2245=cut
2246
2247
# spent 0s within ExtUtils::MM_Unix::installbin which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub installbin {
224830s my($self) = shift;
2249
225030s return "" unless $self->{EXE_FILES} && ref $self->{EXE_FILES} eq "ARRAY";
2251 my @exefiles = @{$self->{EXE_FILES}};
2252 return "" unless @exefiles;
2253
2254 @exefiles = map vmsify($_), @exefiles if $Is{VMS};
2255
2256 my %fromto;
2257 for my $from (@exefiles) {
2258 my($path)= $self->catfile('$(INST_SCRIPT)', basename($from));
2259
2260 local($_) = $path; # for backwards compatibility
2261 my $to = $self->libscan($path);
2262 print "libscan($from) => '$to'\n" if ($Verbose >=2);
2263
2264 $to = vmsify($to) if $Is{VMS};
2265 $fromto{$from} = $to;
2266 }
2267 my @to = values %fromto;
2268
2269 my @m;
2270 push(@m, qq{
2271EXE_FILES = @exefiles
2272
2273pure_all :: @to
2274 \$(NOECHO) \$(NOOP)
2275
2276realclean ::
2277});
2278
2279 # realclean can get rather large.
2280 push @m, map "\t$_\n", $self->split_command('$(RM_F)', @to);
2281 push @m, "\n";
2282
2283
2284 # A target for each exe file.
2285 while (my($from,$to) = each %fromto) {
2286 last unless defined $from;
2287
2288 push @m, sprintf <<'MAKE', $to, $from, $to, $from, $to, $to, $to;
2289%s : %s $(FIRST_MAKEFILE) $(INST_SCRIPT)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists
2290 $(NOECHO) $(RM_F) %s
2291 $(CP) %s %s
2292 $(FIXIN) %s
2293 -$(NOECHO) $(CHMOD) $(PERM_RWX) %s
2294
2295MAKE
2296
2297 }
2298
2299 join "", @m;
2300}
2301
2302
2303=item linkext (o)
2304
2305Defines the linkext target which in turn defines the LINKTYPE.
2306
2307=cut
2308
2309
# spent 0s within ExtUtils::MM_Unix::linkext which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub linkext {
231030s my($self, %attribs) = @_;
2311 # LINKTYPE => static or dynamic or ''
231230s my($linktype) = defined $attribs{LINKTYPE} ?
2313 $attribs{LINKTYPE} : '$(LINKTYPE)';
231430s "
2315linkext :: $linktype
2316 \$(NOECHO) \$(NOOP)
2317";
2318}
2319
2320=item lsdir
2321
2322Takes as arguments a directory name and a regular expression. Returns
2323all entries in the directory that match the regular expression.
2324
2325=cut
2326
2327
# spent 0s within ExtUtils::MM_Unix::lsdir which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1309, avg 0s/call
sub lsdir {
232830s my($self) = shift;
232930s my($dir, $regex) = @_;
233030s my(@ls);
233130s30s my $dh = new DirHandle;
# spent 0s making 3 calls to DirHandle::new, avg 0s/call
233230s30s $dh->open($dir || ".") or return ();
# spent 0s making 3 calls to DirHandle::open, avg 0s/call
233330s30s @ls = $dh->read;
# spent 0s making 3 calls to DirHandle::read, avg 0s/call
233430s30s $dh->close;
# spent 0s making 3 calls to DirHandle::close, avg 0s/call
233530s @ls = grep(/$regex/, @ls) if $regex;
233630s @ls;
2337}
2338
2339=item macro (o)
2340
2341Simple subroutine to insert the macros defined by the macro attribute
2342into the Makefile.
2343
2344=cut
2345
2346
# spent 0s within ExtUtils::MM_Unix::macro which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub macro {
234730s my($self,%attribs) = @_;
234830s my(@m,$key,$val);
234930s while (($key,$val) = each %attribs){
2350 last unless defined $key;
2351 push @m, "$key = $val\n";
2352 }
235330s join "", @m;
2354}
2355
2356=item makeaperl (o)
2357
2358Called by staticmake. Defines how to write the Makefile to produce a
2359static new perl.
2360
2361By default the Makefile produced includes all the static extensions in
2362the perl library. (Purified versions of library files, e.g.,
2363DynaLoader_pure_p1_c0_032.a are automatically ignored to avoid link errors.)
2364
2365=cut
2366
2367
# spent 0s within ExtUtils::MM_Unix::makeaperl which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Unix::staticmake at line 3407, avg 0s/call
sub makeaperl {
236830s my($self, %attribs) = @_;
236930s my($makefilename, $searchdirs, $static, $extra, $perlinc, $target, $tmp, $libperl) =
2370 @attribs{qw(MAKE DIRS STAT EXTRA INCL TARGET TMP LIBPERL)};
237130s my(@m);
237230s push @m, "
2373# --- MakeMaker makeaperl section ---
2374MAP_TARGET = $target
2375FULLPERL = $self->{FULLPERL}
2376";
237730s return join '', @m if $self->{PARENT};
2378
237910s my($dir) = join ":", @{$self->{DIR}};
2380
238110s unless ($self->{MAKEAPERL}) {
238210s push @m, q{
2383$(MAP_TARGET) :: static $(MAKE_APERL_FILE)
2384 $(MAKE) $(USEMAKEFILE) $(MAKE_APERL_FILE) $@
2385
2386$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) pm_to_blib
2387 $(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET)
2388 $(NOECHO) $(PERLRUNINST) \
2389 Makefile.PL DIR="}, $dir, q{" \
2390 MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
2391 MAKEAPERL=1 NORECURS=1 CCCDLFLAGS=};
2392
239310s foreach (@ARGV){
2394 if( /\s/ ){
2395 s/=(.*)/='$1'/;
2396 }
2397 push @m, " \\\n\t\t$_";
2398 }
2399# push @m, map( " \\\n\t\t$_", @ARGV );
240010s push @m, "\n";
2401
240210s return join '', @m;
2403 }
2404
- -
2407 my($cccmd, $linkcmd, $lperl);
2408
2409
2410 $cccmd = $self->const_cccmd($libperl);
2411 $cccmd =~ s/^CCCMD\s*=\s*//;
2412 $cccmd =~ s/\$\(INC\)/ "-I$self->{PERL_INC}" /;
2413 $cccmd .= " $Config{cccdlflags}"
2414 if ($Config{useshrplib} eq 'true');
2415 $cccmd =~ s/\(CC\)/\(PERLMAINCC\)/;
2416
2417 # The front matter of the linkcommand...
2418 $linkcmd = join ' ', "\$(CC)",
2419 grep($_, @Config{qw(ldflags ccdlflags)});
2420 $linkcmd =~ s/\s+/ /g;
2421 $linkcmd =~ s,(perl\.exp),\$(PERL_INC)/$1,;
2422
2423 # Which *.a files could we make use of...
2424 my %static;
2425 require File::Find;
2426 File::Find::find(sub {
2427 return unless m/\Q$self->{LIB_EXT}\E$/;
2428
2429 # Skip perl's libraries.
2430 return if m/^libperl/ or m/^perl\Q$self->{LIB_EXT}\E$/;
2431
2432 # Skip purified versions of libraries
2433 # (e.g., DynaLoader_pure_p1_c0_032.a)
2434 return if m/_pure_\w+_\w+_\w+\.\w+$/ and -f "$File::Find::dir/.pure";
2435
2436 if( exists $self->{INCLUDE_EXT} ){
2437 my $found = 0;
2438
2439 (my $xx = $File::Find::name) =~ s,.*?/auto/,,s;
2440 $xx =~ s,/?$_,,;
2441 $xx =~ s,/,::,g;
2442
2443 # Throw away anything not explicitly marked for inclusion.
2444 # DynaLoader is implied.
2445 foreach my $incl ((@{$self->{INCLUDE_EXT}},'DynaLoader')){
2446 if( $xx eq $incl ){
2447 $found++;
2448 last;
2449 }
2450 }
2451 return unless $found;
2452 }
2453 elsif( exists $self->{EXCLUDE_EXT} ){
2454 (my $xx = $File::Find::name) =~ s,.*?/auto/,,s;
2455 $xx =~ s,/?$_,,;
2456 $xx =~ s,/,::,g;
2457
2458 # Throw away anything explicitly marked for exclusion
2459 foreach my $excl (@{$self->{EXCLUDE_EXT}}){
2460 return if( $xx eq $excl );
2461 }
2462 }
2463
2464 # don't include the installed version of this extension. I
2465 # leave this line here, although it is not necessary anymore:
2466 # I patched minimod.PL instead, so that Miniperl.pm won't
2467 # include duplicates
2468
2469 # Once the patch to minimod.PL is in the distribution, I can
2470 # drop it
2471 return if $File::Find::name =~ m:auto/$self->{FULLEXT}/$self->{BASEEXT}$self->{LIB_EXT}\z:;
247220s20s
# spent 0s within ExtUtils::MM_Unix::BEGIN@2472 which was called: # once (0s+0s) by main::BEGIN@1 at line 2472
use Cwd 'cwd';
# spent 0s making 1 call to Exporter::import # spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@2472
2473 $static{cwd() . "/" . $_}++;
2474 }, grep( -d $_, @{$searchdirs || []}) );
2475
2476 # We trust that what has been handed in as argument, will be buildable
2477 $static = [] unless $static;
2478 @static{@{$static}} = (1) x @{$static};
2479
2480 $extra = [] unless $extra && ref $extra eq 'ARRAY';
2481 for (sort keys %static) {
2482 next unless /\Q$self->{LIB_EXT}\E\z/;
2483 $_ = dirname($_) . "/extralibs.ld";
2484 push @$extra, $_;
2485 }
2486
2487 s/^(.*)/"-I$1"/ for @{$perlinc || []};
2488
2489 $target ||= "perl";
2490 $tmp ||= ".";
2491
2492# MAP_STATIC doesn't look into subdirs yet. Once "all" is made and we
2493# regenerate the Makefiles, MAP_STATIC and the dependencies for
2494# extralibs.all are computed correctly
2495 push @m, "
2496MAP_LINKCMD = $linkcmd
2497MAP_PERLINC = @{$perlinc || []}
2498MAP_STATIC = ",
2499join(" \\\n\t", reverse sort keys %static), "
2500
2501MAP_PRELIBS = $Config{perllibs} $Config{cryptlib}
2502";
2503
2504 if (defined $libperl) {
2505 ($lperl = $libperl) =~ s/\$\(A\)/$self->{LIB_EXT}/;
2506 }
2507 unless ($libperl && -f $lperl) { # Ilya's code...
2508 my $dir = $self->{PERL_SRC} || "$self->{PERL_ARCHLIB}/CORE";
2509 $dir = "$self->{PERL_ARCHLIB}/.." if $self->{UNINSTALLED_PERL};
2510 $libperl ||= "libperl$self->{LIB_EXT}";
2511 $libperl = "$dir/$libperl";
2512 $lperl ||= "libperl$self->{LIB_EXT}";
2513 $lperl = "$dir/$lperl";
2514
2515 if (! -f $libperl and ! -f $lperl) {
2516 # We did not find a static libperl. Maybe there is a shared one?
2517 if ($Is{SunOS}) {
2518 $lperl = $libperl = "$dir/$Config{libperl}";
2519 # SUNOS ld does not take the full path to a shared library
2520 $libperl = '' if $Is{SunOS4};
2521 }
2522 }
2523
2524 print "Warning: $libperl not found
2525 If you're going to build a static perl binary, make sure perl is installed
2526 otherwise ignore this warning\n"
2527 unless (-f $lperl || defined($self->{PERL_SRC}));
2528 }
2529
2530 # SUNOS ld does not take the full path to a shared library
2531 my $llibperl = $libperl ? '$(MAP_LIBPERL)' : '-lperl';
2532
2533 push @m, "
2534MAP_LIBPERL = $libperl
2535LLIBPERL = $llibperl
2536";
2537
2538 push @m, '
2539$(INST_ARCHAUTODIR)/extralibs.all : $(INST_ARCHAUTODIR)$(DFSEP).exists '.join(" \\\n\t", @$extra).'
2540 $(NOECHO) $(RM_F) $@
2541 $(NOECHO) $(TOUCH) $@
2542';
2543
2544 foreach my $catfile (@$extra){
2545 push @m, "\tcat $catfile >> \$\@\n";
2546 }
2547
2548push @m, "
2549\$(MAP_TARGET) :: $tmp/perlmain\$(OBJ_EXT) \$(MAP_LIBPERL) \$(MAP_STATIC) \$(INST_ARCHAUTODIR)/extralibs.all
2550 \$(MAP_LINKCMD) -o \$\@ \$(OPTIMIZE) $tmp/perlmain\$(OBJ_EXT) \$(LDFROM) \$(MAP_STATIC) \$(LLIBPERL) `cat \$(INST_ARCHAUTODIR)/extralibs.all` \$(MAP_PRELIBS)
2551 \$(NOECHO) \$(ECHO) 'To install the new \"\$(MAP_TARGET)\" binary, call'
2552 \$(NOECHO) \$(ECHO) ' \$(MAKE) \$(USEMAKEFILE) $makefilename inst_perl MAP_TARGET=\$(MAP_TARGET)'
2553 \$(NOECHO) \$(ECHO) 'To remove the intermediate files say'
2554 \$(NOECHO) \$(ECHO) ' \$(MAKE) \$(USEMAKEFILE) $makefilename map_clean'
2555
2556$tmp/perlmain\$(OBJ_EXT): $tmp/perlmain.c
2557";
2558 push @m, "\t".$self->cd($tmp, qq[$cccmd "-I\$(PERL_INC)" perlmain.c])."\n";
2559
2560 push @m, qq{
2561$tmp/perlmain.c: $makefilename}, q{
2562 $(NOECHO) $(ECHO) Writing $@
2563 $(NOECHO) $(PERL) $(MAP_PERLINC) "-MExtUtils::Miniperl" \\
2564 -e "writemain(grep s#.*/auto/##s, split(q| |, q|$(MAP_STATIC)|))" > $@t && $(MV) $@t $@
2565
2566};
2567 push @m, "\t", q{$(NOECHO) $(PERL) "$(INSTALLSCRIPT)/fixpmain"
2568} if (defined (&Dos::UseLFN) && Dos::UseLFN()==0);
2569
2570
2571 push @m, q{
2572doc_inst_perl :
2573 $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod"
2574 -$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)"
2575 -$(NOECHO) $(DOC_INSTALL) \
2576 "Perl binary" "$(MAP_TARGET)" \
2577 MAP_STATIC "$(MAP_STATIC)" \
2578 MAP_EXTRA "`cat $(INST_ARCHAUTODIR)/extralibs.all`" \
2579 MAP_LIBPERL "$(MAP_LIBPERL)" \
2580 >> "}.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{"
2581
2582};
2583
2584 push @m, q{
2585inst_perl : pure_inst_perl doc_inst_perl
2586
2587pure_inst_perl : $(MAP_TARGET)
2588 }.$self->{CP}.q{ $(MAP_TARGET) "}.$self->catfile('$(DESTINSTALLBIN)','$(MAP_TARGET)').q{"
2589
2590clean :: map_clean
2591
2592map_clean :
2593 }.$self->{RM_F}.qq{ $tmp/perlmain\$(OBJ_EXT) $tmp/perlmain.c \$(MAP_TARGET) $makefilename \$(INST_ARCHAUTODIR)/extralibs.all
2594};
2595
2596 join '', @m;
2597}
2598
2599=item makefile (o)
2600
2601Defines how to rewrite the Makefile.
2602
2603=cut
2604
2605sub makefile {
2606 my($self) = shift;
2607 my $m;
2608 # We do not know what target was originally specified so we
2609 # must force a manual rerun to be sure. But as it should only
2610 # happen very rarely it is not a significant problem.
2611 $m = '
2612$(OBJECT) : $(FIRST_MAKEFILE)
2613
2614' if $self->{OBJECT};
2615
2616 my $newer_than_target = $Is{VMS} ? '$(MMS$SOURCE_LIST)' : '$?';
2617 my $mpl_args = join " ", map qq["$_"], @ARGV;
2618 my $cross = '';
2619 if (defined $::Cross::platform) {
2620 # Inherited from win32/buildext.pl
2621 $cross = "-MCross=$::Cross::platform ";
2622 }
2623 $m .= sprintf <<'MAKE_FRAG', $newer_than_target, $cross, $mpl_args;
2624# We take a very conservative approach here, but it's worth it.
2625# We move Makefile to Makefile.old here to avoid gnu make looping.
2626$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
2627 $(NOECHO) $(ECHO) "Makefile out-of-date with respect to %s"
2628 $(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
2629 -$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
2630 -$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
2631 - $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
2632 $(PERLRUN) %sMakefile.PL %s
2633 $(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
2634 $(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <=="
2635 $(FALSE)
2636
2637MAKE_FRAG
2638
2639 return $m;
2640}
2641
2642
2643=item maybe_command
2644
2645Returns true, if the argument is likely to be a command.
2646
2647=cut
2648
2649sub maybe_command {
2650 my($self,$file) = @_;
2651 return $file if -x $file && ! -d $file;
2652 return;
2653}
2654
2655
2656=item needs_linking (o)
2657
2658Does this module need linking? Looks into subdirectory objects (see
2659also has_link_code())
2660
2661=cut
2662
2663
# spent 0s within ExtUtils::MM_Unix::needs_linking which was called 30 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Unix::c_o at line 131, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::const_loadlibs at line 355, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::cflags at line 185, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::test at line 3532, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::const_cccmd at line 310, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::xs_c at line 3717, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::tool_xsubpp at line 3579, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::perldepend at line 2881, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Win32::dynamic_lib at line 335 of ExtUtils/MM_Win32.pm, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Win32::cflags at line 634 of ExtUtils/MM_Win32.pm, avg 0s/call
sub needs_linking {
2664300s my($self) = shift;
2665
2666300s my $caller = (caller(0))[3];
2667300s300s confess("needs_linking called too early") if
# spent 0s making 30 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call
2668 $caller =~ /^ExtUtils::MakeMaker::/;
2669300s return $self->{NEEDS_LINKING} if defined $self->{NEEDS_LINKING};
267030s30s if ($self->has_link_code or $self->{MAKEAPERL}){
# spent 0s making 3 calls to ExtUtils::MM_Unix::has_link_code, avg 0s/call
267130s $self->{NEEDS_LINKING} = 1;
267230s return 1;
2673 }
2674 foreach my $child (keys %{$self->{CHILDREN}}) {
2675 if ($self->{CHILDREN}->{$child}->needs_linking) {
2676 $self->{NEEDS_LINKING} = 1;
2677 return 1;
2678 }
2679 }
2680 return $self->{NEEDS_LINKING} = 0;
2681}
2682
2683
2684=item parse_abstract
2685
2686parse a file and return what you think is the ABSTRACT
2687
2688=cut
2689
2690sub parse_abstract {
2691 my($self,$parsefile) = @_;
2692 my $result;
2693
2694 local $/ = "\n";
2695 open(my $fh, '<', $parsefile) or die "Could not open '$parsefile': $!";
2696 my $inpod = 0;
2697 my $pod_encoding;
2698 my $package = $self->{DISTNAME};
2699 $package =~ s/-/::/g;
2700 while (<$fh>) {
2701 $inpod = /^=(?!cut)/ ? 1 : /^=cut/ ? 0 : $inpod;
2702 next if !$inpod;
2703 chop;
2704
2705 if ( /^=encoding\s*(.*)$/i ) {
2706 $pod_encoding = $1;
2707 }
2708
2709 if ( /^($package(?:\.pm)? \s+ -+ \s+)(.*)/x ) {
2710 $result = $2;
2711 next;
2712 }
2713 next unless $result;
2714
2715 if ( $result && ( /^\s*$/ || /^\=/ ) ) {
2716 last;
2717 }
2718 $result = join ' ', $result, $_;
2719 }
2720 close $fh;
2721
2722 if ( $pod_encoding and !( $] < 5.008 or !$Config{useperlio} ) ) {
2723 # Have to wrap in an eval{} for when running under PERL_CORE
2724 # Encode isn't available during build phase and parsing
2725 # ABSTRACT isn't important there
2726 eval {
2727 require Encode;
2728 $result = Encode::decode($pod_encoding, $result);
2729 }
2730 }
2731
2732 return $result;
2733}
2734
2735=item parse_version
2736
2737 my $version = MM->parse_version($file);
2738
2739Parse a $file and return what $VERSION is set to by the first assignment.
2740It will return the string "undef" if it can't figure out what $VERSION
2741is. $VERSION should be for all to see, so C<our $VERSION> or plain $VERSION
2742are okay, but C<my $VERSION> is not.
2743
2744C<<package Foo VERSION>> is also checked for. The first version
2745declaration found is used, but this may change as it differs from how
2746Perl does it.
2747
2748parse_version() will try to C<use version> before checking for
2749C<$VERSION> so the following will work.
2750
2751 $VERSION = qv(1.2.3);
2752
2753=cut
2754
2755
# spent 15.6ms within ExtUtils::MM_Unix::parse_version which was called 3 times, avg 5.20ms/call: # 3 times (15.6ms+0s) by ExtUtils::MM_Any::init_VERSION at line 2113 of ExtUtils/MM_Any.pm, avg 5.20ms/call
sub parse_version {
275630s my($self,$parsefile) = @_;
275730s my $result;
2758
275930s local $/ = "\n";
276030s local $_;
276130s30s open(my $fh, '<', $parsefile) or die "Could not open '$parsefile': $!";
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:open, avg 0s/call
276230s my $inpod = 0;
276330s1780s while (<$fh>) {
# spent 0s making 178 calls to ExtUtils::MM_Unix::CORE:readline, avg 0s/call
27641780s3560s $inpod = /^=(?!cut)/ ? 1 : /^=cut/ ? 0 : $inpod;
# spent 0s making 356 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call
276517815.6ms1780s next if $inpod || /^\s*#/;
# spent 0s making 178 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call
27661760s chop;
27671760s1760s next if /^\s*(if|unless|elsif)/;
# spent 0s making 176 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call
27681760s3520s if ( m{^ \s* package \s+ \w[\w\:\']* \s+ (v?[0-9._]+) \s* ; }x ) {
# spent 0s making 352 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call
2769 local $^W = 0;
2770 $result = $1;
2771 }
2772 elsif ( m{(?<!\\) ([\$*]) (([\w\:\']*) \bVERSION)\b .* (?<![<>=!])\=[^=]}x ) {
277330s30s $result = $self->get_version($parsefile, $1, $2);
# spent 0s making 3 calls to ExtUtils::MM_Unix::get_version, avg 0s/call
2774 }
2775 else {
27761730s next;
2777 }
277830s last if defined $result;
2779 }
278030s30s close $fh;
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:close, avg 0s/call
2781
278230s30s if ( defined $result && $result !~ /^v?[\d_\.]+$/ ) {
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call
2783 require version;
2784 my $normal = eval { version->new( $result ) };
2785 $result = $normal if defined $normal;
2786 }
278730s $result = "undef" unless defined $result;
278830s return $result;
2789}
2790
2791
# spent 0s within ExtUtils::MM_Unix::get_version which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Unix::parse_version at line 2773, avg 0s/call
sub get_version {
279230s my ($self, $parsefile, $sigil, $name) = @_;
279330s my $line = $_; # from the while() loop in parse_version
2794 {
279530s package ExtUtils::MakeMaker::_version;
279630s undef *version; # in case of unexpected version() sub
279730s eval {
279830s require version;
279930s30s version::->import;
# spent 0s making 3 calls to version::import, avg 0s/call
2800 };
2801215.6ms20s
# spent 0s within ExtUtils::MakeMaker::_version::BEGIN@2801 which was called: # once (0s+0s) by main::BEGIN@1 at line 2801
no strict;
# spent 0s making 1 call to ExtUtils::MakeMaker::_version::BEGIN@2801 # spent 0s making 1 call to strict::unimport
280230s local *{$name};
280330s local $^W = 0;
280430s30s $line = $1 if $line =~ m{^(.+)}s;
# spent 0s making 3 calls to ExtUtils::MakeMaker::_version::CORE:match, avg 0s/call
280530s eval($line); ## no critic
# spent 0s executing statements in string eval # spent 0s executing statements in 2 string evals (merged)
280630s return ${$name};
2807 }
2808}
2809
2810=item pasthru (o)
2811
2812Defines the string that is passed to recursive make calls in
2813subdirectories.
2814
2815=cut
2816
2817sub pasthru {
2818 my($self) = shift;
2819 my(@m);
2820
2821 my(@pasthru);
2822 my($sep) = $Is{VMS} ? ',' : '';
2823 $sep .= "\\\n\t";
2824
2825 foreach my $key (qw(LIB LIBPERL_A LINKTYPE OPTIMIZE
2826 PREFIX INSTALL_BASE)
2827 )
2828 {
2829 next unless defined $self->{$key};
2830 push @pasthru, "$key=\"\$($key)\"";
2831 }
2832
2833 foreach my $key (qw(DEFINE INC)) {
2834 next unless defined $self->{$key};
2835 push @pasthru, "PASTHRU_$key=\"\$(PASTHRU_$key)\"";
2836 }
2837
2838 push @m, "\nPASTHRU = ", join ($sep, @pasthru), "\n";
2839 join "", @m;
2840}
2841
2842=item perl_script
2843
2844Takes one argument, a file name, and returns the file name, if the
2845argument is likely to be a perl script. On MM_Unix this is true for
2846any ordinary, readable file.
2847
2848=cut
2849
2850sub perl_script {
2851 my($self,$file) = @_;
2852 return $file if -r $file && -f _;
2853 return;
2854}
2855
2856=item perldepend (o)
2857
2858Defines the dependency from all *.h files that come with the perl
2859distribution.
2860
2861=cut
2862
2863
# spent 562ms (0s+562) within ExtUtils::MM_Unix::perldepend which was called 3 times, avg 187ms/call: # 3 times (0s+562ms) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 187ms/call
sub perldepend {
286430s my($self) = shift;
286530s my(@m);
2866
286730s3562ms my $make_config = $self->cd('$(PERL_SRC)', '$(MAKE) lib/Config.pm');
# spent 562ms making 3 calls to ExtUtils::MM_Win32::cd, avg 187ms/call
2868
286930s push @m, sprintf <<'MAKE_FRAG', $make_config if $self->{PERL_SRC};
2870# Check for unpropogated config.sh changes. Should never happen.
2871# We do NOT just update config.h because that is not sufficient.
2872# An out of date config.h is not fatal but complains loudly!
2873$(PERL_INCDEP)/config.h: $(PERL_SRC)/config.sh
2874 -$(NOECHO) $(ECHO) "Warning: $(PERL_INC)/config.h out of date with $(PERL_SRC)/config.sh"; $(FALSE)
2875
2876$(PERL_ARCHLIB)/Config.pm: $(PERL_SRC)/config.sh
2877 $(NOECHO) $(ECHO) "Warning: $(PERL_ARCHLIB)/Config.pm may be out of date with $(PERL_SRC)/config.sh"
2878 %s
2879MAKE_FRAG
2880
288130s30s return join "", @m unless $self->needs_linking;
# spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call
2882
288330s30s if ($self->{OBJECT}) {
# spent 0s making 3 calls to ExtUtils::MM_Any::_perl_header_files_fragment, avg 0s/call
2884 # Need to add an object file dependency on the perl headers.
2885 # this is very important for XS modules in perl.git development.
2886 push @m, $self->_perl_header_files_fragment("/"); # Directory separator between $(PERL_INC)/header.h
2887 }
2888
288930s30s push @m, join(" ", sort values %{$self->{XS}})." : \$(XSUBPPDEPS)\n" if %{$self->{XS}};
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:sort, avg 0s/call
2890
289130s return join "\n", @m;
2892}
2893
2894
2895=item pm_to_blib
2896
2897Defines target that copies all files in the hash PM to their
2898destination and autosplits them. See L<ExtUtils::Install/DESCRIPTION>
2899
2900=cut
2901
2902
# spent 609ms (0s+609) within ExtUtils::MM_Unix::pm_to_blib which was called 3 times, avg 203ms/call: # 3 times (0s+609ms) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 203ms/call
sub pm_to_blib {
290330s my $self = shift;
290430s30s my($autodir) = $self->catdir('$(INST_LIB)','auto');
# spent 0s making 3 calls to File::Spec::Win32::catdir, avg 0s/call
290530s my $r = q{
2906pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM)
2907};
2908
2909 # VMS will swallow '' and PM_FILTER is often empty. So use q[]
291030s3609ms my $pm_to_blib = $self->oneliner(<<CODE, ['-MExtUtils::Install']);
# spent 609ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 203ms/call
2911pm_to_blib({\@ARGV}, '$autodir', q[\$(PM_FILTER)], '\$(PERM_DIR)')
2912CODE
2913
2914 my @cmds = $self->split_command($pm_to_blib,
291530s60s map { ($_, $self->{PM}->{$_}) } sort keys %{$self->{PM}});
# spent 0s making 3 calls to ExtUtils::MM_Any::split_command, avg 0s/call # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:sort, avg 0s/call
2916
291730s $r .= join '', map { "\t\$(NOECHO) $_\n" } @cmds;
291830s $r .= qq{\t\$(NOECHO) \$(TOUCH) pm_to_blib\n};
2919
292030s return $r;
2921}
2922
2923=item post_constants (o)
2924
2925Returns an empty string per default. Dedicated to overrides from
2926within Makefile.PL after all constants have been defined.
2927
2928=cut
2929
2930
# spent 0s within ExtUtils::MM_Unix::post_constants which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub post_constants{
293130s "";
2932}
2933
2934=item post_initialize (o)
2935
2936Returns an empty string per default. Used in Makefile.PLs to add some
2937chunk of text to the Makefile after the object is initialized.
2938
2939=cut
2940
2941
# spent 0s within ExtUtils::MM_Unix::post_initialize which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub post_initialize {
294230s "";
2943}
2944
2945=item postamble (o)
2946
2947Returns an empty string. Can be used in Makefile.PLs to write some
2948text to the Makefile at the end.
2949
2950=cut
2951
2952
# spent 0s within ExtUtils::MM_Unix::postamble which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub postamble {
295330s "";
2954}
2955
2956# transform dot-separated version string into comma-separated quadruple
2957# examples: '1.2.3.4.5' => '1,2,3,4'
2958# '1.2.3' => '1,2,3,0'
2959sub _ppd_version {
2960 my ($self, $string) = @_;
2961 return join ',', ((split /\./, $string), (0) x 4)[0..3];
2962}
2963
2964=item ppd
2965
2966Defines target that creates a PPD (Perl Package Description) file
2967for a binary distribution.
2968
2969=cut
2970
2971
# spent 4.45s (0+4.45) within ExtUtils::MM_Unix::ppd which was called 3 times, avg 1.48s/call: # 3 times (0s+4.45s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 1.48s/call
sub ppd {
297230s my($self) = @_;
2973
297430s my $abstract = $self->{ABSTRACT} || '';
297530s30s $abstract =~ s/\n/\\n/sg;
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
297630s30s $abstract =~ s/</&lt;/g;
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
297730s30s $abstract =~ s/>/&gt;/g;
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
2978
297930s my $author = join(', ',@{$self->{AUTHOR} || []});
298030s30s $author =~ s/</&lt;/g;
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
298130s30s $author =~ s/>/&gt;/g;
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
2982
298330s my $ppd_file = '$(DISTNAME).ppd';
2984
298530s3562ms my @ppd_cmds = $self->echo(<<'PPD_HTML', $ppd_file, { append => 0, allow_variables => 1 });
# spent 562ms making 3 calls to ExtUtils::MM_Any::echo, avg 187ms/call
2986<SOFTPKG NAME="$(DISTNAME)" VERSION="$(VERSION)">
2987PPD_HTML
2988
298930s my $ppd_xml = sprintf <<'PPD_HTML', $abstract, $author;
2990 <ABSTRACT>%s</ABSTRACT>
2991 <AUTHOR>%s</AUTHOR>
2992PPD_HTML
2993
299430s $ppd_xml .= " <IMPLEMENTATION>\n";
299530s if ( $self->{MIN_PERL_VERSION} ) {
2996 my $min_perl_version = $self->_ppd_version($self->{MIN_PERL_VERSION});
2997 $ppd_xml .= sprintf <<'PPD_PERLVERS', $min_perl_version;
2998 <PERLCORE VERSION="%s" />
2999PPD_PERLVERS
3000
3001 }
3002
3003 # Don't add "perl" to requires. perl dependencies are
3004 # handles by ARCHITECTURE.
300530s my %prereqs = %{$self->{PREREQ_PM}};
300630s delete $prereqs{perl};
3007
3008 # Build up REQUIRE
300930s30s foreach my $prereq (sort keys %prereqs) {
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:sort, avg 0s/call
3010 my $name = $prereq;
3011 $name .= '::' unless $name =~ /::/;
3012 my $version = $prereqs{$prereq};
3013
3014 my %attrs = ( NAME => $name );
3015 $attrs{VERSION} = $version if $version;
3016 my $attrs = join " ", map { qq[$_="$attrs{$_}"] } sort keys %attrs;
3017 $ppd_xml .= qq( <REQUIRE $attrs />\n);
3018 }
3019
302030s my $archname = $Config{archname};
302130s if ($] >= 5.008) {
3022 # archname did not change from 5.6 to 5.8, but those versions may
3023 # not be not binary compatible so now we append the part of the
3024 # version that changes when binary compatibility may change
3025 $archname .= "-$Config{PERL_REVISION}.$Config{PERL_VERSION}";
3026 }
302730s $ppd_xml .= sprintf <<'PPD_OUT', $archname;
3028 <ARCHITECTURE NAME="%s" />
3029PPD_OUT
3030
303130s if ($self->{PPM_INSTALL_SCRIPT}) {
3032 if ($self->{PPM_INSTALL_EXEC}) {
3033 $ppd_xml .= sprintf qq{ <INSTALL EXEC="%s">%s</INSTALL>\n},
3034 $self->{PPM_INSTALL_EXEC}, $self->{PPM_INSTALL_SCRIPT};
3035 }
3036 else {
3037 $ppd_xml .= sprintf qq{ <INSTALL>%s</INSTALL>\n},
3038 $self->{PPM_INSTALL_SCRIPT};
3039 }
3040 }
3041
304230s if ($self->{PPM_UNINSTALL_SCRIPT}) {
3043 if ($self->{PPM_UNINSTALL_EXEC}) {
3044 $ppd_xml .= sprintf qq{ <UNINSTALL EXEC="%s">%s</UNINSTALL>\n},
3045 $self->{PPM_UNINSTALL_EXEC}, $self->{PPM_UNINSTALL_SCRIPT};
3046 }
3047 else {
3048 $ppd_xml .= sprintf qq{ <UNINSTALL>%s</UNINSTALL>\n},
3049 $self->{PPM_UNINSTALL_SCRIPT};
3050 }
3051 }
3052
305330s my ($bin_location) = $self->{BINARY_LOCATION} || '';
305430s30s $bin_location =~ s/\\/\\\\/g;
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
3055
305630s $ppd_xml .= sprintf <<'PPD_XML', $bin_location;
3057 <CODEBASE HREF="%s" />
3058 </IMPLEMENTATION>
3059</SOFTPKG>
3060PPD_XML
3061
306230s33.88s push @ppd_cmds, $self->echo($ppd_xml, $ppd_file, { append => 1 });
# spent 3.88s making 3 calls to ExtUtils::MM_Any::echo, avg 1.29s/call
3063
306430s return sprintf <<'PPD_OUT', join "\n\t", @ppd_cmds;
3065# Creates a PPD (Perl Package Description) for a binary distribution.
3066ppd :
3067 %s
3068PPD_OUT
3069
3070}
3071
3072=item prefixify
3073
3074 $MM->prefixify($var, $prefix, $new_prefix, $default);
3075
3076Using either $MM->{uc $var} || $Config{lc $var}, it will attempt to
3077replace it's $prefix with a $new_prefix.
3078
3079Should the $prefix fail to match I<AND> a PREFIX was given as an
3080argument to WriteMakefile() it will set it to the $new_prefix +
3081$default. This is for systems whose file layouts don't neatly fit into
3082our ideas of prefixes.
3083
3084This is for heuristics which attempt to create directory structures
3085that mirror those of the installed perl.
3086
3087For example:
3088
3089 $MM->prefixify('installman1dir', '/usr', '/home/foo', 'man/man1');
3090
3091this will attempt to remove '/usr' from the front of the
3092$MM->{INSTALLMAN1DIR} path (initializing it to $Config{installman1dir}
3093if necessary) and replace it with '/home/foo'. If this fails it will
3094simply use '/home/foo/man/man1'.
3095
3096=cut
3097
3098
# spent 0s within ExtUtils::MM_Unix::prefixify which was called 36 times, avg 0s/call: # 36 times (0s+0s) by ExtUtils::MM_Any::init_INSTALL_from_PREFIX at line 2015 of ExtUtils/MM_Any.pm, avg 0s/call
sub prefixify {
3099360s my($self,$var,$sprefix,$rprefix,$default) = @_;
3100
3101360s my $path = $self->{uc $var} ||
3102 $Config_Override{lc $var} || $Config{lc $var} || '';
3103
3104360s360s $rprefix .= '/' if $sprefix =~ m|/$|;
# spent 0s making 36 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call
3105
3106360s warn " prefixify $var => $path\n" if $Verbose >= 2;
3107360s warn " from $sprefix to $rprefix\n" if $Verbose >= 2;
3108
3109360s if( $self->{ARGS}{PREFIX} &&
3110 $path !~ s{^\Q$sprefix\E\b}{$rprefix}s )
3111 {
3112
3113 warn " cannot prefix, using default.\n" if $Verbose >= 2;
3114 warn " no default!\n" if !$default && $Verbose >= 2;
3115
3116 $path = $self->catdir($rprefix, $default) if $default;
3117 }
3118
3119360s print " now $path\n" if $Verbose >= 2;
3120360s return $self->{uc $var} = $path;
3121}
3122
3123
3124=item processPL (o)
3125
3126Defines targets to run *.PL files.
3127
3128=cut
3129
3130
# spent 0s within ExtUtils::MM_Unix::processPL which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub processPL {
313130s my $self = shift;
313230s my $pl_files = $self->{PL_FILES};
3133
313430s return "" unless $pl_files;
3135
313630s my $m = '';
313730s30s foreach my $plfile (sort keys %$pl_files) {
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:sort, avg 0s/call
3138 my $list = ref($pl_files->{$plfile})
3139 ? $pl_files->{$plfile}
3140 : [$pl_files->{$plfile}];
3141
3142 foreach my $target (@$list) {
3143 if( $Is{VMS} ) {
3144 $plfile = vmsify($self->eliminate_macros($plfile));
3145 $target = vmsify($self->eliminate_macros($target));
3146 }
3147
3148 # Normally a .PL file runs AFTER pm_to_blib so it can have
3149 # blib in its @INC and load the just built modules. BUT if
3150 # the generated module is something in $(TO_INST_PM) which
3151 # pm_to_blib depends on then it can't depend on pm_to_blib
3152 # else we have a dependency loop.
3153 my $pm_dep;
3154 my $perlrun;
3155 if( defined $self->{PM}{$target} ) {
3156 $pm_dep = '';
3157 $perlrun = 'PERLRUN';
3158 }
3159 else {
3160 $pm_dep = 'pm_to_blib';
3161 $perlrun = 'PERLRUNINST';
3162 }
3163
3164 $m .= <<MAKE_FRAG;
3165
3166all :: $target
3167 \$(NOECHO) \$(NOOP)
3168
3169$target :: $plfile $pm_dep
3170 \$($perlrun) $plfile $target
3171MAKE_FRAG
3172
3173 }
3174 }
3175
317630s return $m;
3177}
3178
3179=item quote_paren
3180
3181Backslashes parentheses C<()> in command line arguments.
3182Doesn't handle recursive Makefile C<$(...)> constructs,
3183but handles simple ones.
3184
3185=cut
3186
3187
# spent 0s within ExtUtils::MM_Unix::quote_paren which was called 72 times, avg 0s/call: # 66 times (0s+0s) by ExtUtils::MM_Unix::const_config at line 339, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::cflags at line 288, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::cflags at line 287, avg 0s/call
sub quote_paren {
3188720s my $arg = shift;
3189720s720s $arg =~ s{\$\((.+?)\)}{\$\\\\($1\\\\)}g; # protect $(...)
# spent 0s making 72 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
3190720s720s $arg =~ s{(?<!\\)([()])}{\\$1}g; # quote unprotected
# spent 0s making 72 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
3191720s720s $arg =~ s{\$\\\\\((.+?)\\\\\)}{\$($1)}g; # unprotect $(...)
# spent 0s making 72 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call
3192720s return $arg;
3193}
3194
3195=item replace_manpage_separator
3196
3197 my $man_name = $MM->replace_manpage_separator($file_path);
3198
3199Takes the name of a package, which may be a nested package, in the
3200form 'Foo/Bar.pm' and replaces the slash with C<::> or something else
3201safe for a man page file name. Returns the replacement.
3202
3203=cut
3204
3205sub replace_manpage_separator {
3206 my($self,$man) = @_;
3207
3208 $man =~ s,/+,::,g;
3209 return $man;
3210}
3211
3212
3213=item cd
3214
3215=cut
3216
3217
# spent 0s within ExtUtils::MM_Unix::cd which was called 23 times, avg 0s/call: # 23 times (0s+0s) by ExtUtils::MM_Win32::cd at line 580 of ExtUtils/MM_Win32.pm, avg 0s/call
sub cd {
3218230s my($self, $dir, @cmds) = @_;
3219
3220 # No leading tab and no trailing newline makes for easier embedding
3221230s my $make_frag = join "\n\t", map { "cd $dir && $_" } @cmds;
3222
3223230s return $make_frag;
3224}
3225
3226=item oneliner
3227
3228=cut
3229
3230sub oneliner {
3231 my($self, $cmd, $switches) = @_;
3232 $switches = [] unless defined $switches;
3233
3234 # Strip leading and trailing newlines
3235 $cmd =~ s{^\n+}{};
3236 $cmd =~ s{\n+$}{};
3237
3238 my @cmds = split /\n/, $cmd;
3239 $cmd = join " \n\t -e ", map $self->quote_literal($_), @cmds;
3240 $cmd = $self->escape_newlines($cmd);
3241
3242 $switches = join ' ', @$switches;
3243
3244 return qq{\$(ABSPERLRUN) $switches -e $cmd --};
3245}
3246
3247
3248=item quote_literal
3249
3250Quotes macro literal value suitable for being used on a command line so
3251that when expanded by make, will be received by command as given to
3252this method:
3253
3254 my $quoted = $mm->quote_literal(q{it isn't});
3255 # returns:
3256 # 'it isn'\''t'
3257 print MAKEFILE "target:\n\techo $quoted\n";
3258 # when run "make target", will output:
3259 # it isn't
3260
3261=cut
3262
3263sub quote_literal {
3264 my($self, $text, $opts) = @_;
3265 $opts->{allow_variables} = 1 unless defined $opts->{allow_variables};
3266
3267 # Quote single quotes
3268 $text =~ s{'}{'\\''}g;
3269
3270 $text = $opts->{allow_variables}
3271 ? $self->escape_dollarsigns($text) : $self->escape_all_dollarsigns($text);
3272
3273 return "'$text'";
3274}
3275
3276
3277=item escape_newlines
3278
3279=cut
3280
3281sub escape_newlines {
3282 my($self, $text) = @_;
3283
3284 $text =~ s{\n}{\\\n}g;
3285
3286 return $text;
3287}
3288
3289
3290=item max_exec_len
3291
3292Using POSIX::ARG_MAX. Otherwise falling back to 4096.
3293
3294=cut
3295
3296sub max_exec_len {
3297 my $self = shift;
3298
3299 if (!defined $self->{_MAX_EXEC_LEN}) {
3300 if (my $arg_max = eval { require POSIX; &POSIX::ARG_MAX }) {
3301 $self->{_MAX_EXEC_LEN} = $arg_max;
3302 }
3303 else { # POSIX minimum exec size
3304 $self->{_MAX_EXEC_LEN} = 4096;
3305 }
3306 }
3307
3308 return $self->{_MAX_EXEC_LEN};
3309}
3310
3311
3312=item static (o)
3313
3314Defines the static target.
3315
3316=cut
3317
3318
# spent 0s within ExtUtils::MM_Unix::static which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub static {
3319# --- Static Loading Sections ---
3320
332130s my($self) = shift;
332230s '
3323## $(INST_PM) has been moved to the all: target.
3324## It remains here for awhile to allow for old usage: "make static"
3325static :: $(FIRST_MAKEFILE) $(INST_STATIC)
3326 $(NOECHO) $(NOOP)
3327';
3328}
3329
3330=item static_lib (o)
3331
3332Defines how to produce the *.a (or equivalent) files.
3333
3334=cut
3335
3336sub static_lib {
3337 my($self) = @_;
3338 return '' unless $self->has_link_code;
3339
3340 my(@m);
3341 push(@m, <<'END');
3342
3343$(INST_STATIC) : $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)$(DFSEP).exists
3344 $(RM_RF) $@
3345END
3346
3347 # If this extension has its own library (eg SDBM_File)
3348 # then copy that to $(INST_STATIC) and add $(OBJECT) into it.
3349 push(@m, <<'MAKE_FRAG') if $self->{MYEXTLIB};
3350 $(CP) $(MYEXTLIB) "$@"
3351MAKE_FRAG
3352
3353 my $ar;
3354 if (exists $self->{FULL_AR} && -x $self->{FULL_AR}) {
3355 # Prefer the absolute pathed ar if available so that PATH
3356 # doesn't confuse us. Perl itself is built with the full_ar.
3357 $ar = 'FULL_AR';
3358 } else {
3359 $ar = 'AR';
3360 }
3361 push @m, sprintf <<'MAKE_FRAG', $ar;
3362 $(%s) $(AR_STATIC_ARGS) $@ $(OBJECT) && $(RANLIB) $@
3363 $(CHMOD) $(PERM_RWX) $@
3364 $(NOECHO) $(ECHO) "$(EXTRALIBS)" > "$(INST_ARCHAUTODIR)/extralibs.ld"
3365MAKE_FRAG
3366
3367 # Old mechanism - still available:
3368 push @m, <<'MAKE_FRAG' if $self->{PERL_SRC} && $self->{EXTRALIBS};
3369 $(NOECHO) $(ECHO) "$(EXTRALIBS)" >> "$(PERL_SRC)/ext.libs"
3370MAKE_FRAG
3371
3372 join('', @m);
3373}
3374
3375=item staticmake (o)
3376
3377Calls makeaperl.
3378
3379=cut
3380
3381
# spent 0s within ExtUtils::MM_Unix::staticmake which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub staticmake {
338230s my($self, %attribs) = @_;
338330s my(@static);
3384
338530s my(@searchdirs)=($self->{PERL_ARCHLIB}, $self->{SITEARCHEXP}, $self->{INST_ARCHLIB});
3386
3387 # And as it's not yet built, we add the current extension
3388 # but only if it has some C code (or XS code, which implies C code)
338930s30s if (@{$self->{C}}) {
# spent 0s making 3 calls to ExtUtils::MM_Any::catfile, avg 0s/call
3390 @static = $self->catfile($self->{INST_ARCHLIB},
3391 "auto",
3392 $self->{FULLEXT},
3393 "$self->{BASEEXT}$self->{LIB_EXT}"
3394 );
3395 }
3396
3397 # Either we determine now, which libraries we will produce in the
3398 # subdirectories or we do it at runtime of the make.
3399
3400 # We could ask all subdir objects, but I cannot imagine, why it
3401 # would be necessary.
3402
3403 # Instead we determine all libraries for the new perl at
3404 # runtime.
340530s my(@perlinc) = ($self->{INST_ARCHLIB}, $self->{INST_LIB}, $self->{PERL_ARCHLIB}, $self->{PERL_LIB});
3406
340730s30s $self->makeaperl(MAKE => $self->{MAKEFILE},
# spent 0s making 3 calls to ExtUtils::MM_Unix::makeaperl, avg 0s/call
3408 DIRS => \@searchdirs,
3409 STAT => \@static,
3410 INCL => \@perlinc,
3411 TARGET => $self->{MAP_TARGET},
3412 TMP => "",
3413 LIBPERL => $self->{LIBPERL_A}
3414 );
3415}
3416
3417=item subdir_x (o)
3418
3419Helper subroutine for subdirs
3420
3421=cut
3422
3423
# spent 374ms (0s+374) within ExtUtils::MM_Unix::subdir_x which was called 2 times, avg 187ms/call: # 2 times (0s+374ms) by ExtUtils::MM_Unix::subdirs at line 3451, avg 187ms/call
sub subdir_x {
342420s my($self, $subdir) = @_;
3425
342620s2374ms my $subdir_cmd = $self->cd($subdir,
# spent 374ms making 2 calls to ExtUtils::MM_Win32::cd, avg 187ms/call
3427 '$(MAKE) $(USEMAKEFILE) $(FIRST_MAKEFILE) all $(PASTHRU)'
3428 );
342920s return sprintf <<'EOT', $subdir_cmd;
3430
3431subdirs ::
3432 $(NOECHO) %s
3433EOT
3434
3435}
3436
3437=item subdirs (o)
3438
3439Defines targets to process subdirectories.
3440
3441=cut
3442
3443
# spent 374ms (0s+374) within ExtUtils::MM_Unix::subdirs which was called 3 times, avg 125ms/call: # 3 times (0s+374ms) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 125ms/call
sub subdirs {
3444# --- Sub-directory Sections ---
344530s my($self) = shift;
344630s my(@m);
3447 # This method provides a mechanism to automatically deal with
3448 # subdirectories containing further Makefile.PL scripts.
3449 # It calls the subdir_x() method for each subdirectory.
345030s foreach my $dir (@{$self->{DIR}}){
345120s2374ms push(@m, $self->subdir_x($dir));
# spent 374ms making 2 calls to ExtUtils::MM_Unix::subdir_x, avg 187ms/call
3452#### print "Including $dir subdirectory\n";
3453 }
345430s if (@m){
3455 unshift(@m, "
3456# The default clean, realclean and test targets in this Makefile
3457# have automatically been given entries for each subdir.
3458
3459");
3460 } else {
346120s push(@m, "\n# none")
3462 }
346330s join('',@m);
3464}
3465
3466=item test (o)
3467
3468Defines the test targets.
3469
3470=cut
3471
3472
# spent 920ms (0s+920) within ExtUtils::MM_Unix::test which was called 3 times, avg 307ms/call: # 3 times (0s+920ms) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 307ms/call
sub test {
3473# --- Test and Installation Sections ---
3474
347530s my($self, %attribs) = @_;
347630s my $tests = $attribs{TESTS} || '';
347730s70s if (!$tests && -d 't' && defined $attribs{RECURSIVE_TEST_FILES}) {
# spent 0s making 1 call to ExtUtils::MM_Any::find_tests # spent 0s making 6 calls to ExtUtils::MM_Unix::CORE:ftdir, avg 0s/call
3478 $tests = $self->find_tests_recursive;
3479 }
3480 elsif (!$tests && -d 't') {
3481 $tests = $self->find_tests;
3482 }
3483 # have to do this because nmake is broken
348430s3530ms $tests =~ s!/!\\!g if $self->is_make_type('nmake');
# spent 530ms making 3 calls to ExtUtils::MM_Any::is_make_type, avg 177ms/call
3485 # note: 'test.pl' name is also hardcoded in init_dirscan()
348630s my(@m);
348730s push(@m,"
3488TEST_VERBOSE=0
3489TEST_TYPE=test_\$(LINKTYPE)
3490TEST_FILE = test.pl
3491TEST_FILES = $tests
3492TESTDB_SW = -d
3493
3494testdb :: testdb_\$(LINKTYPE)
3495
3496test :: \$(TEST_TYPE) subdirs-test
3497
3498subdirs-test ::
3499 \$(NOECHO) \$(NOOP)
3500
3501");
3502
350330s foreach my $dir (@{ $self->{DIR} }) {
350420s2374ms my $test = $self->cd($dir, '$(MAKE) test $(PASTHRU)');
# spent 374ms making 2 calls to ExtUtils::MM_Win32::cd, avg 187ms/call
3505
350620s push @m, <<END
3507subdirs-test ::
3508 \$(NOECHO) $test
3509
3510END
3511 }
3512
3513 push(@m, "\t\$(NOECHO) \$(ECHO) 'No tests defined for \$(NAME) extension.'\n")
351430s20s unless $tests or -f "test.pl" or @{$self->{DIR}};
# spent 0s making 2 calls to ExtUtils::MM_Unix::CORE:ftfile, avg 0s/call
351530s push(@m, "\n");
3516
351730s push(@m, "test_dynamic :: pure_all\n");
351830s10s push(@m, $self->test_via_harness('$(FULLPERLRUN)', '$(TEST_FILES)'))
# spent 0s making 1 call to ExtUtils::MM_Any::test_via_harness
3519 if $tests;
352030s30s push(@m, $self->test_via_script('$(FULLPERLRUN)', '$(TEST_FILE)'))
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:ftfile, avg 0s/call
3521 if -f "test.pl";
352230s push(@m, "\n");
3523
352430s push(@m, "testdb_dynamic :: pure_all\n");
352530s30s push(@m, $self->test_via_script('$(FULLPERLRUN) $(TESTDB_SW)',
# spent 0s making 3 calls to ExtUtils::MM_Any::test_via_script, avg 0s/call
3526 '$(TEST_FILE)'));
352730s push(@m, "\n");
3528
3529 # Occasionally we may face this degenerate target:
353030s push @m, "test_ : test_dynamic\n\n";
3531
353230s30s if ($self->needs_linking()) {
# spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call
353330s push(@m, "test_static :: pure_all \$(MAP_TARGET)\n");
353430s10s push(@m, $self->test_via_harness('./$(MAP_TARGET)', '$(TEST_FILES)')) if $tests;
# spent 0s making 1 call to ExtUtils::MM_Any::test_via_harness
3535315.6ms315.6ms push(@m, $self->test_via_script('./$(MAP_TARGET)', '$(TEST_FILE)')) if -f "test.pl";
# spent 15.6ms making 3 calls to ExtUtils::MM_Unix::CORE:ftfile, avg 5.20ms/call
353630s push(@m, "\n");
353730s push(@m, "testdb_static :: pure_all \$(MAP_TARGET)\n");
353830s30s push(@m, $self->test_via_script('./$(MAP_TARGET) $(TESTDB_SW)', '$(TEST_FILE)'));
# spent 0s making 3 calls to ExtUtils::MM_Any::test_via_script, avg 0s/call
353930s push(@m, "\n");
3540 } else {
3541 push @m, "test_static :: test_dynamic\n";
3542 push @m, "testdb_static :: testdb_dynamic\n";
3543 }
354430s join("", @m);
3545}
3546
3547=item test_via_harness (override)
3548
3549For some reason which I forget, Unix machines like to have
3550PERL_DL_NONLAZY set for tests.
3551
3552=cut
3553
3554sub test_via_harness {
3555 my($self, $perl, $tests) = @_;
3556 return $self->SUPER::test_via_harness("PERL_DL_NONLAZY=1 $perl", $tests);
3557}
3558
3559=item test_via_script (override)
3560
3561Again, the PERL_DL_NONLAZY thing.
3562
3563=cut
3564
3565sub test_via_script {
3566 my($self, $perl, $script) = @_;
3567 return $self->SUPER::test_via_script("PERL_DL_NONLAZY=1 $perl", $script);
3568}
3569
3570
3571=item tool_xsubpp (o)
3572
3573Determines typemaps, xsubpp version, prototype behaviour.
3574
3575=cut
3576
3577
# spent 0s within ExtUtils::MM_Unix::tool_xsubpp which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub tool_xsubpp {
357830s my($self) = shift;
357930s30s return "" unless $self->needs_linking;
# spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call
3580
358130s my $xsdir;
358230s my @xsubpp_dirs = @INC;
3583
3584 # Make sure we pick up the new xsubpp if we're building perl.
358530s unshift @xsubpp_dirs, $self->{PERL_LIB} if $self->{PERL_CORE};
3586
358730s my $foundxsubpp = 0;
358830s foreach my $dir (@xsubpp_dirs) {
3589120s120s $xsdir = $self->catdir($dir, 'ExtUtils');
# spent 0s making 12 calls to File::Spec::Win32::catdir, avg 0s/call
3590120s240s if( -r $self->catfile($xsdir, "xsubpp") ) {
# spent 0s making 12 calls to ExtUtils::MM_Any::catfile, avg 0s/call # spent 0s making 12 calls to ExtUtils::MM_Unix::CORE:fteread, avg 0s/call
359130s $foundxsubpp = 1;
359230s last;
3593 }
3594 }
359530s die "ExtUtils::MM_Unix::tool_xsubpp : Can't find xsubpp" if !$foundxsubpp;
3596
359730s30s my $tmdir = File::Spec->catdir($self->{PERL_LIB},"ExtUtils");
# spent 0s making 3 calls to File::Spec::Win32::catdir, avg 0s/call
359830s30s my(@tmdeps) = $self->catfile($tmdir,'typemap');
# spent 0s making 3 calls to ExtUtils::MM_Any::catfile, avg 0s/call
359930s if( $self->{TYPEMAPS} ){
3600 foreach my $typemap (@{$self->{TYPEMAPS}}){
3601 if( ! -f $typemap ) {
3602 warn "Typemap $typemap not found.\n";
3603 }
3604 else {
3605 push(@tmdeps, $typemap);
3606 }
3607 }
3608 }
360930s30s push(@tmdeps, "typemap") if -f "typemap";
# spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:ftfile, avg 0s/call
361030s my @tmargs = map(qq{-typemap "$_"}, @tmdeps);
361130s40s $_ = $self->quote_dep($_) for @tmdeps;
# spent 0s making 4 calls to ExtUtils::MM_Win32::quote_dep, avg 0s/call
361230s if( exists $self->{XSOPT} ){
3613 unshift( @tmargs, $self->{XSOPT} );
3614 }
3615
361630s if ($Is{VMS} &&
3617 $Config{'ldflags'} &&
3618 $Config{'ldflags'} =~ m!/Debug!i &&
3619 (!exists($self->{XSOPT}) || $self->{XSOPT} !~ /linenumbers/)
3620 )
3621 {
3622 unshift(@tmargs,'-nolinenumbers');
3623 }
3624
3625
362630s $self->{XSPROTOARG} = "" unless defined $self->{XSPROTOARG};
362730s30s my $xsdirdep = $self->quote_dep($xsdir);
# spent 0s making 3 calls to ExtUtils::MM_Win32::quote_dep, avg 0s/call
3628 # -dep for use when dependency not command
3629
363030s return qq{
3631XSUBPPDIR = $xsdir
3632XSUBPP = "\$(XSUBPPDIR)\$(DFSEP)xsubpp"
3633XSUBPPRUN = \$(PERLRUN) \$(XSUBPP)
3634XSPROTOARG = $self->{XSPROTOARG}
3635XSUBPPDEPS = @tmdeps $xsdirdep\$(DFSEP)xsubpp
3636XSUBPPARGS = @tmargs
3637XSUBPP_EXTRA_ARGS =
3638};
3639}
3640
3641
3642=item all_target
3643
3644Build man pages, too
3645
3646=cut
3647
3648sub all_target {
3649 my $self = shift;
3650
3651 return <<'MAKE_EXT';
3652all :: pure_all manifypods
3653 $(NOECHO) $(NOOP)
3654MAKE_EXT
3655}
3656
3657=item top_targets (o)
3658
3659Defines the targets all, subdirs, config, and O_FILES
3660
3661=cut
3662
3663
# spent 0s within ExtUtils::MM_Unix::top_targets which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub top_targets {
3664# --- Target Sections ---
3665
366630s my($self) = shift;
366730s my(@m);
3668
366930s30s push @m, $self->all_target, "\n" unless $self->{SKIPHASH}{'all'};
# spent 0s making 3 calls to ExtUtils::MM_Any::all_target, avg 0s/call
3670
367130s push @m, '
3672pure_all :: config pm_to_blib subdirs linkext
3673 $(NOECHO) $(NOOP)
3674
3675subdirs :: $(MYEXTLIB)
3676 $(NOECHO) $(NOOP)
3677
3678config :: $(FIRST_MAKEFILE) blibdirs
3679 $(NOECHO) $(NOOP)
3680';
3681
3682 push @m, '
3683$(O_FILES): $(H_FILES)
368430s' if @{$self->{O_FILES} || []} && @{$self->{H} || []};
3685
368630s push @m, q{
3687help :
3688 perldoc ExtUtils::MakeMaker
3689};
3690
369130s join('',@m);
3692}
3693
3694=item writedoc
3695
3696Obsolete, deprecated method. Not used since Version 5.21.
3697
3698=cut
3699
3700sub writedoc {
3701# --- perllocal.pod section ---
3702 my($self,$what,$name,@attribs)=@_;
3703 my $time = localtime;
3704 print "=head2 $time: $what C<$name>\n\n=over 4\n\n=item *\n\n";
3705 print join "\n\n=item *\n\n", map("C<$_>",@attribs);
3706 print "\n\n=back\n\n";
3707}
3708
3709=item xs_c (o)
3710
3711Defines the suffix rules to compile XS files to C.
3712
3713=cut
3714
3715
# spent 0s within ExtUtils::MM_Unix::xs_c which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub xs_c {
371630s my($self) = shift;
371730s30s return '' unless $self->needs_linking();
# spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call
371830s '
3719.xs.c:
3720 $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $(XSUBPP_EXTRA_ARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c
3721';
3722}
3723
3724=item xs_cpp (o)
3725
3726Defines the suffix rules to compile XS files to C++.
3727
3728=cut
3729
3730sub xs_cpp {
3731 my($self) = shift;
3732 return '' unless $self->needs_linking();
3733 '
3734.xs.cpp:
3735 $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.cpp
3736';
3737}
3738
3739=item xs_o (o)
3740
3741Defines suffix rules to go from XS to object files directly. This is
3742only intended for broken make implementations.
3743
3744=cut
3745
3746sub xs_o { # many makes are too dumb to use xs_c then c_o
3747 my($self) = shift;
3748 return '' unless $self->needs_linking();
3749 '
3750.xs$(OBJ_EXT):
3751 $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c
3752 $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c
3753';
3754}
3755
3756
375710s1;
3758
3759=back
3760
3761=head1 SEE ALSO
3762
3763L<ExtUtils::MakeMaker>
3764
3765=cut
3766
3767__END__
 
# spent 93.6ms within ExtUtils::MM_Unix::CORE:backtick which was called: # once (93.6ms+0s) by ExtUtils::MM_Unix::find_perl at line 1079
sub ExtUtils::MM_Unix::CORE:backtick; # opcode
# spent 0s within ExtUtils::MM_Unix::CORE:close which was called 4 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Unix::parse_version at line 2780, avg 0s/call # once (0s+0s) by ExtUtils::MM_Unix::find_perl at line 1078
sub ExtUtils::MM_Unix::CORE:close; # opcode
# spent 0s within ExtUtils::MM_Unix::CORE:ftdir which was called 27 times, avg 0s/call: # 15 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1315, avg 0s/call # 6 times (0s+0s) by ExtUtils::MM_Unix::init_PM at line 1525, avg 0s/call # 6 times (0s+0s) by ExtUtils::MM_Unix::test at line 3477, avg 0s/call
sub ExtUtils::MM_Unix::CORE:ftdir; # opcode
# spent 0s within ExtUtils::MM_Unix::CORE:fteexec which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Unix::init_PERL at line 1940, avg 0s/call
sub ExtUtils::MM_Unix::CORE:fteexec; # opcode
# spent 0s within ExtUtils::MM_Unix::CORE:fteread which was called 12 times, avg 0s/call: # 12 times (0s+0s) by ExtUtils::MM_Unix::tool_xsubpp at line 3590, avg 0s/call
sub ExtUtils::MM_Unix::CORE:fteread; # opcode
# spent 15.6ms within ExtUtils::MM_Unix::CORE:ftfile which was called 43 times, avg 363µs/call: # 24 times (0s+0s) by ExtUtils::MM_Unix::init_main at line 1644, avg 0s/call # 3 times (15.6ms+0s) by ExtUtils::MM_Unix::test at line 3535, avg 5.20ms/call # 3 times (0s+0s) by ExtUtils::MM_Unix::test at line 3520, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_main at line 1778, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_main at line 1696, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::tool_xsubpp at line 3609, avg 0s/call # 2 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1318, avg 0s/call # 2 times (0s+0s) by ExtUtils::MM_Unix::test at line 3514, avg 0s/call
sub ExtUtils::MM_Unix::CORE:ftfile; # opcode
# spent 0s within ExtUtils::MM_Unix::CORE:ftis which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Unix::constants at line 465, avg 0s/call
sub ExtUtils::MM_Unix::CORE:ftis; # opcode
# spent 0s within ExtUtils::MM_Unix::CORE:ftlink which was called 2 times, avg 0s/call: # 2 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1316, avg 0s/call
sub ExtUtils::MM_Unix::CORE:ftlink; # opcode
# spent 0s within ExtUtils::MM_Unix::CORE:match which was called 1258 times, avg 0s/call: # 356 times (0s+0s) by ExtUtils::MM_Unix::parse_version at line 2764, avg 0s/call # 352 times (0s+0s) by ExtUtils::MM_Unix::parse_version at line 2768, avg 0s/call # 178 times (0s+0s) by ExtUtils::MM_Unix::parse_version at line 2765, avg 0s/call # 176 times (0s+0s) by ExtUtils::MM_Unix::parse_version at line 2767, avg 0s/call # 53 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1315, avg 0s/call # 36 times (0s+0s) by ExtUtils::MM_Unix::prefixify at line 3104, avg 0s/call # 30 times (0s+0s) by ExtUtils::MM_Unix::needs_linking at line 2667, avg 0s/call # 25 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1311, avg 0s/call # 25 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1310, avg 0s/call # 6 times (0s+0s) by ExtUtils::MM_Unix::init_MANPODS at line 1370, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::cflags at line 281, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_PERL at line 1908, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_main at line 1623, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::parse_version at line 2782, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::cflags at line 226, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::cflags at line 219, avg 0s/call # once (0s+0s) by ExtUtils::MM_Unix::BEGIN@25 at line 37 # once (0s+0s) by ExtUtils::MM_Unix::BEGIN@25 at line 40 # once (0s+0s) by ExtUtils::MM_Unix::find_perl at line 1086
sub ExtUtils::MM_Unix::CORE:match; # opcode
# spent 0s within ExtUtils::MM_Unix::CORE:open which was called 5 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Unix::parse_version at line 2761, avg 0s/call # once (0s+0s) by ExtUtils::MM_Unix::find_perl at line 1082 # once (0s+0s) by ExtUtils::MM_Unix::find_perl at line 1040
sub ExtUtils::MM_Unix::CORE:open; # opcode
# spent 0s within ExtUtils::MM_Unix::CORE:qr which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1297, avg 0s/call
sub ExtUtils::MM_Unix::CORE:qr; # opcode
# spent 0s within ExtUtils::MM_Unix::CORE:readline which was called 178 times, avg 0s/call: # 178 times (0s+0s) by ExtUtils::MM_Unix::parse_version at line 2763, avg 0s/call
sub ExtUtils::MM_Unix::CORE:readline; # opcode
# spent 0s within ExtUtils::MM_Unix::CORE:regcomp which was called 35 times, avg 0s/call: # 25 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1311, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1297, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_PERL at line 1908, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::cflags at line 219, avg 0s/call # once (0s+0s) by ExtUtils::MM_Unix::init_PERL at line 1956
sub ExtUtils::MM_Unix::CORE:regcomp; # opcode
# spent 0s within ExtUtils::MM_Unix::CORE:sort which was called 39 times, avg 0s/call: # 9 times (0s+0s) by ExtUtils::MM_Unix::constants at line 461, avg 0s/call # 6 times (0s+0s) by ExtUtils::MM_Unix::constants at line 496, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1349, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::ppd at line 3009, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::perldepend at line 2889, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1354, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::pm_to_blib at line 2915, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1348, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::processPL at line 3137, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1346, avg 0s/call
sub ExtUtils::MM_Unix::CORE:sort; # opcode
# spent 0s within ExtUtils::MM_Unix::CORE:subst which was called 547 times, avg 0s/call: # 255 times (0s+0s) by ExtUtils::MM_Unix::constants at line 425, avg 0s/call # 72 times (0s+0s) by ExtUtils::MM_Unix::quote_paren at line 3190, avg 0s/call # 72 times (0s+0s) by ExtUtils::MM_Unix::quote_paren at line 3189, avg 0s/call # 72 times (0s+0s) by ExtUtils::MM_Unix::quote_paren at line 3191, avg 0s/call # 9 times (0s+0s) by ExtUtils::MM_Unix::cflags at line 267, avg 0s/call # 9 times (0s+0s) by ExtUtils::MM_Unix::cflags at line 265, avg 0s/call # 9 times (0s+0s) by ExtUtils::MM_Unix::cflags at line 266, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::cflags at line 189, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::ppd at line 2981, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_PERL at line 1966, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::ppd at line 3054, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_dist at line 606, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::ppd at line 2980, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::cflags at line 232, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_PERL at line 1934, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_PERL at line 1935, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1320, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::c_o at line 139, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::ppd at line 2975, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::ppd at line 2977, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_PERL at line 1939, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::ppd at line 2976, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1353, avg 0s/call # once (0s+0s) by ExtUtils::MM_Unix::init_PERL at line 1956
sub ExtUtils::MM_Unix::CORE:subst; # opcode
# spent 0s within ExtUtils::MM_Unix::CORE:substcont which was called 6 times, avg 0s/call: # 6 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1353, avg 0s/call
sub ExtUtils::MM_Unix::CORE:substcont; # opcode
# spent 0s within ExtUtils::MakeMaker::_version::CORE:match which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Unix::get_version at line 2804, avg 0s/call
sub ExtUtils::MakeMaker::_version::CORE:match; # opcode