Filename | C:/tmp64ng/perl/lib/ExtUtils/MM_Unix.pm |
Statements | Executed 5559 statements in 156ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 93.6ms | 93.6ms | CORE:backtick (opcode) | ExtUtils::MM_Unix::
43 | 8 | 1 | 15.6ms | 15.6ms | CORE:ftfile (opcode) | ExtUtils::MM_Unix::
3 | 1 | 1 | 15.6ms | 15.6ms | parse_version | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | BEGIN@10 | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | BEGIN@1250 | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | BEGIN@14 | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | BEGIN@17 | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | BEGIN@2472 | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | BEGIN@25 | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | BEGIN@43 | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | BEGIN@5 | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | BEGIN@7 | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | BEGIN@8 | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | BEGIN@9 | ExtUtils::MM_Unix::
4 | 2 | 1 | 0s | 0s | CORE:close (opcode) | ExtUtils::MM_Unix::
27 | 3 | 1 | 0s | 0s | CORE:ftdir (opcode) | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | CORE:fteexec (opcode) | ExtUtils::MM_Unix::
12 | 1 | 1 | 0s | 0s | CORE:fteread (opcode) | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | CORE:ftis (opcode) | ExtUtils::MM_Unix::
2 | 1 | 1 | 0s | 0s | CORE:ftlink (opcode) | ExtUtils::MM_Unix::
1258 | 19 | 1 | 0s | 0s | CORE:match (opcode) | ExtUtils::MM_Unix::
5 | 3 | 1 | 0s | 0s | CORE:open (opcode) | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | CORE:qr (opcode) | ExtUtils::MM_Unix::
178 | 1 | 1 | 0s | 0s | CORE:readline (opcode) | ExtUtils::MM_Unix::
35 | 5 | 1 | 0s | 0s | CORE:regcomp (opcode) | ExtUtils::MM_Unix::
39 | 10 | 1 | 0s | 0s | CORE:sort (opcode) | ExtUtils::MM_Unix::
547 | 24 | 1 | 0s | 0s | CORE:subst (opcode) | ExtUtils::MM_Unix::
6 | 1 | 1 | 0s | 0s | CORE:substcont (opcode) | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | __ANON__[:1565] | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | __ANON__[:2474] | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | _fixin_replace_shebang | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | _has_pod | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | _ppd_version | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | _rename | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | all_target | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | c_o | ExtUtils::MM_Unix::
23 | 1 | 1 | 0s | 0s | cd | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | cflags | ExtUtils::MM_Unix::
6 | 2 | 2 | 0s | 0s | const_cccmd | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | const_config | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | const_loadlibs | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | constants | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | depend | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | dist | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | dist_basics | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | dist_ci | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 187ms | dist_core | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 187ms | dist_target | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | dlsyms | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | dynamic_bs | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | dynamic_lib | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | escape_newlines | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | exescan | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 46.8ms | extliblist | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 93.6ms | find_perl | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | fixin | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | force | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | get_version | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | guess_name | ExtUtils::MM_Unix::
18 | 6 | 3 | 0s | 0s | has_link_code | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | init_DEST | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | init_DIRFILESEP | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | init_MAN1PODS | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | init_MAN3PODS | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | init_MANPODS | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 93.6ms | init_PERL | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | init_PERM | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | init_PM | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | init_dirscan | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | init_dist | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | init_lib2arch | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | init_linker | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | init_main | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | init_platform | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | init_tools | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 15.6ms | init_xs | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | install | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | installbin | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | linkext | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | lsdir | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | macro | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | makeaperl | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | makefile | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | max_exec_len | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | maybe_command | ExtUtils::MM_Unix::
30 | 10 | 2 | 0s | 0s | needs_linking | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | oneliner | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | os_flavor | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | parse_abstract | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | pasthru | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | perl_script | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 562ms | perldepend | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | platform_constants | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 609ms | pm_to_blib | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | post_constants | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | post_initialize | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | postamble | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 4.45s | ppd | ExtUtils::MM_Unix::
36 | 1 | 1 | 0s | 0s | prefixify | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | processPL | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | quote_literal | ExtUtils::MM_Unix::
72 | 3 | 1 | 0s | 0s | quote_paren | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | replace_manpage_separator | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | shdist_target | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | static | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | static_lib | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | staticmake | ExtUtils::MM_Unix::
2 | 1 | 1 | 0s | 374ms | subdir_x | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 374ms | subdirs | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | tardist_target | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | tarfile_target | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 920ms | test | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | test_via_harness | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | test_via_script | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | tool_xsubpp | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | top_targets | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | uutardist_target | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | writedoc | ExtUtils::MM_Unix::
3 | 1 | 1 | 0s | 0s | xs_c | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | xs_cpp | ExtUtils::MM_Unix::
0 | 0 | 0 | 0s | 0s | xs_o | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | zipdist_target | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | zipfile_target | ExtUtils::MM_Unix::
1 | 1 | 1 | 0s | 0s | BEGIN@2801 | ExtUtils::MakeMaker::_version::
3 | 1 | 1 | 0s | 0s | CORE:match (opcode) | ExtUtils::MakeMaker::_version::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package ExtUtils::MM_Unix; | ||||
2 | |||||
3 | 1 | 0s | require 5.006; | ||
4 | |||||
5 | 2 | 0s | 2 | 0s | # spent 0s within ExtUtils::MM_Unix::BEGIN@5 which was called:
# once (0s+0s) by main::BEGIN@1 at line 5 # spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@5
# spent 0s making 1 call to strict::import |
6 | |||||
7 | 2 | 0s | 2 | 0s | # spent 0s within ExtUtils::MM_Unix::BEGIN@7 which was called:
# once (0s+0s) by main::BEGIN@1 at line 7 # spent 0s making 1 call to Exporter::import
# spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@7 |
8 | 2 | 0s | 2 | 0s | # spent 0s within ExtUtils::MM_Unix::BEGIN@8 which was called:
# once (0s+0s) by main::BEGIN@1 at line 8 # spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@8
# spent 0s making 1 call to ExtUtils::MakeMaker::Config::import |
9 | 2 | 0s | 2 | 0s | # spent 0s within ExtUtils::MM_Unix::BEGIN@9 which was called:
# once (0s+0s) by main::BEGIN@1 at line 9 # spent 0s making 1 call to Exporter::import
# spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@9 |
10 | 2 | 0s | 1 | 0s | # spent 0s within ExtUtils::MM_Unix::BEGIN@10 which was called:
# once (0s+0s) by main::BEGIN@1 at line 10 # spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@10 |
11 | |||||
12 | 1 | 0s | our %Config_Override; | ||
13 | |||||
14 | 2 | 0s | 2 | 0s | # spent 0s within ExtUtils::MM_Unix::BEGIN@14 which was called:
# once (0s+0s) by main::BEGIN@1 at line 14 # 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 | ||||
17 | 2 | 0s | 2 | 0s | # spent 0s within ExtUtils::MM_Unix::BEGIN@17 which was called:
# once (0s+0s) by main::BEGIN@1 at line 17 # spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@17
# spent 0s making 1 call to vars::import |
18 | 1 | 0s | $VERSION = '7.04'; | ||
19 | 1 | 0s | $VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval] # spent 0s executing statements in string eval | ||
20 | |||||
21 | 1 | 0s | require ExtUtils::MM_Any; | ||
22 | 1 | 0s | our @ISA = qw(ExtUtils::MM_Any); | ||
23 | |||||
24 | 1 | 0s | my %Is; | ||
25 | # spent 0s within ExtUtils::MM_Unix::BEGIN@25 which was called:
# once (0s+0s) by main::BEGIN@1 at line 41 | ||||
26 | 1 | 0s | $Is{OS2} = $^O eq 'os2'; | ||
27 | 1 | 0s | $Is{Win32} = $^O eq 'MSWin32' || $Config{osname} eq 'NetWare'; | ||
28 | 1 | 0s | $Is{Dos} = $^O eq 'dos'; | ||
29 | 1 | 0s | $Is{VMS} = $^O eq 'VMS'; | ||
30 | 1 | 0s | $Is{OSF} = $^O eq 'dec_osf'; | ||
31 | 1 | 0s | $Is{IRIX} = $^O eq 'irix'; | ||
32 | 1 | 0s | $Is{NetBSD} = $^O eq 'netbsd'; | ||
33 | 1 | 0s | $Is{Interix} = $^O eq 'interix'; | ||
34 | 1 | 0s | $Is{SunOS4} = $^O eq 'sunos'; | ||
35 | 1 | 0s | $Is{Solaris} = $^O eq 'solaris'; | ||
36 | 1 | 0s | $Is{SunOS} = $Is{SunOS4} || $Is{Solaris}; | ||
37 | 1 | 0s | 1 | 0s | $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 | ); | ||||
40 | 1 | 0s | 1 | 0s | $Is{Android} = $^O =~ /android/; # spent 0s making 1 call to ExtUtils::MM_Unix::CORE:match |
41 | 1 | 0s | 1 | 0s | } # 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 | ||||
44 | 1 | 0s | if( $Is{VMS} ) { | ||
45 | # For things like vmsify() | ||||
46 | require VMS::Filespec; | ||||
47 | VMS::Filespec->import; | ||||
48 | } | ||||
49 | 1 | 0s | 1 | 0s | } # spent 0s making 1 call to ExtUtils::MM_Unix::BEGIN@43 |
50 | |||||
51 | |||||
52 | =head1 NAME | ||||
53 | |||||
54 | ExtUtils::MM_Unix - methods used by ExtUtils::MakeMaker | ||||
55 | |||||
56 | =head1 SYNOPSIS | ||||
57 | |||||
58 | C<require ExtUtils::MM_Unix;> | ||||
59 | |||||
60 | =head1 DESCRIPTION | ||||
61 | |||||
62 | The methods provided by this package are designed to be used in | ||||
63 | conjunction with ExtUtils::MakeMaker. When MakeMaker writes a | ||||
64 | Makefile, it creates one or more objects that inherit their methods | ||||
65 | from a package C<MM>. MM itself doesn't provide any methods, but it | ||||
66 | ISA ExtUtils::MM_Unix class. The inheritance tree of MM lets operating | ||||
67 | specific packages take the responsibility for all the methods provided | ||||
68 | by MM_Unix. We are trying to reduce the number of the necessary | ||||
69 | overrides by defining rather primitive operations within | ||||
70 | ExtUtils::MM_Unix. | ||||
71 | |||||
72 | If you are going to write a platform specific MM package, please try | ||||
73 | to limit the necessary overrides to primitive methods, and if it is not | ||||
74 | possible to do so, let's work out how to achieve that gain. | ||||
75 | |||||
76 | If you are overriding any of these methods in your Makefile.PL (in the | ||||
77 | MY class), please report that to the makemaker mailing list. We are | ||||
78 | trying to minimize the necessary method overrides and switch to data | ||||
79 | driven Makefile.PLs wherever possible. In the long run less methods | ||||
80 | will be overridable via the MY class. | ||||
81 | |||||
82 | =head1 METHODS | ||||
83 | |||||
84 | The following description of methods is still under | ||||
85 | development. Please refer to the code for not suitably documented | ||||
86 | sections and complain loudly to the makemaker@perl.org mailing list. | ||||
87 | Better yet, provide a patch. | ||||
88 | |||||
89 | Not all of the methods below are overridable in a | ||||
90 | Makefile.PL. Overridable methods are marked as (o). All methods are | ||||
91 | overridable by a platform specific MM_*.pm file. | ||||
92 | |||||
93 | Cross-platform methods are being moved into MM_Any. If you can't find | ||||
94 | something 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. | ||||
100 | 1 | 0s | 1 | 0s | my $Curdir = __PACKAGE__->curdir; # spent 0s making 1 call to File::Spec::Unix::curdir |
101 | 1 | 0s | 1 | 0s | my $Rootdir = __PACKAGE__->rootdir; # spent 0s making 1 call to File::Spec::Win32::rootdir |
102 | 1 | 0s | 1 | 0s | my $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 | |||||
111 | Simply says that we're Unix. | ||||
112 | |||||
113 | =cut | ||||
114 | |||||
115 | sub os_flavor { | ||||
116 | return('Unix'); | ||||
117 | } | ||||
118 | |||||
119 | |||||
120 | =item c_o (o) | ||||
121 | |||||
122 | Defines the suffix rules to compile different flavors of C files to | ||||
123 | object 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 | ||||
128 | # --- Translation Sections --- | ||||
129 | |||||
130 | 3 | 0s | my($self) = shift; | ||
131 | 3 | 0s | 3 | 0s | return '' unless $self->needs_linking(); # spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call |
132 | 3 | 0s | my(@m); | ||
133 | |||||
134 | 3 | 0s | my $command = '$(CCCMD)'; | ||
135 | 3 | 0s | my $flags = '$(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE)'; | ||
136 | |||||
137 | 3 | 0s | if (my $cpp = $Config{cpprun}) { | ||
138 | 3 | 0s | 3 | 0s | my $cpp_cmd = $self->const_cccmd; # spent 0s making 3 calls to ExtUtils::MM_Unix::const_cccmd, avg 0s/call |
139 | 3 | 0s | 3 | 0s | $cpp_cmd =~ s/^CCCMD\s*=\s*\$\(CC\)/$cpp/; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
140 | 3 | 0s | push @m, qq{ | ||
141 | .c.i: | ||||
142 | $cpp_cmd $flags \$*.c > \$*.i | ||||
143 | }; | ||||
144 | } | ||||
145 | |||||
146 | 3 | 0s | 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 | |||||
163 | 3 | 0s | push @m, qq{ | ||
164 | .C\$(OBJ_EXT): | ||||
165 | $command $flags \$*.C | ||||
166 | } if !$Is{OS2} and !$Is{Win32} and !$Is{Dos}; #Case-specific | ||||
167 | |||||
168 | 3 | 0s | return join "", @m; | ||
169 | } | ||||
170 | |||||
171 | =item cflags (o) | ||||
172 | |||||
173 | Does very much the same as the cflags script in the perl | ||||
174 | distribution. It doesn't return the whole compiler command line, but | ||||
175 | initializes all of its parts. The const_cccmd method then actually | ||||
176 | returns 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 | ||||
183 | 3 | 0s | my($self,$libperl)=@_; | ||
184 | 3 | 0s | return $self->{CFLAGS} if $self->{CFLAGS}; | ||
185 | 3 | 0s | 3 | 0s | return '' unless $self->needs_linking(); # spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call |
186 | |||||
187 | 3 | 0s | my($prog, $uc, $perltype, %cflags); | ||
188 | 3 | 0s | $libperl ||= $self->{LIBPERL_A} || "libperl$self->{LIB_EXT}" ; | ||
189 | 3 | 0s | 3 | 0s | $libperl =~ s/\.\$\(A\)$/$self->{LIB_EXT}/; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
190 | |||||
191 | 3 | 0s | @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). | ||||
198 | 3 | 0s | my @ccextraflags = qw(ccwarnflags); | ||
199 | 3 | 0s | if ($ENV{PERL_CORE}) { | ||
200 | for my $x (@ccextraflags) { | ||||
201 | if (exists $Config{$x}) { | ||||
202 | $cflags{$x} = $Config{$x}; | ||||
203 | } | ||||
204 | } | ||||
205 | } | ||||
206 | |||||
207 | 3 | 0s | my($optdebug) = ""; | ||
208 | |||||
209 | 3 | 0s | $cflags{shellflags} ||= ''; | ||
210 | |||||
211 | 3 | 0s | my(%map) = ( | ||
212 | D => '-DDEBUGGING', | ||||
213 | E => '-DEMBED', | ||||
214 | DE => '-DDEBUGGING -DEMBED', | ||||
215 | M => '-DEMBED -DMULTIPLICITY', | ||||
216 | DM => '-DDEBUGGING -DEMBED -DMULTIPLICITY', | ||||
217 | ); | ||||
218 | |||||
219 | 3 | 0s | 6 | 0s | 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 | } | ||||
224 | 3 | 0s | $perltype = $map{$uc} ? $map{$uc} : ""; | ||
225 | |||||
226 | 3 | 0s | 3 | 0s | if ($uc =~ /^D/) { # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call |
227 | $optdebug = "-g"; | ||||
228 | } | ||||
229 | |||||
230 | |||||
231 | 3 | 0s | my($name); | ||
232 | 3 | 0s | 3 | 0s | ( $name = $self->{NAME} . "_cflags" ) =~ s/:/_/g ; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
233 | 3 | 0s | 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 | |||||
259 | 3 | 0s | if ($optdebug) { | ||
260 | $cflags{optimize} = $optdebug; | ||||
261 | } | ||||
262 | |||||
263 | 3 | 0s | for (qw(ccflags optimize perltype)) { | ||
264 | 9 | 0s | $cflags{$_} ||= ''; | ||
265 | 9 | 0s | 9 | 0s | $cflags{$_} =~ s/^\s+//; # spent 0s making 9 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
266 | 9 | 0s | 9 | 0s | $cflags{$_} =~ s/\s+/ /g; # spent 0s making 9 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
267 | 9 | 0s | 9 | 0s | $cflags{$_} =~ s/\s+$//; # spent 0s making 9 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
268 | 9 | 0s | $self->{uc $_} ||= $cflags{$_}; | ||
269 | } | ||||
270 | |||||
271 | 3 | 0s | if ($self->{POLLUTE}) { | ||
272 | $self->{CCFLAGS} .= ' -DPERL_POLLUTE '; | ||||
273 | } | ||||
274 | |||||
275 | 3 | 0s | for my $x (@ccextraflags) { | ||
276 | 3 | 0s | next unless exists $cflags{$x}; | ||
277 | $self->{CCFLAGS} .= $cflags{$x} =~ m!^\s! ? $cflags{$x} : ' ' . $cflags{$x}; | ||||
278 | } | ||||
279 | |||||
280 | 3 | 0s | my $pollute = ''; | ||
281 | 3 | 0s | 3 | 0s | 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 | |||||
287 | 3 | 0s | 3 | 0s | $self->{CCFLAGS} = quote_paren($self->{CCFLAGS}); # spent 0s making 3 calls to ExtUtils::MM_Unix::quote_paren, avg 0s/call |
288 | 3 | 0s | 3 | 0s | $self->{OPTIMIZE} = quote_paren($self->{OPTIMIZE}); # spent 0s making 3 calls to ExtUtils::MM_Unix::quote_paren, avg 0s/call |
289 | |||||
290 | 3 | 0s | return $self->{CFLAGS} = qq{ | ||
291 | CCFLAGS = $self->{CCFLAGS} | ||||
292 | OPTIMIZE = $self->{OPTIMIZE} | ||||
293 | PERLTYPE = $self->{PERLTYPE} | ||||
294 | MPOLLUTE = $pollute | ||||
295 | }; | ||||
296 | |||||
297 | } | ||||
298 | |||||
299 | |||||
300 | =item const_cccmd (o) | ||||
301 | |||||
302 | Returns the full compiler call for C programs and stores the | ||||
303 | definition 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 | ||||
308 | 6 | 0s | my($self,$libperl)=@_; | ||
309 | 6 | 0s | return $self->{CONST_CCCMD} if $self->{CONST_CCCMD}; | ||
310 | 3 | 0s | 3 | 0s | return '' unless $self->needs_linking(); # spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call |
311 | 3 | 0s | 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 | |||||
320 | Defines 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 | ||||
326 | # --- Constants Sections --- | ||||
327 | |||||
328 | 3 | 0s | my($self) = shift; | ||
329 | 3 | 0s | 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. | ||||
333 | END | ||||
334 | |||||
335 | 3 | 0s | my(%once_only); | ||
336 | 3 | 0s | foreach my $key (@{$self->{CONFIG}}){ | ||
337 | # SITE*EXP macros are defined in &constants; avoid duplicates here | ||||
338 | 66 | 0s | next if $once_only{$key}; | ||
339 | 66 | 0s | 66 | 0s | $self->{uc $key} = quote_paren($self->{uc $key}); # spent 0s making 66 calls to ExtUtils::MM_Unix::quote_paren, avg 0s/call |
340 | 66 | 0s | push @m, uc($key) , ' = ' , $self->{uc $key}, "\n"; | ||
341 | 66 | 0s | $once_only{$key} = 1; | ||
342 | } | ||||
343 | 3 | 0s | join('', @m); | ||
344 | } | ||||
345 | |||||
346 | =item const_loadlibs (o) | ||||
347 | |||||
348 | Defines EXTRALIBS, LDLOADLIBS, BSLOADLIBS, LD_RUN_PATH. See | ||||
349 | L<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 | ||||
354 | 3 | 0s | my($self) = shift; | ||
355 | 3 | 0s | 3 | 0s | return "" unless $self->needs_linking; # spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call |
356 | 3 | 0s | my @m; | ||
357 | 3 | 0s | push @m, qq{ | ||
358 | # $self->{NAME} might depend on some other libraries: | ||||
359 | # See ExtUtils::Liblist for details | ||||
360 | # | ||||
361 | }; | ||||
362 | 3 | 0s | for my $tmp (qw/ | ||
363 | EXTRALIBS LDLOADLIBS BSLOADLIBS | ||||
364 | /) { | ||||
365 | 9 | 0s | next unless defined $self->{$tmp}; | ||
366 | 9 | 0s | push @m, "$tmp = $self->{$tmp}\n"; | ||
367 | } | ||||
368 | # don't set LD_RUN_PATH if empty | ||||
369 | 3 | 0s | for my $tmp (qw/ | ||
370 | LD_RUN_PATH | ||||
371 | /) { | ||||
372 | 3 | 0s | next unless $self->{$tmp}; | ||
373 | push @m, "$tmp = $self->{$tmp}\n"; | ||||
374 | } | ||||
375 | 3 | 0s | return join "", @m; | ||
376 | } | ||||
377 | |||||
378 | =item constants (o) | ||||
379 | |||||
380 | my $make_frag = $mm->constants; | ||||
381 | |||||
382 | Prints 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 | ||||
387 | 3 | 0s | my($self) = @_; | ||
388 | 3 | 0s | my @m = (); | ||
389 | |||||
390 | 3 | 0s | $self->{DFSEP} = '$(DIRFILESEP)'; # alias for internal use | ||
391 | |||||
392 | 3 | 0s | 3 | 0s | 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 | { | ||||
421 | 264 | 0s | 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. | ||||
425 | 255 | 0s | 255 | 0s | $self->{$macro} =~ s/#/\\#/g; # spent 0s making 255 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
426 | 255 | 0s | 6 | 0s | $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}; | ||||
428 | 255 | 0s | push @m, "$macro = $self->{$macro}\n"; | ||
429 | } | ||||
430 | |||||
431 | 3 | 0s | push @m, qq{ | ||
432 | MAKEMAKER = $self->{MAKEMAKER} | ||||
433 | MM_VERSION = $self->{MM_VERSION} | ||||
434 | MM_REVISION = $self->{MM_REVISION} | ||||
435 | }; | ||||
436 | |||||
437 | 3 | 0s | 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 | |||||
444 | 3 | 0s | for my $macro (qw/ | ||
445 | MAKE | ||||
446 | FULLEXT BASEEXT PARENT_NAME DLBASE VERSION_FROM INC DEFINE OBJECT | ||||
447 | LDFROM LINKTYPE BOOTDEP | ||||
448 | / ) | ||||
449 | { | ||||
450 | 36 | 0s | next unless defined $self->{$macro}; | ||
451 | 31 | 0s | push @m, "$macro = $self->{$macro}\n"; | ||
452 | } | ||||
453 | |||||
454 | push @m, " | ||||
455 | # Handy lists of source code files: | ||||
456 | XS_FILES = ".$self->wraplist(sort keys %{$self->{XS}})." | ||||
457 | C_FILES = ".$self->wraplist(@{$self->{C}})." | ||||
458 | O_FILES = ".$self->wraplist(@{$self->{O_FILES}})." | ||||
459 | H_FILES = ".$self->wraplist(@{$self->{H}})." | ||||
460 | MAN1PODS = ".$self->wraplist(sort keys %{$self->{MAN1PODS}})." | ||||
461 | 3 | 0s | 27 | 0s | MAN3PODS = ".$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 | |||||
465 | 3 | 0s | 6 | 0s | 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 | ||||
467 | CONFIGDEP = $(PERL_ARCHLIBDEP)$(DFSEP)Config.pm $(PERL_INCDEP)$(DFSEP)config.h | ||||
468 | } if -e File::Spec->catfile( $self->{PERL_INC}, 'config.h' ); | ||||
469 | |||||
470 | |||||
471 | 3 | 0s | push @m, qq{ | ||
472 | # Where to build things | ||||
473 | INST_LIBDIR = $self->{INST_LIBDIR} | ||||
474 | INST_ARCHLIBDIR = $self->{INST_ARCHLIBDIR} | ||||
475 | |||||
476 | INST_AUTODIR = $self->{INST_AUTODIR} | ||||
477 | INST_ARCHAUTODIR = $self->{INST_ARCHAUTODIR} | ||||
478 | |||||
479 | INST_STATIC = $self->{INST_STATIC} | ||||
480 | INST_DYNAMIC = $self->{INST_DYNAMIC} | ||||
481 | INST_BOOT = $self->{INST_BOOT} | ||||
482 | }; | ||||
483 | |||||
484 | 3 | 0s | push @m, qq{ | ||
485 | # Extra linker info | ||||
486 | EXPORT_LIST = $self->{EXPORT_LIST} | ||||
487 | PERL_ARCHIVE = $self->{PERL_ARCHIVE} | ||||
488 | PERL_ARCHIVEDEP = $self->{PERL_ARCHIVEDEP} | ||||
489 | PERL_ARCHIVE_AFTER = $self->{PERL_ARCHIVE_AFTER} | ||||
490 | }; | ||||
491 | |||||
492 | push @m, " | ||||
493 | |||||
494 | TO_INST_PM = ".$self->wraplist(sort keys %{$self->{PM}})." | ||||
495 | |||||
496 | 3 | 0s | 12 | 0s | PM_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 | |||||
499 | 3 | 0s | join('',@m); | ||
500 | } | ||||
501 | |||||
502 | |||||
503 | =item depend (o) | ||||
504 | |||||
505 | Same 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 | ||||
510 | 3 | 0s | my($self,%attribs) = @_; | ||
511 | 3 | 0s | my(@m,$key,$val); | ||
512 | 3 | 0s | while (($key,$val) = each %attribs){ | ||
513 | last unless defined $key; | ||||
514 | push @m, "$key : $val\n"; | ||||
515 | } | ||||
516 | 3 | 0s | join "", @m; | ||
517 | } | ||||
518 | |||||
519 | |||||
520 | =item init_DEST | ||||
521 | |||||
522 | $mm->init_DEST | ||||
523 | |||||
524 | Defines 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 | ||||
529 | 3 | 0s | my $self = shift; | ||
530 | |||||
531 | # Initialize DESTDIR | ||||
532 | 3 | 0s | $self->{DESTDIR} ||= ''; | ||
533 | |||||
534 | # Make DEST variables. | ||||
535 | 3 | 0s | 3 | 0s | foreach my $var ($self->installvars) { # spent 0s making 3 calls to ExtUtils::MM_Any::installvars, avg 0s/call |
536 | 54 | 0s | my $destvar = 'DESTINSTALL'.$var; | ||
537 | 54 | 0s | $self->{$destvar} ||= '$(DESTDIR)$(INSTALL'.$var.')'; | ||
538 | } | ||||
539 | } | ||||
540 | |||||
541 | |||||
542 | =item init_dist | ||||
543 | |||||
544 | $mm->init_dist; | ||||
545 | |||||
546 | Defines 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 | ||||
588 | 3 | 0s | my $self = shift; | ||
589 | |||||
590 | 3 | 0s | $self->{TAR} ||= 'tar'; | ||
591 | 3 | 0s | $self->{TARFLAGS} ||= 'cvf'; | ||
592 | 3 | 0s | $self->{ZIP} ||= 'zip'; | ||
593 | 3 | 0s | $self->{ZIPFLAGS} ||= '-r'; | ||
594 | 3 | 0s | $self->{COMPRESS} ||= 'gzip --best'; | ||
595 | 3 | 0s | $self->{SUFFIX} ||= '.gz'; | ||
596 | 3 | 0s | $self->{SHAR} ||= 'shar'; | ||
597 | 3 | 0s | $self->{PREOP} ||= '$(NOECHO) $(NOOP)'; # eg update MANIFEST | ||
598 | 3 | 0s | $self->{POSTOP} ||= '$(NOECHO) $(NOOP)'; # eg remove the distdir | ||
599 | 3 | 0s | $self->{TO_UNIX} ||= '$(NOECHO) $(NOOP)'; | ||
600 | |||||
601 | 3 | 0s | $self->{CI} ||= 'ci -u'; | ||
602 | 3 | 0s | $self->{RCS_LABEL}||= 'rcs -Nv$(VERSION_SYM): -q'; | ||
603 | 3 | 0s | $self->{DIST_CP} ||= 'best'; | ||
604 | 3 | 0s | $self->{DIST_DEFAULT} ||= 'tardist'; | ||
605 | |||||
606 | 3 | 0s | 3 | 0s | ($self->{DISTNAME} = $self->{NAME}) =~ s{::}{-}g unless $self->{DISTNAME}; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
607 | 3 | 0s | $self->{DISTVNAME} ||= $self->{DISTNAME}.'-'.$self->{VERSION}; | ||
608 | } | ||||
609 | |||||
610 | =item dist (o) | ||||
611 | |||||
612 | my $dist_macros = $mm->dist(%overrides); | ||||
613 | |||||
614 | Generates a make fragment defining all the macros initialized in | ||||
615 | init_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 | ||||
622 | 1 | 0s | my($self, %attribs) = @_; | ||
623 | |||||
624 | 1 | 0s | my $make = ''; | ||
625 | 1 | 0s | if ( $attribs{SUFFIX} && $attribs{SUFFIX} !~ m!^\.! ) { | ||
626 | $attribs{SUFFIX} = '.' . $attribs{SUFFIX}; | ||||
627 | } | ||||
628 | 1 | 0s | 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 | { | ||||
635 | 16 | 0s | my $value = $attribs{$key} || $self->{$key}; | ||
636 | 16 | 0s | $make .= "$key = $value\n"; | ||
637 | } | ||||
638 | |||||
639 | 1 | 0s | return $make; | ||
640 | } | ||||
641 | |||||
642 | =item dist_basics (o) | ||||
643 | |||||
644 | Defines 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 | ||||
649 | 1 | 0s | my($self) = shift; | ||
650 | |||||
651 | 1 | 0s | return <<'MAKE_FRAG'; | ||
652 | distclean :: realclean distcheck | ||||
653 | $(NOECHO) $(NOOP) | ||||
654 | |||||
655 | distcheck : | ||||
656 | $(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck | ||||
657 | |||||
658 | skipcheck : | ||||
659 | $(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck | ||||
660 | |||||
661 | manifest : | ||||
662 | $(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest | ||||
663 | |||||
664 | veryclean : realclean | ||||
665 | $(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old | ||||
666 | |||||
667 | MAKE_FRAG | ||||
668 | |||||
669 | } | ||||
670 | |||||
671 | =item dist_ci (o) | ||||
672 | |||||
673 | Defines 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 | ||||
678 | 1 | 0s | my($self) = shift; | ||
679 | 1 | 0s | return q{ | ||
680 | ci : | ||||
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 | |||||
692 | Puts the targets necessary for 'make dist' together into one make | ||||
693 | fragment. | ||||
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 | ||||
698 | 1 | 0s | my($self) = shift; | ||
699 | |||||
700 | 1 | 0s | my $make_frag = ''; | ||
701 | 1 | 0s | foreach my $target (qw(dist tardist uutardist tarfile zipdist zipfile | ||
702 | shdist)) | ||||
703 | { | ||||
704 | 7 | 0s | my $method = $target.'_target'; | ||
705 | 7 | 0s | $make_frag .= "\n"; | ||
706 | 7 | 0s | 7 | 187ms | $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 | |||||
709 | 1 | 0s | return $make_frag; | ||
710 | } | ||||
711 | |||||
712 | |||||
713 | =item B<dist_target> | ||||
714 | |||||
715 | my $make_frag = $MM->dist_target; | ||||
716 | |||||
717 | Returns the 'dist' target to make an archive for distribution. This | ||||
718 | target simply checks to make sure the Makefile is up-to-date and | ||||
719 | depends 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 | ||||
724 | 1 | 0s | my($self) = shift; | ||
725 | |||||
726 | 1 | 0s | 1 | 187ms | my $date_check = $self->oneliner(<<'CODE', ['-l']); # spent 187ms making 1 call to ExtUtils::MM_Win32::oneliner |
727 | print 'Warning: Makefile possibly out of date with $(VERSION_FROM)' | ||||
728 | if -e '$(VERSION_FROM)' and -M '$(VERSION_FROM)' < -M '$(FIRST_MAKEFILE)'; | ||||
729 | CODE | ||||
730 | |||||
731 | 1 | 0s | return sprintf <<'MAKE_FRAG', $date_check; | ||
732 | dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE) | ||||
733 | $(NOECHO) %s | ||||
734 | MAKE_FRAG | ||||
735 | } | ||||
736 | |||||
737 | =item B<tardist_target> | ||||
738 | |||||
739 | my $make_frag = $MM->tardist_target; | ||||
740 | |||||
741 | Returns the 'tardist' target which is simply so 'make tardist' works. | ||||
742 | The real work is done by the dynamically named tardistfile_target() | ||||
743 | method, 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 | ||||
748 | 1 | 0s | my($self) = shift; | ||
749 | |||||
750 | 1 | 0s | return <<'MAKE_FRAG'; | ||
751 | tardist : $(DISTVNAME).tar$(SUFFIX) | ||||
752 | $(NOECHO) $(NOOP) | ||||
753 | MAKE_FRAG | ||||
754 | } | ||||
755 | |||||
756 | =item B<zipdist_target> | ||||
757 | |||||
758 | my $make_frag = $MM->zipdist_target; | ||||
759 | |||||
760 | Returns the 'zipdist' target which is simply so 'make zipdist' works. | ||||
761 | The real work is done by the dynamically named zipdistfile_target() | ||||
762 | method, 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 | ||||
767 | 1 | 0s | my($self) = shift; | ||
768 | |||||
769 | 1 | 0s | return <<'MAKE_FRAG'; | ||
770 | zipdist : $(DISTVNAME).zip | ||||
771 | $(NOECHO) $(NOOP) | ||||
772 | MAKE_FRAG | ||||
773 | } | ||||
774 | |||||
775 | =item B<tarfile_target> | ||||
776 | |||||
777 | my $make_frag = $MM->tarfile_target; | ||||
778 | |||||
779 | The name of this target is the name of the tarball generated by | ||||
780 | tardist. This target does the actual work of turning the distdir into | ||||
781 | a 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 | ||||
786 | 1 | 0s | my($self) = shift; | ||
787 | |||||
788 | 1 | 0s | 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) | ||||
797 | MAKE_FRAG | ||||
798 | } | ||||
799 | |||||
800 | =item zipfile_target | ||||
801 | |||||
802 | my $make_frag = $MM->zipfile_target; | ||||
803 | |||||
804 | The name of this target is the name of the zip file generated by | ||||
805 | zipdist. This target does the actual work of turning the distdir into | ||||
806 | a 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 | ||||
811 | 1 | 0s | my($self) = shift; | ||
812 | |||||
813 | 1 | 0s | 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) | ||||
820 | MAKE_FRAG | ||||
821 | } | ||||
822 | |||||
823 | =item uutardist_target | ||||
824 | |||||
825 | my $make_frag = $MM->uutardist_target; | ||||
826 | |||||
827 | Converts 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 | ||||
832 | 1 | 0s | my($self) = shift; | ||
833 | |||||
834 | 1 | 0s | return <<'MAKE_FRAG'; | ||
835 | uutardist : $(DISTVNAME).tar$(SUFFIX) | ||||
836 | uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu | ||||
837 | $(NOECHO) $(ECHO) 'Created $(DISTVNAME).tar$(SUFFIX)_uu' | ||||
838 | MAKE_FRAG | ||||
839 | } | ||||
840 | |||||
841 | |||||
842 | =item shdist_target | ||||
843 | |||||
844 | my $make_frag = $MM->shdist_target; | ||||
845 | |||||
846 | Converts 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 | ||||
851 | 1 | 0s | my($self) = shift; | ||
852 | |||||
853 | 1 | 0s | return <<'MAKE_FRAG'; | ||
854 | shdist : distdir | ||||
855 | $(PREOP) | ||||
856 | $(SHAR) $(DISTVNAME) > $(DISTVNAME).shar | ||||
857 | $(RM_RF) $(DISTVNAME) | ||||
858 | $(NOECHO) $(ECHO) 'Created $(DISTVNAME).shar' | ||||
859 | $(POSTOP) | ||||
860 | MAKE_FRAG | ||||
861 | } | ||||
862 | |||||
863 | |||||
864 | =item dlsyms (o) | ||||
865 | |||||
866 | Used by some OS' to define DL_FUNCS and DL_VARS and write the *.exp files. | ||||
867 | |||||
868 | Normally just returns an empty string. | ||||
869 | |||||
870 | =cut | ||||
871 | |||||
872 | sub dlsyms { | ||||
873 | return ''; | ||||
874 | } | ||||
875 | |||||
876 | |||||
877 | =item dynamic_bs (o) | ||||
878 | |||||
879 | Defines 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 | ||||
884 | 3 | 0s | my($self, %attribs) = @_; | ||
885 | 3 | 0s | 3 | 0s | return ' # spent 0s making 3 calls to ExtUtils::MM_Unix::has_link_code, avg 0s/call |
886 | BOOTSTRAP = | ||||
887 | ' unless $self->has_link_code(); | ||||
888 | |||||
889 | 3 | 0s | my $target = $Is{VMS} ? '$(MMS$TARGET)' : '$@'; | ||
890 | |||||
891 | 3 | 0s | return sprintf <<'MAKE_FRAG', ($target) x 2; | ||
892 | BOOTSTRAP = $(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" | ||||
904 | MAKE_FRAG | ||||
905 | } | ||||
906 | |||||
907 | =item dynamic_lib (o) | ||||
908 | |||||
909 | Defines how to produce the *.so (or equivalent) files. | ||||
910 | |||||
911 | =cut | ||||
912 | |||||
913 | sub 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). | ||||
930 | ARMAYBE = '.$armaybe.' | ||||
931 | OTHERLDFLAGS = '.$ld_opt.$otherldflags.' | ||||
932 | INST_DYNAMIC_DEP = '.$inst_dynamic_dep.' | ||||
933 | INST_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) | ||||
983 | MAKE | ||||
984 | |||||
985 | push @m, <<'MAKE'; | ||||
986 | $(CHMOD) $(PERM_RWX) $@ | ||||
987 | $(NOECHO) $(RM_RF) $(BOOTSTRAP) | ||||
988 | - $(CP_NONEMPTY) $(BOOTSTRAP) $(INST_BOOT) $(PERM_RW) | ||||
989 | MAKE | ||||
990 | |||||
991 | return join('',@m); | ||||
992 | } | ||||
993 | |||||
994 | =item exescan | ||||
995 | |||||
996 | Deprecated method. Use libscan instead. | ||||
997 | |||||
998 | =cut | ||||
999 | |||||
1000 | sub exescan { | ||||
1001 | my($self,$path) = @_; | ||||
1002 | $path; | ||||
1003 | } | ||||
1004 | |||||
1005 | =item extliblist | ||||
1006 | |||||
1007 | Called by init_others, and calls ext ExtUtils::Liblist. See | ||||
1008 | L<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 | ||||
1013 | 3 | 0s | my($self,$libs) = @_; | ||
1014 | 3 | 0s | require ExtUtils::Liblist; | ||
1015 | 3 | 0s | 3 | 0s | $self->ext($libs, $Verbose); # spent 0s making 3 calls to ExtUtils::Liblist::ext, avg 0s/call |
1016 | } | ||||
1017 | |||||
1018 | =item find_perl | ||||
1019 | |||||
1020 | Finds 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 | ||||
1025 | 1 | 0s | my($self, $ver, $names, $dirs, $trace) = @_; | ||
1026 | |||||
1027 | 1 | 0s | if ($trace >= 2){ | ||
1028 | print "Looking for perl $ver by these names: | ||||
1029 | @$names | ||||
1030 | in these dirs: | ||||
1031 | @$dirs | ||||
1032 | "; | ||||
1033 | } | ||||
1034 | |||||
1035 | 1 | 0s | my $stderr_duped = 0; | ||
1036 | 1 | 0s | local *STDERR_COPY; | ||
1037 | |||||
1038 | 1 | 0s | unless ($Is{BSD}) { | ||
1039 | # >& and lexical filehandles together give 5.6.2 indigestion | ||||
1040 | 1 | 0s | 1 | 0s | 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; | ||||
1045 | find_perl() can't dup STDERR: $! | ||||
1046 | You might see some garbage while we search for Perl | ||||
1047 | WARNING | ||||
1048 | } | ||||
1049 | } | ||||
1050 | |||||
1051 | 1 | 0s | foreach my $name (@$names){ | ||
1052 | 1 | 0s | foreach my $dir (@$dirs){ | ||
1053 | 1 | 0s | next unless defined $dir; # $self->{PERL_SRC} may be undefined | ||
1054 | 1 | 0s | my ($abs, $val); | ||
1055 | 1 | 0s | 1 | 0s | 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 | } | ||||
1063 | 1 | 0s | print "Checking $abs\n" if ($trace >= 2); | ||
1064 | 1 | 0s | 1 | 0s | next unless $self->maybe_command($abs); # spent 0s making 1 call to ExtUtils::MM_Win32::maybe_command |
1065 | 1 | 0s | print "Executing $abs\n" if ($trace >= 2); | ||
1066 | |||||
1067 | 1 | 0s | 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. | ||||
1075 | 1 | 0s | if ($Is{BSD}) { | ||
1076 | $val = `$version_check 2>&1`; | ||||
1077 | } else { | ||||
1078 | 1 | 0s | 1 | 0s | close STDERR if $stderr_duped; # spent 0s making 1 call to ExtUtils::MM_Unix::CORE:close |
1079 | 1 | 93.6ms | 1 | 93.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 >& | ||||
1082 | 1 | 0s | 1 | 0s | open STDERR, ">&STDERR_COPY" ## no critic # spent 0s making 1 call to ExtUtils::MM_Unix::CORE:open |
1083 | if $stderr_duped; | ||||
1084 | } | ||||
1085 | |||||
1086 | 1 | 0s | 1 | 0s | if ($val =~ /^VER_OK/m) { # spent 0s making 1 call to ExtUtils::MM_Unix::CORE:match |
1087 | 1 | 0s | print "Using PERL=$abs\n" if $trace; | ||
1088 | 1 | 0s | 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 | |||||
1103 | Inserts the sharpbang or equivalent magic number to a set of @files. | ||||
1104 | |||||
1105 | =cut | ||||
1106 | |||||
1107 | sub 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 | |||||
1156 | sub _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 | |||||
1170 | sub _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 | |||||
1226 | Writes 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 | ||||
1231 | 3 | 0s | my($self) = shift; | ||
1232 | 3 | 0s | '# Phony target to force checking subdirectories. | ||
1233 | FORCE : | ||||
1234 | $(NOECHO) $(NOOP) | ||||
1235 | '; | ||||
1236 | } | ||||
1237 | |||||
1238 | =item guess_name | ||||
1239 | |||||
1240 | Guess the name of this package by examining the working directory's | ||||
1241 | name. MakeMaker calls this only if the developer has not supplied a | ||||
1242 | NAME attribute. | ||||
1243 | |||||
1244 | =cut | ||||
1245 | |||||
1246 | # '; | ||||
1247 | |||||
1248 | sub guess_name { | ||||
1249 | my($self) = @_; | ||||
1250 | 2 | 15.6ms | 2 | 0s | # spent 0s within ExtUtils::MM_Unix::BEGIN@1250 which was called:
# once (0s+0s) by main::BEGIN@1 at line 1250 # 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 | |||||
1261 | Returns true if C, XS, MYEXTLIB or similar objects exist within this | ||||
1262 | object that need a compiler. Does not descend into subdirectories as | ||||
1263 | needs_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 | ||||
1268 | 18 | 0s | my($self) = shift; | ||
1269 | 18 | 0s | return $self->{HAS_LINK_CODE} if defined $self->{HAS_LINK_CODE}; | ||
1270 | 3 | 0s | if ($self->{OBJECT} or @{$self->{C} || []} or $self->{MYEXTLIB}){ | ||
1271 | 3 | 0s | $self->{HAS_LINK_CODE} = 1; | ||
1272 | 3 | 0s | return 1; | ||
1273 | } | ||||
1274 | return $self->{HAS_LINK_CODE} = 0; | ||||
1275 | } | ||||
1276 | |||||
1277 | |||||
1278 | =item init_dirscan | ||||
1279 | |||||
1280 | Scans the directory structure and initializes DIR, XS, XS_FILES, | ||||
1281 | C, C_FILES, O_FILES, H, H_FILES, PL_FILES, EXE_FILES. | ||||
1282 | |||||
1283 | Called 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 | ||||
1288 | 3 | 0s | my($self) = @_; | ||
1289 | 3 | 0s | my(%dir, %xs, %c, %o, %h, %pl_files, %pm); | ||
1290 | |||||
1291 | 3 | 0s | my %ignore = map {( $_ => 1 )} qw(Makefile.PL Build.PL test.pl t); | ||
1292 | |||||
1293 | # ignore the distdir | ||||
1294 | 3 | 0s | $Is{VMS} ? $ignore{"$self->{DISTVNAME}.dir"} = 1 | ||
1295 | : $ignore{$self->{DISTVNAME}} = 1; | ||||
1296 | |||||
1297 | 3 | 0s | 6 | 0s | 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 | |||||
1300 | 3 | 0s | @ignore{map lc, keys %ignore} = values %ignore if $Is{VMS}; | ||
1301 | |||||
1302 | 3 | 0s | 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 | |||||
1309 | 3 | 0s | 6 | 0s | 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 |
1310 | 25 | 0s | 25 | 0s | next if $name =~ /\#/; # spent 0s making 25 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call |
1311 | 25 | 0s | 50 | 0s | 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 |
1312 | 25 | 0s | $name = lc($name) if $Is{VMS}; | ||
1313 | 25 | 0s | next if $name eq $Curdir or $name eq $Updir or $ignore{$name}; | ||
1314 | 15 | 0s | 15 | 0s | next unless $self->libscan($name); # spent 0s making 15 calls to ExtUtils::MM_Any::libscan, avg 0s/call |
1315 | 15 | 0s | 71 | 0s | 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 |
1316 | 2 | 0s | 2 | 0s | 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 |
1317 | 2 | 0s | next if $self->{NORECURS}; | ||
1318 | 2 | 0s | 4 | 0s | $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/){ | ||||
1320 | 6 | 0s | 3 | 0s | my($c); ($c = $name) =~ s/\.xs\z/.c/; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
1321 | 3 | 0s | $xs{$name} = $c; | ||
1322 | 3 | 0s | $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 | |||||
1345 | 3 | 0s | $self->{PL_FILES} ||= \%pl_files; | ||
1346 | 3 | 0s | 3 | 0s | $self->{DIR} ||= [sort keys %dir]; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:sort, avg 0s/call |
1347 | 3 | 0s | $self->{XS} ||= \%xs; | ||
1348 | 3 | 0s | 3 | 0s | $self->{C} ||= [sort keys %c]; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:sort, avg 0s/call |
1349 | 3 | 0s | 3 | 0s | $self->{H} ||= [sort keys %h]; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:sort, avg 0s/call |
1350 | 3 | 0s | $self->{PM} ||= \%pm; | ||
1351 | |||||
1352 | 3 | 0s | my @o_files = @{$self->{C}}; | ||
1353 | 3 | 0s | 9 | 0s | %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 |
1354 | 3 | 0s | 3 | 0s | $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 | |||||
1360 | Determines if man pages should be generated and initializes MAN1PODS | ||||
1361 | and 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 | ||||
1366 | 3 | 0s | my $self = shift; | ||
1367 | |||||
1368 | # Set up names of manual pages to generate from pods | ||||
1369 | 3 | 0s | foreach my $man (qw(MAN1 MAN3)) { | ||
1370 | 6 | 0s | 6 | 0s | 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 | |||||
1383 | sub _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 | |||||
1406 | Initializes MAN1PODS from the list of EXE_FILES. | ||||
1407 | |||||
1408 | =cut | ||||
1409 | |||||
1410 | sub 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 | |||||
1427 | Initializes MAN3PODS from the list of PM files. | ||||
1428 | |||||
1429 | =cut | ||||
1430 | |||||
1431 | sub 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 | |||||
1474 | Initializes 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 | ||||
1479 | 3 | 0s | 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 | |||||
1507 | 3 | 0s | unless( $self->{PMLIBDIRS} ) { | ||
1508 | if( $Is{VMS} ) { | ||||
1509 | # Avoid logical name vs directory collisions | ||||
1510 | $self->{PMLIBDIRS} = ['./lib', "./$self->{BASEEXT}"]; | ||||
1511 | } | ||||
1512 | else { | ||||
1513 | 3 | 0s | $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}}; | ||||
1521 | 3 | 0s | my (@pmlibdirs) = @{$self->{PMLIBDIRS}}; | ||
1522 | 3 | 0s | @{$self->{PMLIBDIRS}} = (); | ||
1523 | 3 | 0s | my %dir = map { ($_ => $_) } @{$self->{DIR}}; | ||
1524 | 3 | 0s | foreach my $pmlibdir (@pmlibdirs) { | ||
1525 | 6 | 0s | 6 | 0s | -d $pmlibdir && !$dir{$pmlibdir} && push @{$self->{PMLIBDIRS}}, $pmlibdir; # spent 0s making 6 calls to ExtUtils::MM_Unix::CORE:ftdir, avg 0s/call |
1526 | } | ||||
1527 | |||||
1528 | 3 | 0s | unless( $self->{PMLIBPARENTDIRS} ) { | ||
1529 | @{$self->{PMLIBPARENTDIRS}} = ('lib'); | ||||
1530 | } | ||||
1531 | |||||
1532 | 3 | 0s | return if $self->{PM} and $self->{ARGS}{PM}; | ||
1533 | |||||
1534 | 3 | 0s | 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 | |||||
1572 | Using / for Unix. Called by init_main. | ||||
1573 | |||||
1574 | =cut | ||||
1575 | |||||
1576 | sub init_DIRFILESEP { | ||||
1577 | my($self) = shift; | ||||
1578 | |||||
1579 | $self->{DIRFILESEP} = '/'; | ||||
1580 | } | ||||
1581 | |||||
1582 | |||||
1583 | =item init_main | ||||
1584 | |||||
1585 | Initializes AR, AR_STATIC_ARGS, BASEEXT, CONFIG, DISTNAME, DLBASE, | ||||
1586 | EXE_EXT, FULLEXT, FULLPERL, FULLPERLRUN, FULLPERLRUNINST, INST_*, | ||||
1587 | INSTALL*, INSTALLDIRS, LIB_EXT, LIBPERL_A, MAP_TARGET, NAME, | ||||
1588 | OBJ_EXT, PARENT_NAME, PERL, PERL_ARCHLIB, PERL_INC, PERL_LIB, | ||||
1589 | PERL_SRC, PERLRUN, PERLRUNINST, PREFIX, VERSION, | ||||
1590 | VERSION_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 | ||||
1595 | 3 | 0s | 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 | ||||
1606 | 3 | 0s | 3 | 0s | $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 | |||||
1611 | 3 | 0s | my(@modparts) = split(/::/,$self->{NAME}); | ||
1612 | 3 | 0s | 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 | ||||
1618 | 6 | 0s | eval { require DynaLoader }; | ||
1619 | 3 | 0s | if (defined &DynaLoader::mod2fname) { | ||
1620 | $modfname = &DynaLoader::mod2fname(\@modparts); | ||||
1621 | } | ||||
1622 | |||||
1623 | 3 | 0s | 3 | 0s | ($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 |
1624 | 3 | 0s | $self->{PARENT_NAME} ||= ''; | ||
1625 | |||||
1626 | 3 | 0s | if (defined &DynaLoader::mod2fname) { | ||
1627 | # As of 5.001m, dl_os2 appends '_' | ||||
1628 | $self->{DLBASE} = $modfname; | ||||
1629 | } else { | ||||
1630 | 3 | 0s | $self->{DLBASE} = '$(BASEEXT)'; | ||
1631 | } | ||||
1632 | |||||
1633 | |||||
1634 | # --- Initialize PERL_LIB, PERL_SRC | ||||
1635 | |||||
1636 | # *Real* information: where did we get these two from? ... | ||||
1637 | 3 | 0s | 3 | 0s | my $inc_config_dir = dirname($INC{'Config.pm'}); # spent 0s making 3 calls to File::Basename::dirname, avg 0s/call |
1638 | 3 | 0s | 3 | 0s | my $inc_carp_dir = dirname($INC{'Carp.pm'}); # spent 0s making 3 calls to File::Basename::dirname, avg 0s/call |
1639 | |||||
1640 | 3 | 0s | unless ($self->{PERL_SRC}){ | ||
1641 | 3 | 0s | foreach my $dir_count (1..8) { # 8 is the VMS limit for nesting | ||
1642 | 24 | 0s | 24 | 0s | my $dir = $self->catdir(($Updir) x $dir_count); # spent 0s making 24 calls to File::Spec::Win32::catdir, avg 0s/call |
1643 | |||||
1644 | 24 | 0s | 48 | 0s | 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 | |||||
1654 | 3 | 0s | warn "PERL_CORE is set but I can't find your PERL_SRC!\n" if | ||
1655 | $self->{PERL_CORE} and !$self->{PERL_SRC}; | ||||
1656 | |||||
1657 | 3 | 0s | 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{ | ||||
1675 | You cannot build extensions below the perl source tree after executing | ||||
1676 | a 'make clean' in the perl source tree. | ||||
1677 | |||||
1678 | To rebuild extensions distributed with the perl source you should | ||||
1679 | simply Configure (to include those extensions) and then build perl as | ||||
1680 | normal. After installing perl the source tree can be deleted. It is | ||||
1681 | not needed for building extensions by running 'perl Makefile.PL' | ||||
1682 | usually without extra arguments. | ||||
1683 | |||||
1684 | It is recommended that you unpack and build additional extensions away | ||||
1685 | from the perl source tree. | ||||
1686 | }; | ||||
1687 | } | ||||
1688 | } else { | ||||
1689 | # we should also consider $ENV{PERL5LIB} here | ||||
1690 | 3 | 0s | my $old = $self->{PERL_LIB} || $self->{PERL_ARCHLIB} || $self->{PERL_INC}; | ||
1691 | 3 | 0s | $self->{PERL_LIB} ||= $Config{privlibexp}; | ||
1692 | 3 | 0s | $self->{PERL_ARCHLIB} ||= $Config{archlibexp}; | ||
1693 | 3 | 0s | 3 | 0s | $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 |
1694 | 3 | 0s | my $perl_h; | ||
1695 | |||||
1696 | 3 | 0s | 6 | 0s | 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. | ||||
1716 | EOP | ||||
1717 | } | ||||
1718 | } | ||||
1719 | } | ||||
1720 | } | ||||
1721 | |||||
1722 | 3 | 0s | 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 | } | ||||
1732 | 3 | 0s | $self->{PERL_INCDEP} = $self->{PERL_INC}; | ||
1733 | 3 | 0s | $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. | ||||
1740 | 3 | 0s | $self->{INSTALLDIRS} ||= "site"; | ||
1741 | |||||
1742 | 3 | 0s | $self->{MAN1EXT} ||= $Config{man1ext}; | ||
1743 | 3 | 0s | $self->{MAN3EXT} ||= $Config{man3ext}; | ||
1744 | |||||
1745 | # Get some stuff out of %Config if we haven't yet done so | ||||
1746 | 3 | 0s | print "CONFIG must be an array ref\n" | ||
1747 | if ($self->{CONFIG} and ref $self->{CONFIG} ne 'ARRAY'); | ||||
1748 | 3 | 0s | $self->{CONFIG} = [] unless (ref $self->{CONFIG}); | ||
1749 | 3 | 0s | push(@{$self->{CONFIG}}, @ExtUtils::MakeMaker::Get_from_Config); | ||
1750 | 3 | 0s | push(@{$self->{CONFIG}}, 'shellflags') if $Config{shellflags}; | ||
1751 | 3 | 0s | my(%once_only); | ||
1752 | 3 | 0s | foreach my $m (@{$self->{CONFIG}}){ | ||
1753 | 66 | 0s | next if $once_only{$m}; | ||
1754 | 66 | 0s | print "CONFIG key '$m' does not exist in Config.pm\n" | ||
1755 | unless exists $Config{$m}; | ||||
1756 | 66 | 0s | $self->{uc $m} ||= $Config{$m}; | ||
1757 | 66 | 0s | $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 | |||||
1767 | 3 | 0s | $self->{AR_STATIC_ARGS} ||= "cr"; | ||
1768 | |||||
1769 | # These should never be needed | ||||
1770 | 3 | 0s | $self->{OBJ_EXT} ||= '.o'; | ||
1771 | 3 | 0s | $self->{LIB_EXT} ||= '.a'; | ||
1772 | |||||
1773 | 3 | 0s | $self->{MAP_TARGET} ||= "perl"; | ||
1774 | |||||
1775 | 3 | 0s | $self->{LIBPERL_A} ||= "libperl$self->{LIB_EXT}"; | ||
1776 | |||||
1777 | # make a simple check if we find strict | ||||
1778 | 3 | 0s | 6 | 0s | 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 | |||||
1786 | Initializes tools to use their common (and faster) Unix commands. | ||||
1787 | |||||
1788 | =cut | ||||
1789 | |||||
1790 | sub 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 | |||||
1820 | Unix has no need of special linker flags. | ||||
1821 | |||||
1822 | =cut | ||||
1823 | |||||
1824 | sub 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 | ||||
1844 | 3 | 0s | 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. | ||||
1852 | 3 | 0s | for my $libpair ({l=>"privlib", a=>"archlib"}, | ||
1853 | {l=>"sitelib", a=>"sitearch"}, | ||||
1854 | {l=>"vendorlib", a=>"vendorarch"}, | ||||
1855 | ) | ||||
1856 | { | ||||
1857 | 9 | 0s | my $lib = "install$libpair->{l}"; | ||
1858 | 9 | 0s | my $Lib = uc $lib; | ||
1859 | 9 | 0s | my $Arch = uc "install$libpair->{a}"; | ||
1860 | 9 | 0s | 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 | |||||
1880 | Called 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 | ||||
1897 | 3 | 0s | my($self) = shift; | ||
1898 | |||||
1899 | 3 | 0s | my @defpath = (); | ||
1900 | 3 | 0s | 3 | 0s | 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 | { | ||||
1903 | 156 | 0s | push @defpath, $component if defined $component; | ||
1904 | } | ||||
1905 | |||||
1906 | # Build up a set of file names (not command names). | ||||
1907 | 3 | 0s | 3 | 0s | my $thisperl = $self->canonpath($^X); # spent 0s making 3 calls to File::Spec::Win32::canonpath, avg 0s/call |
1908 | 3 | 0s | 6 | 0s | $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. | ||||
1914 | 3 | 0s | $thisperl = $self->abs2rel($thisperl) if $self->{PERL_CORE}; | ||
1915 | |||||
1916 | 3 | 0s | my @perls = ($thisperl); | ||
1917 | 3 | 0s | 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. | ||||
1922 | 3 | 0s | my $miniperl = "miniperl$Config{exe_ext}"; | ||
1923 | 3 | 0s | if( $self->{PERL_CORE} ) { | ||
1924 | splice @perls, 1, 0, $miniperl; | ||||
1925 | } | ||||
1926 | else { | ||||
1927 | 3 | 0s | push @perls, $miniperl; | ||
1928 | } | ||||
1929 | |||||
1930 | 3 | 0s | 1 | 93.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 | |||||
1933 | 3 | 0s | my $perl = $self->{PERL}; | ||
1934 | 3 | 0s | 3 | 0s | $perl =~ s/^"//; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
1935 | 3 | 0s | 3 | 0s | my $has_mcr = $perl =~ s/^MCR\s*//; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
1936 | 3 | 0s | my $perlflags = ''; | ||
1937 | 3 | 0s | my $stripped_perl; | ||
1938 | 3 | 0s | while ($perl) { | ||
1939 | 3 | 0s | 3 | 0s | ($stripped_perl = $perl) =~ s/"$//; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
1940 | 3 | 0s | 3 | 0s | 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 | } | ||||
1944 | 3 | 0s | $self->{PERL} = $stripped_perl; | ||
1945 | 3 | 0s | $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. | ||||
1948 | 3 | 0s | my $perl_name = 'perl'; | ||
1949 | 3 | 0s | $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) | ||||
1955 | 3 | 0s | unless ($self->{FULLPERL}) { | ||
1956 | 1 | 0s | 2 | 0s | ($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 |
1957 | 1 | 0s | $self->{FULLPERL} = qq{"$self->{FULLPERL}"}.$perlflags; | ||
1958 | } | ||||
1959 | # Can't have an image name with quotes, and findperl will have | ||||
1960 | # already escaped spaces. | ||||
1961 | 3 | 0s | $self->{FULLPERL} =~ tr/"//d if $Is{VMS}; | ||
1962 | |||||
1963 | # Little hack to get around VMS's find_perl putting "MCR" in front | ||||
1964 | # sometimes. | ||||
1965 | 3 | 0s | $self->{ABSPERL} = $self->{PERL}; | ||
1966 | 3 | 0s | 3 | 0s | $has_mcr = $self->{ABSPERL} =~ s/^MCR\s*//; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
1967 | 3 | 0s | 3 | 0s | 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 | } | ||||
1979 | 3 | 0s | $self->{PERL} = qq{"$self->{PERL}"}.$perlflags; | ||
1980 | |||||
1981 | # Can't have an image name with quotes, and findperl will have | ||||
1982 | # already escaped spaces. | ||||
1983 | 3 | 0s | $self->{PERL} =~ tr/"//d if $Is{VMS}; | ||
1984 | |||||
1985 | # Are we building the core? | ||||
1986 | 3 | 0s | $self->{PERL_CORE} = $ENV{PERL_CORE} unless exists $self->{PERL_CORE}; | ||
1987 | 3 | 0s | $self->{PERL_CORE} = 0 unless defined $self->{PERL_CORE}; | ||
1988 | |||||
1989 | # How do we run perl? | ||||
1990 | 3 | 0s | foreach my $perl (qw(PERL FULLPERL ABSPERL)) { | ||
1991 | 9 | 0s | my $run = $perl.'RUN'; | ||
1992 | |||||
1993 | 9 | 0s | $self->{$run} = qq{\$($perl)}; | ||
1994 | |||||
1995 | # Make sure perl can find itself before it's installed. | ||||
1996 | 9 | 0s | $self->{$run} .= q{ "-I$(PERL_LIB)" "-I$(PERL_ARCHLIB)"} | ||
1997 | if $self->{UNINSTALLED_PERL} || $self->{PERL_CORE}; | ||||
1998 | |||||
1999 | 9 | 0s | $self->{$perl.'RUNINST'} = | ||
2000 | sprintf q{$(%sRUN)%s "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"}, | ||||
2001 | $perl, $perlflags; | ||||
2002 | } | ||||
2003 | |||||
2004 | 3 | 0s | return 1; | ||
2005 | } | ||||
2006 | |||||
2007 | |||||
2008 | =item init_platform | ||||
2009 | |||||
2010 | =item platform_constants | ||||
2011 | |||||
2012 | Add MM_Unix_VERSION. | ||||
2013 | |||||
2014 | =cut | ||||
2015 | |||||
2016 | sub 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 | |||||
2026 | sub 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 | |||||
2044 | Called 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 | ||||
2049 | 3 | 0s | my($self) = shift; | ||
2050 | |||||
2051 | 3 | 0s | $self->{PERM_DIR} = 755 unless defined $self->{PERM_DIR}; | ||
2052 | 3 | 0s | $self->{PERM_RW} = 644 unless defined $self->{PERM_RW}; | ||
2053 | 3 | 0s | $self->{PERM_RWX} = 755 unless defined $self->{PERM_RWX}; | ||
2054 | |||||
2055 | 3 | 0s | return 1; | ||
2056 | } | ||||
2057 | |||||
2058 | |||||
2059 | =item init_xs | ||||
2060 | |||||
2061 | $mm->init_xs | ||||
2062 | |||||
2063 | Sets up macros having to do with XS code. Currently just INST_STATIC, | ||||
2064 | INST_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 | ||||
2069 | 3 | 0s | my $self = shift; | ||
2070 | |||||
2071 | 3 | 0s | 3 | 0s | if ($self->has_link_code()) { # spent 0s making 3 calls to ExtUtils::MM_Unix::has_link_code, avg 0s/call |
2072 | 3 | 0s | 3 | 15.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)'); | ||||
2074 | 3 | 0s | 3 | 0s | $self->{INST_DYNAMIC} = # spent 0s making 3 calls to ExtUtils::MM_Any::catfile, avg 0s/call |
2075 | $self->catfile('$(INST_ARCHAUTODIR)', '$(DLBASE).$(DLEXT)'); | ||||
2076 | 3 | 0s | 3 | 0s | $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 | |||||
2087 | Defines 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 | ||||
2092 | 1 | 0s | my($self, %attribs) = @_; | ||
2093 | 1 | 0s | my(@m); | ||
2094 | |||||
2095 | 1 | 0s | push @m, q{ | ||
2096 | install :: pure_install doc_install | ||||
2097 | $(NOECHO) $(NOOP) | ||||
2098 | |||||
2099 | install_perl :: pure_perl_install doc_perl_install | ||||
2100 | $(NOECHO) $(NOOP) | ||||
2101 | |||||
2102 | install_site :: pure_site_install doc_site_install | ||||
2103 | $(NOECHO) $(NOOP) | ||||
2104 | |||||
2105 | install_vendor :: pure_vendor_install doc_vendor_install | ||||
2106 | $(NOECHO) $(NOOP) | ||||
2107 | |||||
2108 | pure_install :: pure_$(INSTALLDIRS)_install | ||||
2109 | $(NOECHO) $(NOOP) | ||||
2110 | |||||
2111 | doc_install :: doc_$(INSTALLDIRS)_install | ||||
2112 | $(NOECHO) $(NOOP) | ||||
2113 | |||||
2114 | pure__install : pure_site_install | ||||
2115 | $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site | ||||
2116 | |||||
2117 | doc__install : doc_site_install | ||||
2118 | $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site | ||||
2119 | |||||
2120 | pure_perl_install :: all | ||||
2121 | $(NOECHO) $(MOD_INSTALL) \ | ||||
2122 | }; | ||||
2123 | |||||
2124 | 1 | 0s | 2 | 0s | push @m, # spent 0s making 2 calls to ExtUtils::MM_Any::catfile, avg 0s/call |
2125 | q{ read "}.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{" \ | ||||
2126 | write "}.$self->catfile('$(DESTINSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').q{" \ | ||||
2127 | } unless $self->{NO_PACKLIST}; | ||||
2128 | |||||
2129 | 1 | 0s | 1 | 0s | push @m, # spent 0s making 1 call to File::Spec::Win32::catdir |
2130 | q{ "$(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 | |||||
2140 | pure_site_install :: all | ||||
2141 | $(NOECHO) $(MOD_INSTALL) \ | ||||
2142 | }; | ||||
2143 | 1 | 0s | 2 | 0s | push @m, # spent 0s making 2 calls to ExtUtils::MM_Any::catfile, avg 0s/call |
2144 | q{ read "}.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{" \ | ||||
2145 | write "}.$self->catfile('$(DESTINSTALLSITEARCH)','auto','$(FULLEXT)','.packlist').q{" \ | ||||
2146 | } unless $self->{NO_PACKLIST}; | ||||
2147 | |||||
2148 | 1 | 0s | 1 | 0s | push @m, # spent 0s making 1 call to File::Spec::Win32::catdir |
2149 | q{ "$(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 | |||||
2158 | pure_vendor_install :: all | ||||
2159 | $(NOECHO) $(MOD_INSTALL) \ | ||||
2160 | }; | ||||
2161 | 1 | 0s | 2 | 0s | push @m, # spent 0s making 2 calls to ExtUtils::MM_Any::catfile, avg 0s/call |
2162 | q{ read "}.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{" \ | ||||
2163 | write "}.$self->catfile('$(DESTINSTALLVENDORARCH)','auto','$(FULLEXT)','.packlist').q{" \ | ||||
2164 | } unless $self->{NO_PACKLIST}; | ||||
2165 | |||||
2166 | 1 | 0s | push @m, | ||
2167 | q{ "$(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 | |||||
2176 | 1 | 0s | push @m, q{ | ||
2177 | doc_perl_install :: all | ||||
2178 | $(NOECHO) $(NOOP) | ||||
2179 | |||||
2180 | doc_site_install :: all | ||||
2181 | $(NOECHO) $(NOOP) | ||||
2182 | |||||
2183 | doc_vendor_install :: all | ||||
2184 | $(NOECHO) $(NOOP) | ||||
2185 | |||||
2186 | } if $self->{NO_PERLLOCAL}; | ||||
2187 | |||||
2188 | 1 | 0s | 3 | 0s | push @m, q{ # spent 0s making 3 calls to ExtUtils::MM_Any::catfile, avg 0s/call |
2189 | doc_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 | |||||
2200 | doc_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 | |||||
2211 | doc_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 | |||||
2224 | 1 | 0s | 3 | 0s | push @m, q{ # spent 0s making 3 calls to ExtUtils::MM_Any::catfile, avg 0s/call |
2225 | uninstall :: uninstall_from_$(INSTALLDIRS)dirs | ||||
2226 | $(NOECHO) $(NOOP) | ||||
2227 | |||||
2228 | uninstall_from_perldirs :: | ||||
2229 | $(NOECHO) $(UNINSTALL) "}.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{" | ||||
2230 | |||||
2231 | uninstall_from_sitedirs :: | ||||
2232 | $(NOECHO) $(UNINSTALL) "}.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{" | ||||
2233 | |||||
2234 | uninstall_from_vendordirs :: | ||||
2235 | $(NOECHO) $(UNINSTALL) "}.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{" | ||||
2236 | }; | ||||
2237 | |||||
2238 | 1 | 0s | join("",@m); | ||
2239 | } | ||||
2240 | |||||
2241 | =item installbin (o) | ||||
2242 | |||||
2243 | Defines 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 | ||||
2248 | 3 | 0s | my($self) = shift; | ||
2249 | |||||
2250 | 3 | 0s | 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{ | ||||
2271 | EXE_FILES = @exefiles | ||||
2272 | |||||
2273 | pure_all :: @to | ||||
2274 | \$(NOECHO) \$(NOOP) | ||||
2275 | |||||
2276 | realclean :: | ||||
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 | |||||
2295 | MAKE | ||||
2296 | |||||
2297 | } | ||||
2298 | |||||
2299 | join "", @m; | ||||
2300 | } | ||||
2301 | |||||
2302 | |||||
2303 | =item linkext (o) | ||||
2304 | |||||
2305 | Defines 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 | ||||
2310 | 3 | 0s | my($self, %attribs) = @_; | ||
2311 | # LINKTYPE => static or dynamic or '' | ||||
2312 | 3 | 0s | my($linktype) = defined $attribs{LINKTYPE} ? | ||
2313 | $attribs{LINKTYPE} : '$(LINKTYPE)'; | ||||
2314 | 3 | 0s | " | ||
2315 | linkext :: $linktype | ||||
2316 | \$(NOECHO) \$(NOOP) | ||||
2317 | "; | ||||
2318 | } | ||||
2319 | |||||
2320 | =item lsdir | ||||
2321 | |||||
2322 | Takes as arguments a directory name and a regular expression. Returns | ||||
2323 | all 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 | ||||
2328 | 3 | 0s | my($self) = shift; | ||
2329 | 3 | 0s | my($dir, $regex) = @_; | ||
2330 | 3 | 0s | my(@ls); | ||
2331 | 3 | 0s | 3 | 0s | my $dh = new DirHandle; # spent 0s making 3 calls to DirHandle::new, avg 0s/call |
2332 | 3 | 0s | 3 | 0s | $dh->open($dir || ".") or return (); # spent 0s making 3 calls to DirHandle::open, avg 0s/call |
2333 | 3 | 0s | 3 | 0s | @ls = $dh->read; # spent 0s making 3 calls to DirHandle::read, avg 0s/call |
2334 | 3 | 0s | 3 | 0s | $dh->close; # spent 0s making 3 calls to DirHandle::close, avg 0s/call |
2335 | 3 | 0s | @ls = grep(/$regex/, @ls) if $regex; | ||
2336 | 3 | 0s | @ls; | ||
2337 | } | ||||
2338 | |||||
2339 | =item macro (o) | ||||
2340 | |||||
2341 | Simple subroutine to insert the macros defined by the macro attribute | ||||
2342 | into 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 | ||||
2347 | 3 | 0s | my($self,%attribs) = @_; | ||
2348 | 3 | 0s | my(@m,$key,$val); | ||
2349 | 3 | 0s | while (($key,$val) = each %attribs){ | ||
2350 | last unless defined $key; | ||||
2351 | push @m, "$key = $val\n"; | ||||
2352 | } | ||||
2353 | 3 | 0s | join "", @m; | ||
2354 | } | ||||
2355 | |||||
2356 | =item makeaperl (o) | ||||
2357 | |||||
2358 | Called by staticmake. Defines how to write the Makefile to produce a | ||||
2359 | static new perl. | ||||
2360 | |||||
2361 | By default the Makefile produced includes all the static extensions in | ||||
2362 | the perl library. (Purified versions of library files, e.g., | ||||
2363 | DynaLoader_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 | ||||
2368 | 3 | 0s | my($self, %attribs) = @_; | ||
2369 | 3 | 0s | my($makefilename, $searchdirs, $static, $extra, $perlinc, $target, $tmp, $libperl) = | ||
2370 | @attribs{qw(MAKE DIRS STAT EXTRA INCL TARGET TMP LIBPERL)}; | ||||
2371 | 3 | 0s | my(@m); | ||
2372 | 3 | 0s | push @m, " | ||
2373 | # --- MakeMaker makeaperl section --- | ||||
2374 | MAP_TARGET = $target | ||||
2375 | FULLPERL = $self->{FULLPERL} | ||||
2376 | "; | ||||
2377 | 3 | 0s | return join '', @m if $self->{PARENT}; | ||
2378 | |||||
2379 | 1 | 0s | my($dir) = join ":", @{$self->{DIR}}; | ||
2380 | |||||
2381 | 1 | 0s | unless ($self->{MAKEAPERL}) { | ||
2382 | 1 | 0s | 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 | |||||
2393 | 1 | 0s | foreach (@ARGV){ | ||
2394 | if( /\s/ ){ | ||||
2395 | s/=(.*)/='$1'/; | ||||
2396 | } | ||||
2397 | push @m, " \\\n\t\t$_"; | ||||
2398 | } | ||||
2399 | # push @m, map( " \\\n\t\t$_", @ARGV ); | ||||
2400 | 1 | 0s | push @m, "\n"; | ||
2401 | |||||
2402 | 1 | 0s | 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:; | ||||
2472 | 2 | 0s | 2 | 0s | # spent 0s within ExtUtils::MM_Unix::BEGIN@2472 which was called:
# once (0s+0s) by main::BEGIN@1 at line 2472 # 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, " | ||||
2496 | MAP_LINKCMD = $linkcmd | ||||
2497 | MAP_PERLINC = @{$perlinc || []} | ||||
2498 | MAP_STATIC = ", | ||||
2499 | join(" \\\n\t", reverse sort keys %static), " | ||||
2500 | |||||
2501 | MAP_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, " | ||||
2534 | MAP_LIBPERL = $libperl | ||||
2535 | LLIBPERL = $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 | |||||
2548 | push @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{ | ||||
2572 | doc_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{ | ||||
2585 | inst_perl : pure_inst_perl doc_inst_perl | ||||
2586 | |||||
2587 | pure_inst_perl : $(MAP_TARGET) | ||||
2588 | }.$self->{CP}.q{ $(MAP_TARGET) "}.$self->catfile('$(DESTINSTALLBIN)','$(MAP_TARGET)').q{" | ||||
2589 | |||||
2590 | clean :: map_clean | ||||
2591 | |||||
2592 | map_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 | |||||
2601 | Defines how to rewrite the Makefile. | ||||
2602 | |||||
2603 | =cut | ||||
2604 | |||||
2605 | sub 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 | |||||
2637 | MAKE_FRAG | ||||
2638 | |||||
2639 | return $m; | ||||
2640 | } | ||||
2641 | |||||
2642 | |||||
2643 | =item maybe_command | ||||
2644 | |||||
2645 | Returns true, if the argument is likely to be a command. | ||||
2646 | |||||
2647 | =cut | ||||
2648 | |||||
2649 | sub 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 | |||||
2658 | Does this module need linking? Looks into subdirectory objects (see | ||||
2659 | also 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 | ||||
2664 | 30 | 0s | my($self) = shift; | ||
2665 | |||||
2666 | 30 | 0s | my $caller = (caller(0))[3]; | ||
2667 | 30 | 0s | 30 | 0s | 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::/; | ||||
2669 | 30 | 0s | return $self->{NEEDS_LINKING} if defined $self->{NEEDS_LINKING}; | ||
2670 | 3 | 0s | 3 | 0s | if ($self->has_link_code or $self->{MAKEAPERL}){ # spent 0s making 3 calls to ExtUtils::MM_Unix::has_link_code, avg 0s/call |
2671 | 3 | 0s | $self->{NEEDS_LINKING} = 1; | ||
2672 | 3 | 0s | 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 | |||||
2686 | parse a file and return what you think is the ABSTRACT | ||||
2687 | |||||
2688 | =cut | ||||
2689 | |||||
2690 | sub 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 | |||||
2739 | Parse a $file and return what $VERSION is set to by the first assignment. | ||||
2740 | It will return the string "undef" if it can't figure out what $VERSION | ||||
2741 | is. $VERSION should be for all to see, so C<our $VERSION> or plain $VERSION | ||||
2742 | are okay, but C<my $VERSION> is not. | ||||
2743 | |||||
2744 | C<<package Foo VERSION>> is also checked for. The first version | ||||
2745 | declaration found is used, but this may change as it differs from how | ||||
2746 | Perl does it. | ||||
2747 | |||||
2748 | parse_version() will try to C<use version> before checking for | ||||
2749 | C<$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 | ||||
2756 | 3 | 0s | my($self,$parsefile) = @_; | ||
2757 | 3 | 0s | my $result; | ||
2758 | |||||
2759 | 3 | 0s | local $/ = "\n"; | ||
2760 | 3 | 0s | local $_; | ||
2761 | 3 | 0s | 3 | 0s | open(my $fh, '<', $parsefile) or die "Could not open '$parsefile': $!"; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:open, avg 0s/call |
2762 | 3 | 0s | my $inpod = 0; | ||
2763 | 3 | 0s | 178 | 0s | while (<$fh>) { # spent 0s making 178 calls to ExtUtils::MM_Unix::CORE:readline, avg 0s/call |
2764 | 178 | 0s | 356 | 0s | $inpod = /^=(?!cut)/ ? 1 : /^=cut/ ? 0 : $inpod; # spent 0s making 356 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call |
2765 | 178 | 15.6ms | 178 | 0s | next if $inpod || /^\s*#/; # spent 0s making 178 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call |
2766 | 176 | 0s | chop; | ||
2767 | 176 | 0s | 176 | 0s | next if /^\s*(if|unless|elsif)/; # spent 0s making 176 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call |
2768 | 176 | 0s | 352 | 0s | 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 ) { | ||||
2773 | 3 | 0s | 3 | 0s | $result = $self->get_version($parsefile, $1, $2); # spent 0s making 3 calls to ExtUtils::MM_Unix::get_version, avg 0s/call |
2774 | } | ||||
2775 | else { | ||||
2776 | 173 | 0s | next; | ||
2777 | } | ||||
2778 | 3 | 0s | last if defined $result; | ||
2779 | } | ||||
2780 | 3 | 0s | 3 | 0s | close $fh; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:close, avg 0s/call |
2781 | |||||
2782 | 3 | 0s | 3 | 0s | 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 | } | ||||
2787 | 3 | 0s | $result = "undef" unless defined $result; | ||
2788 | 3 | 0s | 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 | ||||
2792 | 3 | 0s | my ($self, $parsefile, $sigil, $name) = @_; | ||
2793 | 3 | 0s | my $line = $_; # from the while() loop in parse_version | ||
2794 | { | ||||
2795 | 3 | 0s | package ExtUtils::MakeMaker::_version; | ||
2796 | 3 | 0s | undef *version; # in case of unexpected version() sub | ||
2797 | 3 | 0s | eval { | ||
2798 | 3 | 0s | require version; | ||
2799 | 3 | 0s | 3 | 0s | version::->import; # spent 0s making 3 calls to version::import, avg 0s/call |
2800 | }; | ||||
2801 | 2 | 15.6ms | 2 | 0s | # spent 0s within ExtUtils::MakeMaker::_version::BEGIN@2801 which was called:
# once (0s+0s) by main::BEGIN@1 at line 2801 # spent 0s making 1 call to ExtUtils::MakeMaker::_version::BEGIN@2801
# spent 0s making 1 call to strict::unimport |
2802 | 3 | 0s | local *{$name}; | ||
2803 | 3 | 0s | local $^W = 0; | ||
2804 | 3 | 0s | 3 | 0s | $line = $1 if $line =~ m{^(.+)}s; # spent 0s making 3 calls to ExtUtils::MakeMaker::_version::CORE:match, avg 0s/call |
2805 | 3 | 0s | eval($line); ## no critic # spent 0s executing statements in string eval
# spent 0s executing statements in 2 string evals (merged) | ||
2806 | 3 | 0s | return ${$name}; | ||
2807 | } | ||||
2808 | } | ||||
2809 | |||||
2810 | =item pasthru (o) | ||||
2811 | |||||
2812 | Defines the string that is passed to recursive make calls in | ||||
2813 | subdirectories. | ||||
2814 | |||||
2815 | =cut | ||||
2816 | |||||
2817 | sub 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 | |||||
2844 | Takes one argument, a file name, and returns the file name, if the | ||||
2845 | argument is likely to be a perl script. On MM_Unix this is true for | ||||
2846 | any ordinary, readable file. | ||||
2847 | |||||
2848 | =cut | ||||
2849 | |||||
2850 | sub perl_script { | ||||
2851 | my($self,$file) = @_; | ||||
2852 | return $file if -r $file && -f _; | ||||
2853 | return; | ||||
2854 | } | ||||
2855 | |||||
2856 | =item perldepend (o) | ||||
2857 | |||||
2858 | Defines the dependency from all *.h files that come with the perl | ||||
2859 | distribution. | ||||
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 | ||||
2864 | 3 | 0s | my($self) = shift; | ||
2865 | 3 | 0s | my(@m); | ||
2866 | |||||
2867 | 3 | 0s | 3 | 562ms | 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 | |||||
2869 | 3 | 0s | 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 | ||||
2879 | MAKE_FRAG | ||||
2880 | |||||
2881 | 3 | 0s | 3 | 0s | return join "", @m unless $self->needs_linking; # spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call |
2882 | |||||
2883 | 3 | 0s | 3 | 0s | 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 | |||||
2889 | 3 | 0s | 3 | 0s | 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 | |||||
2891 | 3 | 0s | return join "\n", @m; | ||
2892 | } | ||||
2893 | |||||
2894 | |||||
2895 | =item pm_to_blib | ||||
2896 | |||||
2897 | Defines target that copies all files in the hash PM to their | ||||
2898 | destination 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 | ||||
2903 | 3 | 0s | my $self = shift; | ||
2904 | 3 | 0s | 3 | 0s | my($autodir) = $self->catdir('$(INST_LIB)','auto'); # spent 0s making 3 calls to File::Spec::Win32::catdir, avg 0s/call |
2905 | 3 | 0s | my $r = q{ | ||
2906 | pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM) | ||||
2907 | }; | ||||
2908 | |||||
2909 | # VMS will swallow '' and PM_FILTER is often empty. So use q[] | ||||
2910 | 3 | 0s | 3 | 609ms | my $pm_to_blib = $self->oneliner(<<CODE, ['-MExtUtils::Install']); # spent 609ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 203ms/call |
2911 | pm_to_blib({\@ARGV}, '$autodir', q[\$(PM_FILTER)], '\$(PERM_DIR)') | ||||
2912 | CODE | ||||
2913 | |||||
2914 | my @cmds = $self->split_command($pm_to_blib, | ||||
2915 | 3 | 0s | 6 | 0s | 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 | |||||
2917 | 3 | 0s | $r .= join '', map { "\t\$(NOECHO) $_\n" } @cmds; | ||
2918 | 3 | 0s | $r .= qq{\t\$(NOECHO) \$(TOUCH) pm_to_blib\n}; | ||
2919 | |||||
2920 | 3 | 0s | return $r; | ||
2921 | } | ||||
2922 | |||||
2923 | =item post_constants (o) | ||||
2924 | |||||
2925 | Returns an empty string per default. Dedicated to overrides from | ||||
2926 | within 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 | ||||
2931 | 3 | 0s | ""; | ||
2932 | } | ||||
2933 | |||||
2934 | =item post_initialize (o) | ||||
2935 | |||||
2936 | Returns an empty string per default. Used in Makefile.PLs to add some | ||||
2937 | chunk 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 | ||||
2942 | 3 | 0s | ""; | ||
2943 | } | ||||
2944 | |||||
2945 | =item postamble (o) | ||||
2946 | |||||
2947 | Returns an empty string. Can be used in Makefile.PLs to write some | ||||
2948 | text 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 | ||||
2953 | 3 | 0s | ""; | ||
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' | ||||
2959 | sub _ppd_version { | ||||
2960 | my ($self, $string) = @_; | ||||
2961 | return join ',', ((split /\./, $string), (0) x 4)[0..3]; | ||||
2962 | } | ||||
2963 | |||||
2964 | =item ppd | ||||
2965 | |||||
2966 | Defines target that creates a PPD (Perl Package Description) file | ||||
2967 | for 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 | ||||
2972 | 3 | 0s | my($self) = @_; | ||
2973 | |||||
2974 | 3 | 0s | my $abstract = $self->{ABSTRACT} || ''; | ||
2975 | 3 | 0s | 3 | 0s | $abstract =~ s/\n/\\n/sg; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
2976 | 3 | 0s | 3 | 0s | $abstract =~ s/</</g; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
2977 | 3 | 0s | 3 | 0s | $abstract =~ s/>/>/g; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
2978 | |||||
2979 | 3 | 0s | my $author = join(', ',@{$self->{AUTHOR} || []}); | ||
2980 | 3 | 0s | 3 | 0s | $author =~ s/</</g; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
2981 | 3 | 0s | 3 | 0s | $author =~ s/>/>/g; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
2982 | |||||
2983 | 3 | 0s | my $ppd_file = '$(DISTNAME).ppd'; | ||
2984 | |||||
2985 | 3 | 0s | 3 | 562ms | 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)"> | ||||
2987 | PPD_HTML | ||||
2988 | |||||
2989 | 3 | 0s | my $ppd_xml = sprintf <<'PPD_HTML', $abstract, $author; | ||
2990 | <ABSTRACT>%s</ABSTRACT> | ||||
2991 | <AUTHOR>%s</AUTHOR> | ||||
2992 | PPD_HTML | ||||
2993 | |||||
2994 | 3 | 0s | $ppd_xml .= " <IMPLEMENTATION>\n"; | ||
2995 | 3 | 0s | 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" /> | ||||
2999 | PPD_PERLVERS | ||||
3000 | |||||
3001 | } | ||||
3002 | |||||
3003 | # Don't add "perl" to requires. perl dependencies are | ||||
3004 | # handles by ARCHITECTURE. | ||||
3005 | 3 | 0s | my %prereqs = %{$self->{PREREQ_PM}}; | ||
3006 | 3 | 0s | delete $prereqs{perl}; | ||
3007 | |||||
3008 | # Build up REQUIRE | ||||
3009 | 3 | 0s | 3 | 0s | 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 | |||||
3020 | 3 | 0s | my $archname = $Config{archname}; | ||
3021 | 3 | 0s | 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 | } | ||||
3027 | 3 | 0s | $ppd_xml .= sprintf <<'PPD_OUT', $archname; | ||
3028 | <ARCHITECTURE NAME="%s" /> | ||||
3029 | PPD_OUT | ||||
3030 | |||||
3031 | 3 | 0s | 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 | |||||
3042 | 3 | 0s | 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 | |||||
3053 | 3 | 0s | my ($bin_location) = $self->{BINARY_LOCATION} || ''; | ||
3054 | 3 | 0s | 3 | 0s | $bin_location =~ s/\\/\\\\/g; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
3055 | |||||
3056 | 3 | 0s | $ppd_xml .= sprintf <<'PPD_XML', $bin_location; | ||
3057 | <CODEBASE HREF="%s" /> | ||||
3058 | </IMPLEMENTATION> | ||||
3059 | </SOFTPKG> | ||||
3060 | PPD_XML | ||||
3061 | |||||
3062 | 3 | 0s | 3 | 3.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 | |||||
3064 | 3 | 0s | return sprintf <<'PPD_OUT', join "\n\t", @ppd_cmds; | ||
3065 | # Creates a PPD (Perl Package Description) for a binary distribution. | ||||
3066 | ppd : | ||||
3067 | %s | ||||
3068 | PPD_OUT | ||||
3069 | |||||
3070 | } | ||||
3071 | |||||
3072 | =item prefixify | ||||
3073 | |||||
3074 | $MM->prefixify($var, $prefix, $new_prefix, $default); | ||||
3075 | |||||
3076 | Using either $MM->{uc $var} || $Config{lc $var}, it will attempt to | ||||
3077 | replace it's $prefix with a $new_prefix. | ||||
3078 | |||||
3079 | Should the $prefix fail to match I<AND> a PREFIX was given as an | ||||
3080 | argument to WriteMakefile() it will set it to the $new_prefix + | ||||
3081 | $default. This is for systems whose file layouts don't neatly fit into | ||||
3082 | our ideas of prefixes. | ||||
3083 | |||||
3084 | This is for heuristics which attempt to create directory structures | ||||
3085 | that mirror those of the installed perl. | ||||
3086 | |||||
3087 | For example: | ||||
3088 | |||||
3089 | $MM->prefixify('installman1dir', '/usr', '/home/foo', 'man/man1'); | ||||
3090 | |||||
3091 | this will attempt to remove '/usr' from the front of the | ||||
3092 | $MM->{INSTALLMAN1DIR} path (initializing it to $Config{installman1dir} | ||||
3093 | if necessary) and replace it with '/home/foo'. If this fails it will | ||||
3094 | simply 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 | ||||
3099 | 36 | 0s | my($self,$var,$sprefix,$rprefix,$default) = @_; | ||
3100 | |||||
3101 | 36 | 0s | my $path = $self->{uc $var} || | ||
3102 | $Config_Override{lc $var} || $Config{lc $var} || ''; | ||||
3103 | |||||
3104 | 36 | 0s | 36 | 0s | $rprefix .= '/' if $sprefix =~ m|/$|; # spent 0s making 36 calls to ExtUtils::MM_Unix::CORE:match, avg 0s/call |
3105 | |||||
3106 | 36 | 0s | warn " prefixify $var => $path\n" if $Verbose >= 2; | ||
3107 | 36 | 0s | warn " from $sprefix to $rprefix\n" if $Verbose >= 2; | ||
3108 | |||||
3109 | 36 | 0s | 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 | |||||
3119 | 36 | 0s | print " now $path\n" if $Verbose >= 2; | ||
3120 | 36 | 0s | return $self->{uc $var} = $path; | ||
3121 | } | ||||
3122 | |||||
3123 | |||||
3124 | =item processPL (o) | ||||
3125 | |||||
3126 | Defines 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 | ||||
3131 | 3 | 0s | my $self = shift; | ||
3132 | 3 | 0s | my $pl_files = $self->{PL_FILES}; | ||
3133 | |||||
3134 | 3 | 0s | return "" unless $pl_files; | ||
3135 | |||||
3136 | 3 | 0s | my $m = ''; | ||
3137 | 3 | 0s | 3 | 0s | 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 | |||||
3166 | all :: $target | ||||
3167 | \$(NOECHO) \$(NOOP) | ||||
3168 | |||||
3169 | $target :: $plfile $pm_dep | ||||
3170 | \$($perlrun) $plfile $target | ||||
3171 | MAKE_FRAG | ||||
3172 | |||||
3173 | } | ||||
3174 | } | ||||
3175 | |||||
3176 | 3 | 0s | return $m; | ||
3177 | } | ||||
3178 | |||||
3179 | =item quote_paren | ||||
3180 | |||||
3181 | Backslashes parentheses C<()> in command line arguments. | ||||
3182 | Doesn't handle recursive Makefile C<$(...)> constructs, | ||||
3183 | but 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 | ||||
3188 | 72 | 0s | my $arg = shift; | ||
3189 | 72 | 0s | 72 | 0s | $arg =~ s{\$\((.+?)\)}{\$\\\\($1\\\\)}g; # protect $(...) # spent 0s making 72 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
3190 | 72 | 0s | 72 | 0s | $arg =~ s{(?<!\\)([()])}{\\$1}g; # quote unprotected # spent 0s making 72 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
3191 | 72 | 0s | 72 | 0s | $arg =~ s{\$\\\\\((.+?)\\\\\)}{\$($1)}g; # unprotect $(...) # spent 0s making 72 calls to ExtUtils::MM_Unix::CORE:subst, avg 0s/call |
3192 | 72 | 0s | return $arg; | ||
3193 | } | ||||
3194 | |||||
3195 | =item replace_manpage_separator | ||||
3196 | |||||
3197 | my $man_name = $MM->replace_manpage_separator($file_path); | ||||
3198 | |||||
3199 | Takes the name of a package, which may be a nested package, in the | ||||
3200 | form 'Foo/Bar.pm' and replaces the slash with C<::> or something else | ||||
3201 | safe for a man page file name. Returns the replacement. | ||||
3202 | |||||
3203 | =cut | ||||
3204 | |||||
3205 | sub 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 | ||||
3218 | 23 | 0s | my($self, $dir, @cmds) = @_; | ||
3219 | |||||
3220 | # No leading tab and no trailing newline makes for easier embedding | ||||
3221 | 23 | 0s | my $make_frag = join "\n\t", map { "cd $dir && $_" } @cmds; | ||
3222 | |||||
3223 | 23 | 0s | return $make_frag; | ||
3224 | } | ||||
3225 | |||||
3226 | =item oneliner | ||||
3227 | |||||
3228 | =cut | ||||
3229 | |||||
3230 | sub 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 | |||||
3250 | Quotes macro literal value suitable for being used on a command line so | ||||
3251 | that when expanded by make, will be received by command as given to | ||||
3252 | this 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 | |||||
3263 | sub 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 | |||||
3281 | sub 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 | |||||
3292 | Using POSIX::ARG_MAX. Otherwise falling back to 4096. | ||||
3293 | |||||
3294 | =cut | ||||
3295 | |||||
3296 | sub 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 | |||||
3314 | Defines 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 | ||||
3319 | # --- Static Loading Sections --- | ||||
3320 | |||||
3321 | 3 | 0s | my($self) = shift; | ||
3322 | 3 | 0s | ' | ||
3323 | ## $(INST_PM) has been moved to the all: target. | ||||
3324 | ## It remains here for awhile to allow for old usage: "make static" | ||||
3325 | static :: $(FIRST_MAKEFILE) $(INST_STATIC) | ||||
3326 | $(NOECHO) $(NOOP) | ||||
3327 | '; | ||||
3328 | } | ||||
3329 | |||||
3330 | =item static_lib (o) | ||||
3331 | |||||
3332 | Defines how to produce the *.a (or equivalent) files. | ||||
3333 | |||||
3334 | =cut | ||||
3335 | |||||
3336 | sub 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) $@ | ||||
3345 | END | ||||
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) "$@" | ||||
3351 | MAKE_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" | ||||
3365 | MAKE_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" | ||||
3370 | MAKE_FRAG | ||||
3371 | |||||
3372 | join('', @m); | ||||
3373 | } | ||||
3374 | |||||
3375 | =item staticmake (o) | ||||
3376 | |||||
3377 | Calls 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 | ||||
3382 | 3 | 0s | my($self, %attribs) = @_; | ||
3383 | 3 | 0s | my(@static); | ||
3384 | |||||
3385 | 3 | 0s | 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) | ||||
3389 | 3 | 0s | 3 | 0s | 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. | ||||
3405 | 3 | 0s | my(@perlinc) = ($self->{INST_ARCHLIB}, $self->{INST_LIB}, $self->{PERL_ARCHLIB}, $self->{PERL_LIB}); | ||
3406 | |||||
3407 | 3 | 0s | 3 | 0s | $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 | |||||
3419 | Helper 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 | ||||
3424 | 2 | 0s | my($self, $subdir) = @_; | ||
3425 | |||||
3426 | 2 | 0s | 2 | 374ms | 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 | ); | ||||
3429 | 2 | 0s | return sprintf <<'EOT', $subdir_cmd; | ||
3430 | |||||
3431 | subdirs :: | ||||
3432 | $(NOECHO) %s | ||||
3433 | EOT | ||||
3434 | |||||
3435 | } | ||||
3436 | |||||
3437 | =item subdirs (o) | ||||
3438 | |||||
3439 | Defines 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 | ||||
3444 | # --- Sub-directory Sections --- | ||||
3445 | 3 | 0s | my($self) = shift; | ||
3446 | 3 | 0s | 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. | ||||
3450 | 3 | 0s | foreach my $dir (@{$self->{DIR}}){ | ||
3451 | 2 | 0s | 2 | 374ms | 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 | } | ||||
3454 | 3 | 0s | 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 { | ||||
3461 | 2 | 0s | push(@m, "\n# none") | ||
3462 | } | ||||
3463 | 3 | 0s | join('',@m); | ||
3464 | } | ||||
3465 | |||||
3466 | =item test (o) | ||||
3467 | |||||
3468 | Defines 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 | ||||
3473 | # --- Test and Installation Sections --- | ||||
3474 | |||||
3475 | 3 | 0s | my($self, %attribs) = @_; | ||
3476 | 3 | 0s | my $tests = $attribs{TESTS} || ''; | ||
3477 | 3 | 0s | 7 | 0s | 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 | ||||
3484 | 3 | 0s | 3 | 530ms | $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() | ||||
3486 | 3 | 0s | my(@m); | ||
3487 | 3 | 0s | push(@m," | ||
3488 | TEST_VERBOSE=0 | ||||
3489 | TEST_TYPE=test_\$(LINKTYPE) | ||||
3490 | TEST_FILE = test.pl | ||||
3491 | TEST_FILES = $tests | ||||
3492 | TESTDB_SW = -d | ||||
3493 | |||||
3494 | testdb :: testdb_\$(LINKTYPE) | ||||
3495 | |||||
3496 | test :: \$(TEST_TYPE) subdirs-test | ||||
3497 | |||||
3498 | subdirs-test :: | ||||
3499 | \$(NOECHO) \$(NOOP) | ||||
3500 | |||||
3501 | "); | ||||
3502 | |||||
3503 | 3 | 0s | foreach my $dir (@{ $self->{DIR} }) { | ||
3504 | 2 | 0s | 2 | 374ms | my $test = $self->cd($dir, '$(MAKE) test $(PASTHRU)'); # spent 374ms making 2 calls to ExtUtils::MM_Win32::cd, avg 187ms/call |
3505 | |||||
3506 | 2 | 0s | push @m, <<END | ||
3507 | subdirs-test :: | ||||
3508 | \$(NOECHO) $test | ||||
3509 | |||||
3510 | END | ||||
3511 | } | ||||
3512 | |||||
3513 | push(@m, "\t\$(NOECHO) \$(ECHO) 'No tests defined for \$(NAME) extension.'\n") | ||||
3514 | 3 | 0s | 2 | 0s | unless $tests or -f "test.pl" or @{$self->{DIR}}; # spent 0s making 2 calls to ExtUtils::MM_Unix::CORE:ftfile, avg 0s/call |
3515 | 3 | 0s | push(@m, "\n"); | ||
3516 | |||||
3517 | 3 | 0s | push(@m, "test_dynamic :: pure_all\n"); | ||
3518 | 3 | 0s | 1 | 0s | push(@m, $self->test_via_harness('$(FULLPERLRUN)', '$(TEST_FILES)')) # spent 0s making 1 call to ExtUtils::MM_Any::test_via_harness |
3519 | if $tests; | ||||
3520 | 3 | 0s | 3 | 0s | 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"; | ||||
3522 | 3 | 0s | push(@m, "\n"); | ||
3523 | |||||
3524 | 3 | 0s | push(@m, "testdb_dynamic :: pure_all\n"); | ||
3525 | 3 | 0s | 3 | 0s | 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)')); | ||||
3527 | 3 | 0s | push(@m, "\n"); | ||
3528 | |||||
3529 | # Occasionally we may face this degenerate target: | ||||
3530 | 3 | 0s | push @m, "test_ : test_dynamic\n\n"; | ||
3531 | |||||
3532 | 3 | 0s | 3 | 0s | if ($self->needs_linking()) { # spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call |
3533 | 3 | 0s | push(@m, "test_static :: pure_all \$(MAP_TARGET)\n"); | ||
3534 | 3 | 0s | 1 | 0s | push(@m, $self->test_via_harness('./$(MAP_TARGET)', '$(TEST_FILES)')) if $tests; # spent 0s making 1 call to ExtUtils::MM_Any::test_via_harness |
3535 | 3 | 15.6ms | 3 | 15.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 |
3536 | 3 | 0s | push(@m, "\n"); | ||
3537 | 3 | 0s | push(@m, "testdb_static :: pure_all \$(MAP_TARGET)\n"); | ||
3538 | 3 | 0s | 3 | 0s | 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 |
3539 | 3 | 0s | push(@m, "\n"); | ||
3540 | } else { | ||||
3541 | push @m, "test_static :: test_dynamic\n"; | ||||
3542 | push @m, "testdb_static :: testdb_dynamic\n"; | ||||
3543 | } | ||||
3544 | 3 | 0s | join("", @m); | ||
3545 | } | ||||
3546 | |||||
3547 | =item test_via_harness (override) | ||||
3548 | |||||
3549 | For some reason which I forget, Unix machines like to have | ||||
3550 | PERL_DL_NONLAZY set for tests. | ||||
3551 | |||||
3552 | =cut | ||||
3553 | |||||
3554 | sub 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 | |||||
3561 | Again, the PERL_DL_NONLAZY thing. | ||||
3562 | |||||
3563 | =cut | ||||
3564 | |||||
3565 | sub 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 | |||||
3573 | Determines 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 | ||||
3578 | 3 | 0s | my($self) = shift; | ||
3579 | 3 | 0s | 3 | 0s | return "" unless $self->needs_linking; # spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call |
3580 | |||||
3581 | 3 | 0s | my $xsdir; | ||
3582 | 3 | 0s | my @xsubpp_dirs = @INC; | ||
3583 | |||||
3584 | # Make sure we pick up the new xsubpp if we're building perl. | ||||
3585 | 3 | 0s | unshift @xsubpp_dirs, $self->{PERL_LIB} if $self->{PERL_CORE}; | ||
3586 | |||||
3587 | 3 | 0s | my $foundxsubpp = 0; | ||
3588 | 3 | 0s | foreach my $dir (@xsubpp_dirs) { | ||
3589 | 12 | 0s | 12 | 0s | $xsdir = $self->catdir($dir, 'ExtUtils'); # spent 0s making 12 calls to File::Spec::Win32::catdir, avg 0s/call |
3590 | 12 | 0s | 24 | 0s | 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 |
3591 | 3 | 0s | $foundxsubpp = 1; | ||
3592 | 3 | 0s | last; | ||
3593 | } | ||||
3594 | } | ||||
3595 | 3 | 0s | die "ExtUtils::MM_Unix::tool_xsubpp : Can't find xsubpp" if !$foundxsubpp; | ||
3596 | |||||
3597 | 3 | 0s | 3 | 0s | my $tmdir = File::Spec->catdir($self->{PERL_LIB},"ExtUtils"); # spent 0s making 3 calls to File::Spec::Win32::catdir, avg 0s/call |
3598 | 3 | 0s | 3 | 0s | my(@tmdeps) = $self->catfile($tmdir,'typemap'); # spent 0s making 3 calls to ExtUtils::MM_Any::catfile, avg 0s/call |
3599 | 3 | 0s | 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 | } | ||||
3609 | 3 | 0s | 3 | 0s | push(@tmdeps, "typemap") if -f "typemap"; # spent 0s making 3 calls to ExtUtils::MM_Unix::CORE:ftfile, avg 0s/call |
3610 | 3 | 0s | my @tmargs = map(qq{-typemap "$_"}, @tmdeps); | ||
3611 | 3 | 0s | 4 | 0s | $_ = $self->quote_dep($_) for @tmdeps; # spent 0s making 4 calls to ExtUtils::MM_Win32::quote_dep, avg 0s/call |
3612 | 3 | 0s | if( exists $self->{XSOPT} ){ | ||
3613 | unshift( @tmargs, $self->{XSOPT} ); | ||||
3614 | } | ||||
3615 | |||||
3616 | 3 | 0s | 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 | |||||
3626 | 3 | 0s | $self->{XSPROTOARG} = "" unless defined $self->{XSPROTOARG}; | ||
3627 | 3 | 0s | 3 | 0s | 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 | |||||
3630 | 3 | 0s | return qq{ | ||
3631 | XSUBPPDIR = $xsdir | ||||
3632 | XSUBPP = "\$(XSUBPPDIR)\$(DFSEP)xsubpp" | ||||
3633 | XSUBPPRUN = \$(PERLRUN) \$(XSUBPP) | ||||
3634 | XSPROTOARG = $self->{XSPROTOARG} | ||||
3635 | XSUBPPDEPS = @tmdeps $xsdirdep\$(DFSEP)xsubpp | ||||
3636 | XSUBPPARGS = @tmargs | ||||
3637 | XSUBPP_EXTRA_ARGS = | ||||
3638 | }; | ||||
3639 | } | ||||
3640 | |||||
3641 | |||||
3642 | =item all_target | ||||
3643 | |||||
3644 | Build man pages, too | ||||
3645 | |||||
3646 | =cut | ||||
3647 | |||||
3648 | sub all_target { | ||||
3649 | my $self = shift; | ||||
3650 | |||||
3651 | return <<'MAKE_EXT'; | ||||
3652 | all :: pure_all manifypods | ||||
3653 | $(NOECHO) $(NOOP) | ||||
3654 | MAKE_EXT | ||||
3655 | } | ||||
3656 | |||||
3657 | =item top_targets (o) | ||||
3658 | |||||
3659 | Defines 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 | ||||
3664 | # --- Target Sections --- | ||||
3665 | |||||
3666 | 3 | 0s | my($self) = shift; | ||
3667 | 3 | 0s | my(@m); | ||
3668 | |||||
3669 | 3 | 0s | 3 | 0s | 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 | |||||
3671 | 3 | 0s | push @m, ' | ||
3672 | pure_all :: config pm_to_blib subdirs linkext | ||||
3673 | $(NOECHO) $(NOOP) | ||||
3674 | |||||
3675 | subdirs :: $(MYEXTLIB) | ||||
3676 | $(NOECHO) $(NOOP) | ||||
3677 | |||||
3678 | config :: $(FIRST_MAKEFILE) blibdirs | ||||
3679 | $(NOECHO) $(NOOP) | ||||
3680 | '; | ||||
3681 | |||||
3682 | push @m, ' | ||||
3683 | $(O_FILES): $(H_FILES) | ||||
3684 | 3 | 0s | ' if @{$self->{O_FILES} || []} && @{$self->{H} || []}; | ||
3685 | |||||
3686 | 3 | 0s | push @m, q{ | ||
3687 | help : | ||||
3688 | perldoc ExtUtils::MakeMaker | ||||
3689 | }; | ||||
3690 | |||||
3691 | 3 | 0s | join('',@m); | ||
3692 | } | ||||
3693 | |||||
3694 | =item writedoc | ||||
3695 | |||||
3696 | Obsolete, deprecated method. Not used since Version 5.21. | ||||
3697 | |||||
3698 | =cut | ||||
3699 | |||||
3700 | sub 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 | |||||
3711 | Defines 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 | ||||
3716 | 3 | 0s | my($self) = shift; | ||
3717 | 3 | 0s | 3 | 0s | return '' unless $self->needs_linking(); # spent 0s making 3 calls to ExtUtils::MM_Unix::needs_linking, avg 0s/call |
3718 | 3 | 0s | ' | ||
3719 | .xs.c: | ||||
3720 | $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $(XSUBPP_EXTRA_ARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c | ||||
3721 | '; | ||||
3722 | } | ||||
3723 | |||||
3724 | =item xs_cpp (o) | ||||
3725 | |||||
3726 | Defines the suffix rules to compile XS files to C++. | ||||
3727 | |||||
3728 | =cut | ||||
3729 | |||||
3730 | sub 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 | |||||
3741 | Defines suffix rules to go from XS to object files directly. This is | ||||
3742 | only intended for broken make implementations. | ||||
3743 | |||||
3744 | =cut | ||||
3745 | |||||
3746 | sub 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 | |||||
3757 | 1 | 0s | 1; | ||
3758 | |||||
3759 | =back | ||||
3760 | |||||
3761 | =head1 SEE ALSO | ||||
3762 | |||||
3763 | L<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: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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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: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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 |