← 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_Win32.pm
StatementsExecuted 6644 statements in 15.6ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
15547115.6ms15.6msExtUtils::MM_Win32::::CORE:substExtUtils::MM_Win32::CORE:subst (opcode)
1110s0sExtUtils::MM_Win32::::BEGIN@22ExtUtils::MM_Win32::BEGIN@22
1110s0sExtUtils::MM_Win32::::BEGIN@23ExtUtils::MM_Win32::BEGIN@23
1110s0sExtUtils::MM_Win32::::BEGIN@24ExtUtils::MM_Win32::BEGIN@24
1110s0sExtUtils::MM_Win32::::BEGIN@25ExtUtils::MM_Win32::BEGIN@25
1110s0sExtUtils::MM_Win32::::BEGIN@3ExtUtils::MM_Win32::BEGIN@3
1110s0sExtUtils::MM_Win32::::CORE:ftisExtUtils::MM_Win32::CORE:ftis (opcode)
1105710s0sExtUtils::MM_Win32::::CORE:matchExtUtils::MM_Win32::CORE:match (opcode)
1110s0sExtUtils::MM_Win32::::CORE:regcompExtUtils::MM_Win32::CORE:regcomp (opcode)
29110s0sExtUtils::MM_Win32::::CORE:substcontExtUtils::MM_Win32::CORE:substcont (opcode)
1110s0sExtUtils::MM_Win32::::_identify_compiler_environmentExtUtils::MM_Win32::_identify_compiler_environment
6110s0sExtUtils::MM_Win32::::_normalize_path_nameExtUtils::MM_Win32::_normalize_path_name
3110s0sExtUtils::MM_Win32::::arch_checkExtUtils::MM_Win32::arch_check
0000s0sExtUtils::MM_Win32::::can_dep_spaceExtUtils::MM_Win32::can_dep_space
23820s4.27sExtUtils::MM_Win32::::cdExtUtils::MM_Win32::cd
3110s0sExtUtils::MM_Win32::::cflagsExtUtils::MM_Win32::cflags
3110s562msExtUtils::MM_Win32::::constantsExtUtils::MM_Win32::constants
3110s0sExtUtils::MM_Win32::::dlsymsExtUtils::MM_Win32::dlsyms
3110s0sExtUtils::MM_Win32::::dynamic_libExtUtils::MM_Win32::dynamic_lib
94220s0sExtUtils::MM_Win32::::escape_newlinesExtUtils::MM_Win32::escape_newlines
3110s0sExtUtils::MM_Win32::::extra_clean_filesExtUtils::MM_Win32::extra_clean_files
3110s1.11sExtUtils::MM_Win32::::init_DIRFILESEPExtUtils::MM_Win32::init_DIRFILESEP
3110s0sExtUtils::MM_Win32::::init_linkerExtUtils::MM_Win32::init_linker
3110s46.8msExtUtils::MM_Win32::::init_othersExtUtils::MM_Win32::init_others
3110s0sExtUtils::MM_Win32::::init_platformExtUtils::MM_Win32::init_platform
3110s10.4sExtUtils::MM_Win32::::init_toolsExtUtils::MM_Win32::init_tools
15110s0sExtUtils::MM_Win32::::max_exec_lenExtUtils::MM_Win32::max_exec_len
1110s0sExtUtils::MM_Win32::::maybe_commandExtUtils::MM_Win32::maybe_command
792620s14.5sExtUtils::MM_Win32::::onelinerExtUtils::MM_Win32::oneliner
1002110s0sExtUtils::MM_Win32::::os_flavorExtUtils::MM_Win32::os_flavor
3110s546msExtUtils::MM_Win32::::pasthruExtUtils::MM_Win32::pasthru
0000s0sExtUtils::MM_Win32::::perl_scriptExtUtils::MM_Win32::perl_script
3110s0sExtUtils::MM_Win32::::platform_constantsExtUtils::MM_Win32::platform_constants
13310s0sExtUtils::MM_Win32::::quote_depExtUtils::MM_Win32::quote_dep
292220s54.2sExtUtils::MM_Win32::::quote_literalExtUtils::MM_Win32::quote_literal
0000s0sExtUtils::MM_Win32::::replace_manpage_separatorExtUtils::MM_Win32::replace_manpage_separator
3110s562msExtUtils::MM_Win32::::special_targetsExtUtils::MM_Win32::special_targets
3110s0sExtUtils::MM_Win32::::static_libExtUtils::MM_Win32::static_lib
3110s0sExtUtils::MM_Win32::::xs_oExtUtils::MM_Win32::xs_o
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_Win32;
2
320s20s
# spent 0s within ExtUtils::MM_Win32::BEGIN@3 which was called: # once (0s+0s) by main::BEGIN@1 at line 3
use strict;
# spent 0s making 1 call to ExtUtils::MM_Win32::BEGIN@3 # spent 0s making 1 call to strict::import
4
5
6=head1 NAME
7
8ExtUtils::MM_Win32 - methods to override UN*X behaviour in ExtUtils::MakeMaker
9
10=head1 SYNOPSIS
11
12 use ExtUtils::MM_Win32; # Done internally by ExtUtils::MakeMaker if needed
13
14=head1 DESCRIPTION
15
16See ExtUtils::MM_Unix for a documentation of the methods provided
17there. This package overrides the implementation of these methods, not
18the semantics.
19
20=cut
21
2220s20s
# spent 0s within ExtUtils::MM_Win32::BEGIN@22 which was called: # once (0s+0s) by main::BEGIN@1 at line 22
use ExtUtils::MakeMaker::Config;
# spent 0s making 1 call to ExtUtils::MM_Win32::BEGIN@22 # spent 0s making 1 call to ExtUtils::MakeMaker::Config::import
2320s20s
# spent 0s within ExtUtils::MM_Win32::BEGIN@23 which was called: # once (0s+0s) by main::BEGIN@1 at line 23
use File::Basename;
# spent 0s making 1 call to Exporter::import # spent 0s making 1 call to ExtUtils::MM_Win32::BEGIN@23
2420s10s
# spent 0s within ExtUtils::MM_Win32::BEGIN@24 which was called: # once (0s+0s) by main::BEGIN@1 at line 24
use File::Spec;
# spent 0s making 1 call to ExtUtils::MM_Win32::BEGIN@24
2520s20s
# spent 0s within ExtUtils::MM_Win32::BEGIN@25 which was called: # once (0s+0s) by main::BEGIN@1 at line 25
use ExtUtils::MakeMaker qw( neatvalue );
# spent 0s making 1 call to Exporter::import # spent 0s making 1 call to ExtUtils::MM_Win32::BEGIN@25
26
2710srequire ExtUtils::MM_Any;
2810srequire ExtUtils::MM_Unix;
2910sour @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
3010sour $VERSION = '7.04';
31
3210s$ENV{EMXSHELL} = 'sh'; # to run `commands`
33
3410s10smy ( $BORLAND, $GCC, $DLLTOOL ) = _identify_compiler_environment( \%Config );
35
36
# spent 0s within ExtUtils::MM_Win32::_identify_compiler_environment which was called: # once (0s+0s) by main::BEGIN@1 at line 34
sub _identify_compiler_environment {
3710s my ( $config ) = @_;
38
3910s10s my $BORLAND = $config->{cc} =~ /^bcc/i ? 1 : 0;
# spent 0s making 1 call to ExtUtils::MM_Win32::CORE:match
4010s10s my $GCC = $config->{cc} =~ /\bgcc\b/i ? 1 : 0;
# spent 0s making 1 call to ExtUtils::MM_Win32::CORE:match
4110s my $DLLTOOL = $config->{dlltool} || 'dlltool';
42
4310s return ( $BORLAND, $GCC, $DLLTOOL );
44}
45
46
47=head2 Overridden methods
48
49=over 4
50
51=item B<dlsyms>
52
53=cut
54
55
# spent 0s within ExtUtils::MM_Win32::dlsyms 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 dlsyms {
5630s my($self,%attribs) = @_;
57
5830s my($funcs) = $attribs{DL_FUNCS} || $self->{DL_FUNCS} || {};
5930s my($vars) = $attribs{DL_VARS} || $self->{DL_VARS} || [];
6030s my($funclist) = $attribs{FUNCLIST} || $self->{FUNCLIST} || [];
6130s my($imports) = $attribs{IMPORTS} || $self->{IMPORTS} || {};
6230s my(@m);
63
6430s120s if (not $self->{SKIPHASH}{'dynamic'}) {
# spent 0s making 12 calls to ExtUtils::MakeMaker::neatvalue, avg 0s/call
65 push(@m,"
66$self->{BASEEXT}.def: Makefile.PL
67",
68 q! $(PERLRUN) -MExtUtils::Mksymlists \\
69 -e "Mksymlists('NAME'=>\"!, $self->{NAME},
70 q!\", 'DLBASE' => '!,$self->{DLBASE},
71 # The above two lines quoted differently to work around
72 # a bug in the 4DOS/4NT command line interpreter. The visible
73 # result of the bug was files named q('extension_name',) *with the
74 # single quotes and the comma* in the extension build directories.
75 q!', 'DL_FUNCS' => !,neatvalue($funcs),
76 q!, 'FUNCLIST' => !,neatvalue($funclist),
77 q!, 'IMPORTS' => !,neatvalue($imports),
78 q!, 'DL_VARS' => !, neatvalue($vars), q!);"
79!);
80 }
8130s join('',@m);
82}
83
84=item replace_manpage_separator
85
86Changes the path separator with .
87
88=cut
89
90sub replace_manpage_separator {
91 my($self,$man) = @_;
92 $man =~ s,/+,.,g;
93 $man;
94}
95
96
97=item B<maybe_command>
98
99Since Windows has nothing as simple as an executable bit, we check the
100file extension.
101
102The PATHEXT env variable will be used to get a list of extensions that
103might indicate a command, otherwise .com, .exe, .bat and .cmd will be
104used by default.
105
106=cut
107
108
# spent 0s within ExtUtils::MM_Win32::maybe_command which was called: # once (0s+0s) by ExtUtils::MM_Unix::find_perl at line 1064 of ExtUtils/MM_Unix.pm
sub maybe_command {
10910s my($self,$file) = @_;
11010s my @e = exists($ENV{'PATHEXT'})
111 ? split(/;/, $ENV{PATHEXT})
112 : qw(.com .exe .bat .cmd);
11310s my $e = '';
114120s for (@e) { $e .= "\Q$_\E|" }
11510s chop $e;
116 # see if file ends in one of the known extensions
11710s30s if ($file =~ /($e)$/i) {
# spent 0s making 1 call to ExtUtils::MM_Win32::CORE:ftis # spent 0s making 1 call to ExtUtils::MM_Win32::CORE:match # spent 0s making 1 call to ExtUtils::MM_Win32::CORE:regcomp
118 return $file if -e $file;
119 }
120 else {
121 for (@e) {
122 return "$file$_" if -e "$file$_";
123 }
124 }
125 return;
126}
127
128
129=item B<init_DIRFILESEP>
130
131Using \ for Windows, except for "gmake" where it is /.
132
133=cut
134
135
# spent 1.11s (0+1.11) within ExtUtils::MM_Win32::init_DIRFILESEP which was called 3 times, avg 369ms/call: # 3 times (0s+1.11s) by ExtUtils::MakeMaker::new at line 661 of ExtUtils/MakeMaker.pm, avg 369ms/call
sub init_DIRFILESEP {
13630s my($self) = shift;
137
138 # The ^ makes sure its not interpreted as an escape in nmake
13930s91.11s $self->{DIRFILESEP} = $self->is_make_type('nmake') ? '^\\' :
# spent 1.11s making 9 calls to ExtUtils::MM_Any::is_make_type, avg 123ms/call
140 $self->is_make_type('dmake') ? '\\\\' :
141 $self->is_make_type('gmake') ? '/'
142 : '\\';
143}
144
145=item init_tools
146
147Override some of the slower, portable commands with Windows specific ones.
148
149=cut
150
151
# spent 10.4s (0+10.4) within ExtUtils::MM_Win32::init_tools which was called 3 times, avg 3.46s/call: # 3 times (0s+10.4s) by ExtUtils::MakeMaker::new at line 670 of ExtUtils/MakeMaker.pm, avg 3.46s/call
sub init_tools {
15230s my ($self) = @_;
153
15430s $self->{NOOP} ||= 'rem';
15530s $self->{DEV_NULL} ||= '> NUL';
156
15730s $self->{FIXIN} ||= $self->{PERL_CORE} ?
158 "\$(PERLRUN) $self->{PERL_SRC}\\win32\\bin\\pl2bat.pl" :
159 'pl2bat.bat';
160
16130s310.4s $self->SUPER::init_tools;
# spent 10.4s making 3 calls to ExtUtils::MM_Any::init_tools, avg 3.46s/call
162
163 # Setting SHELL from $Config{sh} can break dmake. Its ok without it.
16430s delete $self->{SHELL};
165
16630s return;
167}
168
169
170=item init_others
171
172Override the default link and compile tools.
173
174LDLOADLIBS's default is changed to $Config{libs}.
175
176Adjustments are made for Borland's quirks needing -L to come first.
177
178=cut
179
180
# spent 46.8ms (0s+46.8) within ExtUtils::MM_Win32::init_others which was called 3 times, avg 15.6ms/call: # 3 times (0s+46.8ms) by ExtUtils::MakeMaker::new at line 671 of ExtUtils/MakeMaker.pm, avg 15.6ms/call
sub init_others {
18130s my $self = shift;
182
18330s $self->{LD} ||= 'link';
18430s $self->{AR} ||= 'lib';
185
18630s346.8ms $self->SUPER::init_others;
# spent 46.8ms making 3 calls to ExtUtils::MM_Any::init_others, avg 15.6ms/call
187
18830s $self->{LDLOADLIBS} ||= $Config{libs};
189 # -Lfoo must come first for Borland, so we put it in LDDLFLAGS
19030s if ($BORLAND) {
191 my $libs = $self->{LDLOADLIBS};
192 my $libpath = '';
193 while ($libs =~ s/(?:^|\s)(("?)-L.+?\2)(?:\s|$)/ /) {
194 $libpath .= ' ' if length $libpath;
195 $libpath .= $1;
196 }
197 $self->{LDLOADLIBS} = $libs;
198 $self->{LDDLFLAGS} ||= $Config{lddlflags};
199 $self->{LDDLFLAGS} .= " $libpath";
200 }
201
20230s return;
203}
204
205
206=item init_platform
207
208Add MM_Win32_VERSION.
209
210=item platform_constants
211
212=cut
213
214
# spent 0s within ExtUtils::MM_Win32::init_platform which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 672 of ExtUtils/MakeMaker.pm, avg 0s/call
sub init_platform {
21530s my($self) = shift;
216
21730s $self->{MM_Win32_VERSION} = $VERSION;
218
21930s return;
220}
221
222
# spent 0s within ExtUtils::MM_Win32::platform_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 platform_constants {
22330s my($self) = shift;
22430s my $make_frag = '';
225
22630s foreach my $macro (qw(MM_Win32_VERSION))
227 {
22830s next unless defined $self->{$macro};
22930s $make_frag .= "$macro = $self->{$macro}\n";
230 }
231
23230s return $make_frag;
233}
234
235
236=item constants
237
238Add MAXLINELENGTH for dmake before all the constants are output.
239
240=cut
241
242
# spent 562ms (0s+562) within ExtUtils::MM_Win32::constants 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 constants {
24330s my $self = shift;
244
24530s30s my $make_text = $self->SUPER::constants;
# spent 0s making 3 calls to ExtUtils::MM_Unix::constants, avg 0s/call
24630s3562ms return $make_text unless $self->is_make_type('dmake');
# spent 562ms making 3 calls to ExtUtils::MM_Any::is_make_type, avg 187ms/call
247
248 # dmake won't read any single "line" (even those with escaped newlines)
249 # larger than a certain size which can be as small as 8k. PM_TO_BLIB
250 # on large modules like DateTime::TimeZone can create lines over 32k.
251 # So we'll crank it up to a <ironic>WHOPPING</ironic> 64k.
252 #
253 # This has to come here before all the constants and not in
254 # platform_constants which is after constants.
255 my $size = $self->{MAXLINELENGTH} || 800000;
256 my $prefix = qq{
257# Get dmake to read long commands like PM_TO_BLIB
258MAXLINELENGTH = $size
259
260};
261
262 return $prefix . $make_text;
263}
264
265
266=item special_targets
267
268Add .USESHELL target for dmake.
269
270=cut
271
272
# spent 562ms (0s+562) within ExtUtils::MM_Win32::special_targets 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 special_targets {
27330s my($self) = @_;
274
27530s30s my $make_frag = $self->SUPER::special_targets;
# spent 0s making 3 calls to ExtUtils::MM_Any::special_targets, avg 0s/call
276
27730s3562ms $make_frag .= <<'MAKE_FRAG' if $self->is_make_type('dmake');
# spent 562ms making 3 calls to ExtUtils::MM_Any::is_make_type, avg 187ms/call
278.USESHELL :
279MAKE_FRAG
280
28130s return $make_frag;
282}
283
284
285=item static_lib
286
287Changes how to run the linker.
288
289The rest is duplicate code from MM_Unix. Should move the linker code
290to its own method.
291
292=cut
293
294
# spent 0s within ExtUtils::MM_Win32::static_lib 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_lib {
29530s my($self) = @_;
29630s30s return '' unless $self->has_link_code;
# spent 0s making 3 calls to ExtUtils::MM_Unix::has_link_code, avg 0s/call
297
29830s my(@m);
29930s push(@m, <<'END');
300$(INST_STATIC): $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)$(DFSEP).exists
301 $(RM_RF) $@
302END
303
304 # If this extension has its own library (eg SDBM_File)
305 # then copy that to $(INST_STATIC) and add $(OBJECT) into it.
30630s push @m, <<'MAKE_FRAG' if $self->{MYEXTLIB};
307 $(CP) $(MYEXTLIB) $@
308MAKE_FRAG
309
31030s push @m,
311q{ $(AR) }.($BORLAND ? '$@ $(OBJECT:^"+")'
312 : ($GCC ? '-ru $@ $(OBJECT)'
313 : '-out:$@ $(OBJECT)')).q{
314 $(CHMOD) $(PERM_RWX) $@
315 $(NOECHO) $(ECHO) "$(EXTRALIBS)" > $(INST_ARCHAUTODIR)\extralibs.ld
316};
317
318 # Old mechanism - still available:
31930s push @m, <<'MAKE_FRAG' if $self->{PERL_SRC} && $self->{EXTRALIBS};
320 $(NOECHO) $(ECHO) "$(EXTRALIBS)" >> $(PERL_SRC)\ext.libs
321MAKE_FRAG
322
32330s join('', @m);
324}
325
326
327=item dynamic_lib
328
329Complicated stuff for Win32 that I don't understand. :(
330
331=cut
332
333
# spent 0s within ExtUtils::MM_Win32::dynamic_lib 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_lib {
33430s my($self, %attribs) = @_;
33530s30s return '' unless $self->needs_linking(); #might be because of a subdir
# spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call
336
33730s30s return '' unless $self->has_link_code;
# spent 0s making 3 calls to ExtUtils::MM_Unix::has_link_code, avg 0s/call
338
33930s my($otherldflags) = $attribs{OTHERLDFLAGS} || ($BORLAND ? 'c0d32.obj': '');
34030s my($inst_dynamic_dep) = $attribs{INST_DYNAMIC_DEP} || "";
34130s my($ldfrom) = '$(LDFROM)';
34230s my(@m);
343
34430s push(@m,'
345# This section creates the dynamically loadable $(INST_DYNAMIC)
346# from $(OBJECT) and possibly $(MYEXTLIB).
347OTHERLDFLAGS = '.$otherldflags.'
348INST_DYNAMIC_DEP = '.$inst_dynamic_dep.'
349
350$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).exists $(EXPORT_LIST) $(PERL_ARCHIVEDEP) $(INST_DYNAMIC_DEP)
351');
35230s if ($GCC) {
353 push(@m,
354 q{ }.$DLLTOOL.q{ --def $(EXPORT_LIST) --output-exp dll.exp
355 $(LD) -o $@ -Wl,--base-file -Wl,dll.base $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) $(MYEXTLIB) "$(PERL_ARCHIVE)" $(LDLOADLIBS) dll.exp
356 }.$DLLTOOL.q{ --def $(EXPORT_LIST) --base-file dll.base --output-exp dll.exp
357 $(LD) -o $@ $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) $(MYEXTLIB) "$(PERL_ARCHIVE)" $(LDLOADLIBS) dll.exp });
358 } elsif ($BORLAND) {
359 push(@m,
360 q{ $(LD) $(LDDLFLAGS) $(OTHERLDFLAGS) }.$ldfrom.q{,$@,,}
361 .($self->is_make_type('dmake')
362 ? q{"$(PERL_ARCHIVE:s,/,\,)" $(LDLOADLIBS:s,/,\,) }
363 .q{$(MYEXTLIB:s,/,\,),$(EXPORT_LIST:s,/,\,)}
364 : q{"$(subst /,\,$(PERL_ARCHIVE))" $(subst /,\,$(LDLOADLIBS)) }
365 .q{$(subst /,\,$(MYEXTLIB)),$(subst /,\,$(EXPORT_LIST))})
366 .q{,$(RESFILES)});
367 } else { # VC
368 push(@m,
369 q{ $(LD) -out:$@ $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) }
370 .q{$(MYEXTLIB) "$(PERL_ARCHIVE)" $(LDLOADLIBS) -def:$(EXPORT_LIST)});
371
372 # Embed the manifest file if it exists
373 push(@m, q{
374 if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2
375 if exist $@.manifest del $@.manifest});
376 }
37730s push @m, '
378 $(CHMOD) $(PERM_RWX) $@
379';
380
38130s join('',@m);
382}
383
384=item extra_clean_files
385
386Clean out some extra dll.{base,exp} files which might be generated by
387gcc. Otherwise, take out all *.pdb files.
388
389=cut
390
391
# spent 0s within ExtUtils::MM_Win32::extra_clean_files which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Any::clean at line 707 of ExtUtils/MM_Any.pm, avg 0s/call
sub extra_clean_files {
39230s my $self = shift;
393
39430s return $GCC ? (qw(dll.base dll.exp)) : ('*.pdb');
395}
396
397=item init_linker
398
399=cut
400
401
# spent 0s within ExtUtils::MM_Win32::init_linker which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 662 of ExtUtils/MakeMaker.pm, avg 0s/call
sub init_linker {
40230s my $self = shift;
403
40430s $self->{PERL_ARCHIVE} = "\$(PERL_INC)\\$Config{libperl}";
40530s $self->{PERL_ARCHIVEDEP} = "\$(PERL_INCDEP)\\$Config{libperl}";
40630s $self->{PERL_ARCHIVE_AFTER} = '';
40730s $self->{EXPORT_LIST} = '$(BASEEXT).def';
408}
409
410
411=item perl_script
412
413Checks for the perl program under several common perl extensions.
414
415=cut
416
417sub perl_script {
418 my($self,$file) = @_;
419 return $file if -r $file && -f _;
420 return "$file.pl" if -r "$file.pl" && -f _;
421 return "$file.plx" if -r "$file.plx" && -f _;
422 return "$file.bat" if -r "$file.bat" && -f _;
423 return;
424}
425
426sub can_dep_space {
427 my $self = shift;
428 1; # with Win32::GetShortPathName
429}
430
431=item quote_dep
432
433=cut
434
435
# spent 0s within ExtUtils::MM_Win32::quote_dep which was called 13 times, avg 0s/call: # 6 times (0s+0s) by ExtUtils::MM_Unix::constants at line 426 of ExtUtils/MM_Unix.pm, avg 0s/call # 4 times (0s+0s) by ExtUtils::MM_Unix::tool_xsubpp at line 3611 of ExtUtils/MM_Unix.pm, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::tool_xsubpp at line 3627 of ExtUtils/MM_Unix.pm, avg 0s/call
sub quote_dep {
436130s my ($self, $arg) = @_;
437130s130s if ($arg =~ / / and not $self->is_make_type('gmake')) {
# spent 0s making 13 calls to ExtUtils::MM_Win32::CORE:match, avg 0s/call
438 require Win32;
439 $arg = Win32::GetShortPathName($arg);
440 die <<EOF if not defined $arg or $arg =~ / /;
441Tried to use make dependency with space for non-GNU make:
442 '$arg'
443Fallback to short pathname failed.
444EOF
445 return $arg;
446 }
447130s130s return $self->SUPER::quote_dep($arg);
# spent 0s making 13 calls to ExtUtils::MM_Any::quote_dep, avg 0s/call
448}
449
450=item xs_o
451
452This target is stubbed out. Not sure why.
453
454=cut
455
456
# spent 0s within ExtUtils::MM_Win32::xs_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 xs_o {
45730s return ''
458}
459
460
461=item pasthru
462
463All we send is -nologo to nmake to prevent it from printing its damned
464banner.
465
466=cut
467
468
# spent 546ms (0s+546) within ExtUtils::MM_Win32::pasthru which was called 3 times, avg 182ms/call: # 3 times (0s+546ms) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 182ms/call
sub pasthru {
46930s my($self) = shift;
47030s3546ms return "PASTHRU = " . ($self->is_make_type('nmake') ? "-nologo" : "");
# spent 546ms making 3 calls to ExtUtils::MM_Any::is_make_type, avg 182ms/call
471}
472
473
474=item arch_check (override)
475
476Normalize all arguments for consistency of comparison.
477
478=cut
479
480
# spent 0s within ExtUtils::MM_Win32::arch_check which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 665 of ExtUtils/MakeMaker.pm, avg 0s/call
sub arch_check {
48130s my $self = shift;
482
483 # Win32 is an XS module, minperl won't have it.
484 # arch_check() is not critical, so just fake it.
48530s30s return 1 unless $self->can_load_xs;
# spent 0s making 3 calls to ExtUtils::MM_Any::can_load_xs, avg 0s/call
48690s90s return $self->SUPER::arch_check( map { $self->_normalize_path_name($_) } @_);
# spent 0s making 3 calls to ExtUtils::MM_Any::arch_check, avg 0s/call # spent 0s making 6 calls to ExtUtils::MM_Win32::_normalize_path_name, avg 0s/call
487}
488
489
# spent 0s within ExtUtils::MM_Win32::_normalize_path_name which was called 6 times, avg 0s/call: # 6 times (0s+0s) by ExtUtils::MM_Win32::arch_check at line 486, avg 0s/call
sub _normalize_path_name {
49060s my $self = shift;
49160s my $file = shift;
492
49360s require Win32;
49460s60s my $short = Win32::GetShortPathName($file);
# spent 0s making 6 calls to Win32::GetShortPathName, avg 0s/call
49560s return defined $short ? lc $short : lc $file;
496}
497
498
499=item oneliner
500
501These are based on what command.com does on Win98. They may be wrong
502for other Windows shells, I don't know.
503
504=cut
505
506
# spent 14.5s (0+14.5) within ExtUtils::MM_Win32::oneliner which was called 79 times, avg 184ms/call: # 6 times (0s+1.11s) by ExtUtils::MM_Any::distmeta_target at line 1416 of ExtUtils/MM_Any.pm, avg 185ms/call # 4 times (0s+749ms) by ExtUtils::MM_Any::realclean_subdirs_target at line 1610 of ExtUtils/MM_Any.pm, avg 187ms/call # 3 times (0s+609ms) by ExtUtils::MM_Unix::pm_to_blib at line 2910 of ExtUtils/MM_Unix.pm, avg 203ms/call # 3 times (0s+562ms) by ExtUtils::MM_Any::init_tools at line 2214 of ExtUtils/MM_Any.pm, avg 187ms/call # 3 times (0s+562ms) by ExtUtils::MM_Any::init_tools at line 2190 of ExtUtils/MM_Any.pm, avg 187ms/call # 3 times (0s+562ms) by ExtUtils::MM_Any::init_tools at line 2193 of ExtUtils/MM_Any.pm, avg 187ms/call # 3 times (0s+562ms) by ExtUtils::MM_Any::init_tools at line 2206 of ExtUtils/MM_Any.pm, avg 187ms/call # 3 times (0s+562ms) by ExtUtils::MM_Any::init_tools at line 2200 of ExtUtils/MM_Any.pm, avg 187ms/call # 3 times (0s+562ms) by ExtUtils::MM_Any::init_tools at line 2196 of ExtUtils/MM_Any.pm, avg 187ms/call # 3 times (0s+562ms) by ExtUtils::MM_Any::tool_autosplit at line 2540 of ExtUtils/MM_Any.pm, avg 187ms/call # 3 times (0s+546ms) by ExtUtils::MM_Any::init_tools at line 2198 of ExtUtils/MM_Any.pm, avg 182ms/call # 3 times (0s+546ms) by ExtUtils::MM_Any::init_tools at line 2205 of ExtUtils/MM_Any.pm, avg 182ms/call # 3 times (0s+546ms) by ExtUtils::MM_Any::init_tools at line 2199 of ExtUtils/MM_Any.pm, avg 182ms/call # 3 times (0s+546ms) by ExtUtils::MM_Any::init_tools at line 2197 of ExtUtils/MM_Any.pm, avg 182ms/call # 3 times (0s+546ms) by ExtUtils::MM_Any::init_tools at line 2203 of ExtUtils/MM_Any.pm, avg 182ms/call # 3 times (0s+546ms) by ExtUtils::MM_Any::init_tools at line 2194 of ExtUtils/MM_Any.pm, avg 182ms/call # 3 times (0s+546ms) by ExtUtils::MM_Any::distsignature_target at line 1658 of ExtUtils/MM_Any.pm, avg 182ms/call # 3 times (0s+546ms) by ExtUtils::MM_Any::init_tools at line 2212 of ExtUtils/MM_Any.pm, avg 182ms/call # 3 times (0s+546ms) by ExtUtils::MM_Any::init_tools at line 2208 of ExtUtils/MM_Any.pm, avg 182ms/call # 3 times (0s+530ms) by ExtUtils::MM_Any::init_tools at line 2201 of ExtUtils/MM_Any.pm, avg 177ms/call # 3 times (0s+530ms) by ExtUtils::MM_Any::init_tools at line 2195 of ExtUtils/MM_Any.pm, avg 177ms/call # 3 times (0s+530ms) by ExtUtils::MM_Any::init_tools at line 2217 of ExtUtils/MM_Any.pm, avg 177ms/call # 3 times (0s+530ms) by ExtUtils::MM_Any::init_tools at line 2191 of ExtUtils/MM_Any.pm, avg 177ms/call # 3 times (0s+530ms) by ExtUtils::MM_Any::init_tools at line 2213 of ExtUtils/MM_Any.pm, avg 177ms/call # 2 times (0s+359ms) by ExtUtils::MM_Any::clean_subdirs_target at line 750 of ExtUtils/MM_Any.pm, avg 179ms/call # once (0s+187ms) by ExtUtils::MM_Unix::dist_target at line 726 of ExtUtils/MM_Unix.pm
sub oneliner {
507790s my($self, $cmd, $switches) = @_;
508790s $switches = [] unless defined $switches;
509
510 # Strip leading and trailing newlines
511790s790s $cmd =~ s{^\n+}{};
# spent 0s making 79 calls to ExtUtils::MM_Win32::CORE:subst, avg 0s/call
512790s790s $cmd =~ s{\n+$}{};
# spent 0s making 79 calls to ExtUtils::MM_Win32::CORE:subst, avg 0s/call
513
514790s7914.5s $cmd = $self->quote_literal($cmd);
# spent 14.5s making 79 calls to ExtUtils::MM_Win32::quote_literal, avg 184ms/call
515790s790s $cmd = $self->escape_newlines($cmd);
# spent 0s making 79 calls to ExtUtils::MM_Win32::escape_newlines, avg 0s/call
516
517790s $switches = join ' ', @$switches;
518
519790s return qq{\$(ABSPERLRUN) $switches -e $cmd --};
520}
521
522
523
# spent 54.2s (0+54.2) within ExtUtils::MM_Win32::quote_literal which was called 292 times, avg 186ms/call: # 213 times (0s+39.7s) by ExtUtils::MM_Any::echo at line 376 of ExtUtils/MM_Any.pm, avg 186ms/call # 79 times (0s+14.5s) by ExtUtils::MM_Win32::oneliner at line 514, avg 184ms/call
sub quote_literal {
5242920s my($self, $text, $opts) = @_;
5252920s $opts->{allow_variables} = 1 unless defined $opts->{allow_variables};
526
527 # See: http://www.autohotkey.net/~deleyd/parameters/parameters.htm#CPP
528
529 # Apply the Microsoft C/C++ parsing rules
5302920s2920s $text =~ s{\\\\"}{\\\\\\\\\\"}g; # \\" -> \\\\\"
# spent 0s making 292 calls to ExtUtils::MM_Win32::CORE:subst, avg 0s/call
5312920s2920s $text =~ s{(?<!\\)\\"}{\\\\\\"}g; # \" -> \\\"
# spent 0s making 292 calls to ExtUtils::MM_Win32::CORE:subst, avg 0s/call
53229215.6ms29215.6ms $text =~ s{(?<!\\)"}{\\"}g; # " -> \"
# spent 15.6ms making 292 calls to ExtUtils::MM_Win32::CORE:subst, avg 53µs/call
5332920s2920s $text = qq{"$text"} if $text =~ /[ \t]/;
# spent 0s making 292 calls to ExtUtils::MM_Win32::CORE:match, avg 0s/call
534
535 # Apply the Command Prompt parsing rules (cmd.exe)
5362920s my @text = split /("[^"]*")/, $text;
537 # We should also escape parentheses, but it breaks one-liners containing
538 # $(MACRO)s in makefiles.
53910740s12370s s{([<>|&^@!])}{^$1}g foreach grep { !/^"[^"]*"$/ } @text;
# spent 0s making 782 calls to ExtUtils::MM_Win32::CORE:match, avg 0s/call # spent 0s making 426 calls to ExtUtils::MM_Win32::CORE:subst, avg 0s/call # spent 0s making 29 calls to ExtUtils::MM_Win32::CORE:substcont, avg 0s/call
5402920s $text = join('', @text);
541
542 # dmake expands {{ to { and }} to }.
5432920s29254.2s if( $self->is_make_type('dmake') ) {
# spent 54.2s making 292 calls to ExtUtils::MM_Any::is_make_type, avg 186ms/call
544 $text =~ s/{/{{/g;
545 $text =~ s/}/}}/g;
546 }
547
5482920s2920s $text = $opts->{allow_variables}
# spent 0s making 210 calls to ExtUtils::MM_Any::escape_all_dollarsigns, avg 0s/call # spent 0s making 82 calls to ExtUtils::MM_Any::escape_dollarsigns, avg 0s/call
549 ? $self->escape_dollarsigns($text) : $self->escape_all_dollarsigns($text);
550
5512920s return $text;
552}
553
554
555
# spent 0s within ExtUtils::MM_Win32::escape_newlines which was called 94 times, avg 0s/call: # 79 times (0s+0s) by ExtUtils::MM_Win32::oneliner at line 515, avg 0s/call # 15 times (0s+0s) by ExtUtils::MM_Any::split_command at line 325 of ExtUtils/MM_Any.pm, avg 0s/call
sub escape_newlines {
556940s my($self, $text) = @_;
557
558 # Escape newlines
559940s940s $text =~ s{\n}{\\\n}g;
# spent 0s making 94 calls to ExtUtils::MM_Win32::CORE:subst, avg 0s/call
560
561940s return $text;
562}
563
564
565=item cd
566
567dmake can handle Unix style cd'ing but nmake (at least 1.5) cannot. It
568wants:
569
570 cd dir1\dir2
571 command
572 another_command
573 cd ..\..
574
575=cut
576
577
# spent 4.27s (0+4.27) within ExtUtils::MM_Win32::cd which was called 23 times, avg 186ms/call: # 6 times (0s+1.11s) by ExtUtils::MM_Any::distmeta_target at line 1429 of ExtUtils/MM_Any.pm, avg 185ms/call # 3 times (0s+562ms) by ExtUtils::MM_Any::distsignature_target at line 1663 of ExtUtils/MM_Any.pm, avg 187ms/call # 3 times (0s+562ms) by ExtUtils::MM_Any::distsignature_target at line 1667 of ExtUtils/MM_Any.pm, avg 187ms/call # 3 times (0s+562ms) by ExtUtils::MM_Unix::perldepend at line 2867 of ExtUtils/MM_Unix.pm, avg 187ms/call # 3 times (0s+546ms) by ExtUtils::MM_Any::distsignature_target at line 1668 of ExtUtils/MM_Any.pm, avg 182ms/call # 2 times (0s+374ms) by ExtUtils::MM_Unix::test at line 3504 of ExtUtils/MM_Unix.pm, avg 187ms/call # 2 times (0s+374ms) by ExtUtils::MM_Unix::subdir_x at line 3426 of ExtUtils/MM_Unix.pm, avg 187ms/call # once (0s+187ms) by ExtUtils::MM_Any::dist_test at line 840 of ExtUtils/MM_Any.pm
sub cd {
578230s my($self, $dir, @cmds) = @_;
579
580230s464.27s return $self->SUPER::cd($dir, @cmds) unless $self->is_make_type('nmake');
# spent 4.27s making 23 calls to ExtUtils::MM_Any::is_make_type, avg 186ms/call # spent 0s making 23 calls to ExtUtils::MM_Unix::cd, avg 0s/call
581
582 my $cmd = join "\n\t", map "$_", @cmds;
583
584 my $updirs = $self->catdir(map { $self->updir } $self->splitdir($dir));
585
586 # No leading tab and no trailing newline makes for easier embedding.
587 my $make_frag = sprintf <<'MAKE_FRAG', $dir, $cmd, $updirs;
588cd %s
589 %s
590 cd %s
591MAKE_FRAG
592
593 chomp $make_frag;
594
595 return $make_frag;
596}
597
598
599=item max_exec_len
600
601nmake 1.50 limits command length to 2048 characters.
602
603=cut
604
605
# spent 0s within ExtUtils::MM_Win32::max_exec_len which was called 15 times, avg 0s/call: # 15 times (0s+0s) by ExtUtils::MM_Any::split_command at line 302 of ExtUtils/MM_Any.pm, avg 0s/call
sub max_exec_len {
606150s my $self = shift;
607
608150s return $self->{_MAX_EXEC_LEN} ||= 2 * 1024;
609}
610
611
612=item os_flavor
613
614Windows is Win32.
615
616=cut
617
618
# spent 0s within ExtUtils::MM_Win32::os_flavor which was called 1002 times, avg 0s/call: # 1002 times (0s+0s) by ExtUtils::MM_Any::os_flavor_is at line 107 of ExtUtils/MM_Any.pm, avg 0s/call
sub os_flavor {
61910020s return('Win32');
620}
621
622
623=item cflags
624
625Defines the PERLDLL symbol if we are configured for static building since all
626code destined for the perl5xx.dll must be compiled with the PERLDLL symbol
627defined.
628
629=cut
630
631
# spent 0s within ExtUtils::MM_Win32::cflags 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 cflags {
63230s my($self,$libperl)=@_;
63330s return $self->{CFLAGS} if $self->{CFLAGS};
63430s30s return '' unless $self->needs_linking();
# spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call
635
63630s30s my $base = $self->SUPER::cflags($libperl);
# spent 0s making 3 calls to ExtUtils::MM_Unix::cflags, avg 0s/call
63730s foreach (split /\n/, $base) {
638150s150s /^(\S*)\s*=\s*(\S*)$/ and $self->{$1} = $2;
# spent 0s making 15 calls to ExtUtils::MM_Win32::CORE:match, avg 0s/call
639 };
64030s $self->{CCFLAGS} .= " -DPERLDLL" if ($self->{LINKTYPE} eq 'static');
641
64230s return $self->{CFLAGS} = qq{
643CCFLAGS = $self->{CCFLAGS}
644OPTIMIZE = $self->{OPTIMIZE}
645PERLTYPE = $self->{PERLTYPE}
646};
647
648}
649
65010s1;
651__END__
 
# spent 0s within ExtUtils::MM_Win32::CORE:ftis which was called: # once (0s+0s) by ExtUtils::MM_Win32::maybe_command at line 117
sub ExtUtils::MM_Win32::CORE:ftis; # opcode
# spent 0s within ExtUtils::MM_Win32::CORE:match which was called 1105 times, avg 0s/call: # 782 times (0s+0s) by ExtUtils::MM_Win32::quote_literal at line 539, avg 0s/call # 292 times (0s+0s) by ExtUtils::MM_Win32::quote_literal at line 533, avg 0s/call # 15 times (0s+0s) by ExtUtils::MM_Win32::cflags at line 638, avg 0s/call # 13 times (0s+0s) by ExtUtils::MM_Win32::quote_dep at line 437, avg 0s/call # once (0s+0s) by ExtUtils::MM_Win32::_identify_compiler_environment at line 40 # once (0s+0s) by ExtUtils::MM_Win32::maybe_command at line 117 # once (0s+0s) by ExtUtils::MM_Win32::_identify_compiler_environment at line 39
sub ExtUtils::MM_Win32::CORE:match; # opcode
# spent 0s within ExtUtils::MM_Win32::CORE:regcomp which was called: # once (0s+0s) by ExtUtils::MM_Win32::maybe_command at line 117
sub ExtUtils::MM_Win32::CORE:regcomp; # opcode
# spent 15.6ms within ExtUtils::MM_Win32::CORE:subst which was called 1554 times, avg 10µs/call: # 426 times (0s+0s) by ExtUtils::MM_Win32::quote_literal at line 539, avg 0s/call # 292 times (15.6ms+0s) by ExtUtils::MM_Win32::quote_literal at line 532, avg 53µs/call # 292 times (0s+0s) by ExtUtils::MM_Win32::quote_literal at line 530, avg 0s/call # 292 times (0s+0s) by ExtUtils::MM_Win32::quote_literal at line 531, avg 0s/call # 94 times (0s+0s) by ExtUtils::MM_Win32::escape_newlines at line 559, avg 0s/call # 79 times (0s+0s) by ExtUtils::MM_Win32::oneliner at line 511, avg 0s/call # 79 times (0s+0s) by ExtUtils::MM_Win32::oneliner at line 512, avg 0s/call
sub ExtUtils::MM_Win32::CORE:subst; # opcode
# spent 0s within ExtUtils::MM_Win32::CORE:substcont which was called 29 times, avg 0s/call: # 29 times (0s+0s) by ExtUtils::MM_Win32::quote_literal at line 539, avg 0s/call
sub ExtUtils::MM_Win32::CORE:substcont; # opcode