Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 |
2 | .\" | |
3 | .\" Standard preamble: | |
4 | .\" ======================================================================== | |
5 | .de Sh \" Subsection heading | |
6 | .br | |
7 | .if t .Sp | |
8 | .ne 5 | |
9 | .PP | |
10 | \fB\\$1\fR | |
11 | .PP | |
12 | .. | |
13 | .de Sp \" Vertical space (when we can't use .PP) | |
14 | .if t .sp .5v | |
15 | .if n .sp | |
16 | .. | |
17 | .de Vb \" Begin verbatim text | |
18 | .ft CW | |
19 | .nf | |
20 | .ne \\$1 | |
21 | .. | |
22 | .de Ve \" End verbatim text | |
23 | .ft R | |
24 | .fi | |
25 | .. | |
26 | .\" Set up some character translations and predefined strings. \*(-- will | |
27 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left | |
28 | .\" double quote, and \*(R" will give a right double quote. | will give a | |
29 | .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to | |
30 | .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' | |
31 | .\" expand to `' in nroff, nothing in troff, for use with C<>. | |
32 | .tr \(*W-|\(bv\*(Tr | |
33 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' | |
34 | .ie n \{\ | |
35 | . ds -- \(*W- | |
36 | . ds PI pi | |
37 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch | |
38 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch | |
39 | . ds L" "" | |
40 | . ds R" "" | |
41 | . ds C` "" | |
42 | . ds C' "" | |
43 | 'br\} | |
44 | .el\{\ | |
45 | . ds -- \|\(em\| | |
46 | . ds PI \(*p | |
47 | . ds L" `` | |
48 | . ds R" '' | |
49 | 'br\} | |
50 | .\" | |
51 | .\" If the F register is turned on, we'll generate index entries on stderr for | |
52 | .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index | |
53 | .\" entries marked with X<> in POD. Of course, you'll have to process the | |
54 | .\" output yourself in some meaningful fashion. | |
55 | .if \nF \{\ | |
56 | . de IX | |
57 | . tm Index:\\$1\t\\n%\t"\\$2" | |
58 | .. | |
59 | . nr % 0 | |
60 | . rr F | |
61 | .\} | |
62 | .\" | |
63 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes | |
64 | .\" way too many mistakes in technical documents. | |
65 | .hy 0 | |
66 | .if n .na | |
67 | .\" | |
68 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). | |
69 | .\" Fear. Run. Save yourself. No user-serviceable parts. | |
70 | . \" fudge factors for nroff and troff | |
71 | .if n \{\ | |
72 | . ds #H 0 | |
73 | . ds #V .8m | |
74 | . ds #F .3m | |
75 | . ds #[ \f1 | |
76 | . ds #] \fP | |
77 | .\} | |
78 | .if t \{\ | |
79 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) | |
80 | . ds #V .6m | |
81 | . ds #F 0 | |
82 | . ds #[ \& | |
83 | . ds #] \& | |
84 | .\} | |
85 | . \" simple accents for nroff and troff | |
86 | .if n \{\ | |
87 | . ds ' \& | |
88 | . ds ` \& | |
89 | . ds ^ \& | |
90 | . ds , \& | |
91 | . ds ~ ~ | |
92 | . ds / | |
93 | .\} | |
94 | .if t \{\ | |
95 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" | |
96 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' | |
97 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' | |
98 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' | |
99 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' | |
100 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' | |
101 | .\} | |
102 | . \" troff and (daisy-wheel) nroff accents | |
103 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' | |
104 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' | |
105 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] | |
106 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' | |
107 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' | |
108 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] | |
109 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] | |
110 | .ds ae a\h'-(\w'a'u*4/10)'e | |
111 | .ds Ae A\h'-(\w'A'u*4/10)'E | |
112 | . \" corrections for vroff | |
113 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' | |
114 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' | |
115 | . \" for low resolution devices (crt and lpr) | |
116 | .if \n(.H>23 .if \n(.V>19 \ | |
117 | \{\ | |
118 | . ds : e | |
119 | . ds 8 ss | |
120 | . ds o a | |
121 | . ds d- d\h'-1'\(ga | |
122 | . ds D- D\h'-1'\(hy | |
123 | . ds th \o'bp' | |
124 | . ds Th \o'LP' | |
125 | . ds ae ae | |
126 | . ds Ae AE | |
127 | .\} | |
128 | .rm #[ #] #H #V #F C | |
129 | .\" ======================================================================== | |
130 | .\" | |
131 | .IX Title "ExtUtils::MM_Any 3" | |
132 | .TH ExtUtils::MM_Any 3 "2001-09-21" "perl v5.8.8" "Perl Programmers Reference Guide" | |
133 | .SH "NAME" | |
134 | ExtUtils::MM_Any \- Platform\-agnostic MM methods | |
135 | .SH "SYNOPSIS" | |
136 | .IX Header "SYNOPSIS" | |
137 | .Vb 1 | |
138 | \& FOR INTERNAL USE ONLY! | |
139 | .Ve | |
140 | .PP | |
141 | .Vb 1 | |
142 | \& package ExtUtils::MM_SomeOS; | |
143 | .Ve | |
144 | .PP | |
145 | .Vb 4 | |
146 | \& # Temporarily, you have to subclass both. Put MM_Any first. | |
147 | \& require ExtUtils::MM_Any; | |
148 | \& require ExtUtils::MM_Unix; | |
149 | \& @ISA = qw(ExtUtils::MM_Any ExtUtils::Unix); | |
150 | .Ve | |
151 | .SH "DESCRIPTION" | |
152 | .IX Header "DESCRIPTION" | |
153 | \&\fB\s-1FOR\s0 \s-1INTERNAL\s0 \s-1USE\s0 \s-1ONLY\s0!\fR | |
154 | .PP | |
155 | ExtUtils::MM_Any is a superclass for the ExtUtils::MM_* set of | |
156 | modules. It contains methods which are either inherently | |
157 | cross-platform or are written in a cross-platform manner. | |
158 | .PP | |
159 | Subclass off of ExtUtils::MM_Any \fIand\fR ExtUtils::MM_Unix. This is a | |
160 | temporary solution. | |
161 | .PP | |
162 | \&\fB\s-1THIS\s0 \s-1MAY\s0 \s-1BE\s0 \s-1TEMPORARY\s0!\fR | |
163 | .SH "METHODS" | |
164 | .IX Header "METHODS" | |
165 | Any methods marked \fIAbstract\fR must be implemented by subclasses. | |
166 | .Sh "Cross-platform helper methods" | |
167 | .IX Subsection "Cross-platform helper methods" | |
168 | These are methods which help writing cross-platform code. | |
169 | .PP | |
170 | \fIos_flavor \fIAbstract\fI\fR | |
171 | .IX Subsection "os_flavor Abstract" | |
172 | .PP | |
173 | .Vb 1 | |
174 | \& my @os_flavor = $mm->os_flavor; | |
175 | .Ve | |
176 | .PP | |
177 | @os_flavor is the style of operating system this is, usually | |
178 | corresponding to the MM_*.pm file we're using. | |
179 | .PP | |
180 | The first element of \f(CW@os_flavor\fR is the major family (ie. Unix, | |
181 | Windows, \s-1VMS\s0, \s-1OS/2\s0, etc...) and the rest are sub families. | |
182 | .PP | |
183 | Some examples: | |
184 | .PP | |
185 | .Vb 6 | |
186 | \& Cygwin98 ('Unix', 'Cygwin', 'Cygwin9x') | |
187 | \& Windows NT ('Win32', 'WinNT') | |
188 | \& Win98 ('Win32', 'Win9x') | |
189 | \& Linux ('Unix', 'Linux') | |
190 | \& MacOS X ('Unix', 'Darwin', 'MacOS', 'MacOS X') | |
191 | \& OS/2 ('OS/2') | |
192 | .Ve | |
193 | .PP | |
194 | This is used to write code for styles of operating system. | |
195 | See \fIos_flavor_is()\fR for use. | |
196 | .PP | |
197 | \fIos_flavor_is\fR | |
198 | .IX Subsection "os_flavor_is" | |
199 | .PP | |
200 | .Vb 2 | |
201 | \& my $is_this_flavor = $mm->os_flavor_is($this_flavor); | |
202 | \& my $is_this_flavor = $mm->os_flavor_is(@one_of_these_flavors); | |
203 | .Ve | |
204 | .PP | |
205 | Checks to see if the current operating system is one of the given flavors. | |
206 | .PP | |
207 | This is useful for code like: | |
208 | .PP | |
209 | .Vb 6 | |
210 | \& if( $mm->os_flavor_is('Unix') ) { | |
211 | \& $out = `foo 2>&1`; | |
212 | \& } | |
213 | \& else { | |
214 | \& $out = `foo`; | |
215 | \& } | |
216 | .Ve | |
217 | .PP | |
218 | \fIsplit_command\fR | |
219 | .IX Subsection "split_command" | |
220 | .PP | |
221 | .Vb 1 | |
222 | \& my @cmds = $MM->split_command($cmd, @args); | |
223 | .Ve | |
224 | .PP | |
225 | Most \s-1OS\s0 have a maximum command length they can execute at once. Large | |
226 | modules can easily generate commands well past that limit. Its | |
227 | necessary to split long commands up into a series of shorter commands. | |
228 | .PP | |
229 | \&\f(CW\*(C`split_command\*(C'\fR will return a series of \f(CW@cmds\fR each processing part of | |
230 | the args. Collectively they will process all the arguments. Each | |
231 | individual line in \f(CW@cmds\fR will not be longer than the | |
232 | \&\f(CW$self\fR\->max_exec_len being careful to take into account macro expansion. | |
233 | .PP | |
234 | $cmd should include any switches and repeated initial arguments. | |
235 | .PP | |
236 | If no \f(CW@args\fR are given, no \f(CW@cmds\fR will be returned. | |
237 | .PP | |
238 | Pairs of arguments will always be preserved in a single command, this | |
239 | is a heuristic for things like pm_to_blib and pod2man which work on | |
240 | pairs of arguments. This makes things like this safe: | |
241 | .PP | |
242 | .Vb 1 | |
243 | \& $self->split_command($cmd, %pod2man); | |
244 | .Ve | |
245 | .PP | |
246 | \fIecho\fR | |
247 | .IX Subsection "echo" | |
248 | .PP | |
249 | .Vb 3 | |
250 | \& my @commands = $MM->echo($text); | |
251 | \& my @commands = $MM->echo($text, $file); | |
252 | \& my @commands = $MM->echo($text, $file, $appending); | |
253 | .Ve | |
254 | .PP | |
255 | Generates a set of \f(CW@commands\fR which print the \f(CW$text\fR to a \f(CW$file\fR. | |
256 | .PP | |
257 | If \f(CW$file\fR is not given, output goes to \s-1STDOUT\s0. | |
258 | .PP | |
259 | If \f(CW$appending\fR is true the \f(CW$file\fR will be appended to rather than | |
260 | overwritten. | |
261 | .PP | |
262 | \fIwraplist\fR | |
263 | .IX Subsection "wraplist" | |
264 | .PP | |
265 | .Vb 1 | |
266 | \& my $args = $mm->wraplist(@list); | |
267 | .Ve | |
268 | .PP | |
269 | Takes an array of items and turns them into a well-formatted list of | |
270 | arguments. In most cases this is simply something like: | |
271 | .PP | |
272 | .Vb 3 | |
273 | \& FOO \e | |
274 | \& BAR \e | |
275 | \& BAZ | |
276 | .Ve | |
277 | .PP | |
278 | \fIcd \fIAbstract\fI\fR | |
279 | .IX Subsection "cd Abstract" | |
280 | .PP | |
281 | .Vb 1 | |
282 | \& my $subdir_cmd = $MM->cd($subdir, @cmds); | |
283 | .Ve | |
284 | .PP | |
285 | This will generate a make fragment which runs the \f(CW@cmds\fR in the given | |
286 | \&\f(CW$dir\fR. The rough equivalent to this, except cross platform. | |
287 | .PP | |
288 | .Vb 1 | |
289 | \& cd $subdir && $cmd | |
290 | .Ve | |
291 | .PP | |
292 | Currently \f(CW$dir\fR can only go down one level. \*(L"foo\*(R" is fine. \*(L"foo/bar\*(R" is | |
293 | not. \*(L"../foo\*(R" is right out. | |
294 | .PP | |
295 | The resulting \f(CW$subdir_cmd\fR has no leading tab nor trailing newline. This | |
296 | makes it easier to embed in a make string. For example. | |
297 | .PP | |
298 | .Vb 6 | |
299 | \& my $make = sprintf <<'CODE', $subdir_cmd; | |
300 | \& foo : | |
301 | \& $(ECHO) what | |
302 | \& %s | |
303 | \& $(ECHO) mouche | |
304 | \& CODE | |
305 | .Ve | |
306 | .PP | |
307 | \fIoneliner \fIAbstract\fI\fR | |
308 | .IX Subsection "oneliner Abstract" | |
309 | .PP | |
310 | .Vb 2 | |
311 | \& my $oneliner = $MM->oneliner($perl_code); | |
312 | \& my $oneliner = $MM->oneliner($perl_code, \e@switches); | |
313 | .Ve | |
314 | .PP | |
315 | This will generate a perl one-liner safe for the particular platform | |
316 | you're on based on the given \f(CW$perl_code\fR and \f(CW@switches\fR (a \-e is | |
317 | assumed) suitable for using in a make target. It will use the proper | |
318 | shell quoting and escapes. | |
319 | .PP | |
320 | $(\s-1PERLRUN\s0) will be used as perl. | |
321 | .PP | |
322 | Any newlines in \f(CW$perl_code\fR will be escaped. Leading and trailing | |
323 | newlines will be stripped. Makes this idiom much easier: | |
324 | .PP | |
325 | .Vb 4 | |
326 | \& my $code = $MM->oneliner(<<'CODE', [...switches...]); | |
327 | \&some code here | |
328 | \&another line here | |
329 | \&CODE | |
330 | .Ve | |
331 | .PP | |
332 | Usage might be something like: | |
333 | .PP | |
334 | .Vb 3 | |
335 | \& # an echo emulation | |
336 | \& $oneliner = $MM->oneliner('print "Foo\en"'); | |
337 | \& $make = '$oneliner > somefile'; | |
338 | .Ve | |
339 | .PP | |
340 | All dollar signs must be doubled in the \f(CW$perl_code\fR if you expect them | |
341 | to be interpreted normally, otherwise it will be considered a make | |
342 | macro. Also remember to quote make macros else it might be used as a | |
343 | bareword. For example: | |
344 | .PP | |
345 | .Vb 2 | |
346 | \& # Assign the value of the $(VERSION_FROM) make macro to $vf. | |
347 | \& $oneliner = $MM->oneliner('$$vf = "$(VERSION_FROM)"'); | |
348 | .Ve | |
349 | .PP | |
350 | Its currently very simple and may be expanded sometime in the figure | |
351 | to include more flexible code and switches. | |
352 | .PP | |
353 | \fIquote_literal \fIAbstract\fI\fR | |
354 | .IX Subsection "quote_literal Abstract" | |
355 | .PP | |
356 | .Vb 1 | |
357 | \& my $safe_text = $MM->quote_literal($text); | |
358 | .Ve | |
359 | .PP | |
360 | This will quote \f(CW$text\fR so it is interpreted literally in the shell. | |
361 | .PP | |
362 | For example, on Unix this would escape any single-quotes in \f(CW$text\fR and | |
363 | put single-quotes around the whole thing. | |
364 | .PP | |
365 | \fIescape_newlines \fIAbstract\fI\fR | |
366 | .IX Subsection "escape_newlines Abstract" | |
367 | .PP | |
368 | .Vb 1 | |
369 | \& my $escaped_text = $MM->escape_newlines($text); | |
370 | .Ve | |
371 | .PP | |
372 | Shell escapes newlines in \f(CW$text\fR. | |
373 | .PP | |
374 | \fImax_exec_len \fIAbstract\fI\fR | |
375 | .IX Subsection "max_exec_len Abstract" | |
376 | .PP | |
377 | .Vb 1 | |
378 | \& my $max_exec_len = $MM->max_exec_len; | |
379 | .Ve | |
380 | .PP | |
381 | Calculates the maximum command size the \s-1OS\s0 can exec. Effectively, | |
382 | this is the max size of a shell command line. | |
383 | .Sh "Targets" | |
384 | .IX Subsection "Targets" | |
385 | These are methods which produce make targets. | |
386 | .PP | |
387 | \fIall_target\fR | |
388 | .IX Subsection "all_target" | |
389 | .PP | |
390 | Generate the default target 'all'. | |
391 | .PP | |
392 | \fIblibdirs_target\fR | |
393 | .IX Subsection "blibdirs_target" | |
394 | .PP | |
395 | .Vb 1 | |
396 | \& my $make_frag = $mm->blibdirs_target; | |
397 | .Ve | |
398 | .PP | |
399 | Creates the blibdirs target which creates all the directories we use | |
400 | in blib/. | |
401 | .PP | |
402 | The blibdirs.ts target is deprecated. Depend on blibdirs instead. | |
403 | .PP | |
404 | \fIclean (o)\fR | |
405 | .IX Subsection "clean (o)" | |
406 | .PP | |
407 | Defines the clean target. | |
408 | .PP | |
409 | \fIclean_subdirs_target\fR | |
410 | .IX Subsection "clean_subdirs_target" | |
411 | .PP | |
412 | .Vb 1 | |
413 | \& my $make_frag = $MM->clean_subdirs_target; | |
414 | .Ve | |
415 | .PP | |
416 | Returns the clean_subdirs target. This is used by the clean target to | |
417 | call clean on any subdirectories which contain Makefiles. | |
418 | .PP | |
419 | \fIdir_target\fR | |
420 | .IX Subsection "dir_target" | |
421 | .PP | |
422 | .Vb 1 | |
423 | \& my $make_frag = $mm->dir_target(@directories); | |
424 | .Ve | |
425 | .PP | |
426 | Generates targets to create the specified directories and set its | |
427 | permission to 0755. | |
428 | .PP | |
429 | Because depending on a directory to just ensure it exists doesn't work | |
430 | too well (the modified time changes too often) \fIdir_target()\fR creates a | |
431 | \&.exists file in the created directory. It is this you should depend on. | |
432 | For portability purposes you should use the $(\s-1DIRFILESEP\s0) macro rather | |
433 | than a '/' to seperate the directory from the file. | |
434 | .PP | |
435 | .Vb 1 | |
436 | \& yourdirectory$(DIRFILESEP).exists | |
437 | .Ve | |
438 | .PP | |
439 | \fIdistdir\fR | |
440 | .IX Subsection "distdir" | |
441 | .PP | |
442 | Defines the scratch directory target that will hold the distribution | |
443 | before tar-ing (or shar\-ing). | |
444 | .PP | |
445 | \fIdist_test\fR | |
446 | .IX Subsection "dist_test" | |
447 | .PP | |
448 | Defines a target that produces the distribution in the | |
449 | scratchdirectory, and runs 'perl Makefile.PL; make ;make test' in that | |
450 | subdirectory. | |
451 | .PP | |
452 | \fIdynamic (o)\fR | |
453 | .IX Subsection "dynamic (o)" | |
454 | .PP | |
455 | Defines the dynamic target. | |
456 | .PP | |
457 | \fImakemakerdflt_target\fR | |
458 | .IX Subsection "makemakerdflt_target" | |
459 | .PP | |
460 | .Vb 1 | |
461 | \& my $make_frag = $mm->makemakerdflt_target | |
462 | .Ve | |
463 | .PP | |
464 | Returns a make fragment with the makemakerdeflt_target specified. | |
465 | This target is the first target in the Makefile, is the default target | |
466 | and simply points off to 'all' just in case any make variant gets | |
467 | confused or something gets snuck in before the real 'all' target. | |
468 | .PP | |
469 | \fImanifypods_target\fR | |
470 | .IX Subsection "manifypods_target" | |
471 | .PP | |
472 | .Vb 1 | |
473 | \& my $manifypods_target = $self->manifypods_target; | |
474 | .Ve | |
475 | .PP | |
476 | Generates the manifypods target. This target generates man pages from | |
477 | all \s-1POD\s0 files in \s-1MAN1PODS\s0 and \s-1MAN3PODS\s0. | |
478 | .PP | |
479 | \fImetafile_target\fR | |
480 | .IX Subsection "metafile_target" | |
481 | .PP | |
482 | .Vb 1 | |
483 | \& my $target = $mm->metafile_target; | |
484 | .Ve | |
485 | .PP | |
486 | Generate the metafile target. | |
487 | .PP | |
488 | Writes the file \s-1META\s0.yml \s-1YAML\s0 encoded meta-data about the module in | |
489 | the distdir. The format follows Module::Build's as closely as | |
490 | possible. Additionally, we include: | |
491 | .PP | |
492 | .Vb 2 | |
493 | \& version_from | |
494 | \& installdirs | |
495 | .Ve | |
496 | .PP | |
497 | \fIdistmeta_target\fR | |
498 | .IX Subsection "distmeta_target" | |
499 | .PP | |
500 | .Vb 1 | |
501 | \& my $make_frag = $mm->distmeta_target; | |
502 | .Ve | |
503 | .PP | |
504 | Generates the distmeta target to add \s-1META\s0.yml to the \s-1MANIFEST\s0 in the | |
505 | distdir. | |
506 | .PP | |
507 | \fIrealclean (o)\fR | |
508 | .IX Subsection "realclean (o)" | |
509 | .PP | |
510 | Defines the realclean target. | |
511 | .PP | |
512 | \fIrealclean_subdirs_target\fR | |
513 | .IX Subsection "realclean_subdirs_target" | |
514 | .PP | |
515 | .Vb 1 | |
516 | \& my $make_frag = $MM->realclean_subdirs_target; | |
517 | .Ve | |
518 | .PP | |
519 | Returns the realclean_subdirs target. This is used by the realclean | |
520 | target to call realclean on any subdirectories which contain Makefiles. | |
521 | .PP | |
522 | \fIsignature_target\fR | |
523 | .IX Subsection "signature_target" | |
524 | .PP | |
525 | .Vb 1 | |
526 | \& my $target = $mm->signature_target; | |
527 | .Ve | |
528 | .PP | |
529 | Generate the signature target. | |
530 | .PP | |
531 | Writes the file \s-1SIGNATURE\s0 with \*(L"cpansign \-s\*(R". | |
532 | .PP | |
533 | \fIdistsignature_target\fR | |
534 | .IX Subsection "distsignature_target" | |
535 | .PP | |
536 | .Vb 1 | |
537 | \& my $make_frag = $mm->distsignature_target; | |
538 | .Ve | |
539 | .PP | |
540 | Generates the distsignature target to add \s-1SIGNATURE\s0 to the \s-1MANIFEST\s0 in the | |
541 | distdir. | |
542 | .PP | |
543 | \fIspecial_targets\fR | |
544 | .IX Subsection "special_targets" | |
545 | .PP | |
546 | .Vb 1 | |
547 | \& my $make_frag = $mm->special_targets | |
548 | .Ve | |
549 | .PP | |
550 | Returns a make fragment containing any targets which have special | |
551 | meaning to make. For example, .SUFFIXES and .PHONY. | |
552 | .Sh "Init methods" | |
553 | .IX Subsection "Init methods" | |
554 | Methods which help initialize the MakeMaker object and macros. | |
555 | .PP | |
556 | \fIinit_INST\fR | |
557 | .IX Subsection "init_INST" | |
558 | .PP | |
559 | .Vb 1 | |
560 | \& $mm->init_INST; | |
561 | .Ve | |
562 | .PP | |
563 | Called by init_main. Sets up all INST_* variables except those related | |
564 | to \s-1XS\s0 code. Those are handled in init_xs. | |
565 | .PP | |
566 | \fIinit_INSTALL\fR | |
567 | .IX Subsection "init_INSTALL" | |
568 | .PP | |
569 | .Vb 1 | |
570 | \& $mm->init_INSTALL; | |
571 | .Ve | |
572 | .PP | |
573 | Called by init_main. Sets up all INSTALL_* variables (except | |
574 | \&\s-1INSTALLDIRS\s0) and *PREFIX. | |
575 | .PP | |
576 | \fIinit_INSTALL_from_PREFIX\fR | |
577 | .IX Subsection "init_INSTALL_from_PREFIX" | |
578 | .PP | |
579 | .Vb 1 | |
580 | \& $mm->init_INSTALL_from_PREFIX; | |
581 | .Ve | |
582 | .PP | |
583 | \fIinit_from_INSTALLBASE\fR | |
584 | .IX Subsection "init_from_INSTALLBASE" | |
585 | .PP | |
586 | .Vb 1 | |
587 | \& $mm->init_from_INSTALLBASE | |
588 | .Ve | |
589 | .PP | |
590 | \fIinit_VERSION \fIAbstract\fI\fR | |
591 | .IX Subsection "init_VERSION Abstract" | |
592 | .PP | |
593 | .Vb 1 | |
594 | \& $mm->init_VERSION | |
595 | .Ve | |
596 | .PP | |
597 | Initialize macros representing versions of MakeMaker and other tools | |
598 | .PP | |
599 | \&\s-1MAKEMAKER:\s0 path to the MakeMaker module. | |
600 | .PP | |
601 | \&\s-1MM_VERSION:\s0 ExtUtils::MakeMaker Version | |
602 | .PP | |
603 | \&\s-1MM_REVISION:\s0 ExtUtils::MakeMaker version control revision (for backwards | |
604 | compat) | |
605 | .PP | |
606 | \&\s-1VERSION:\s0 version of your module | |
607 | .PP | |
608 | \&\s-1VERSION_MACRO:\s0 which macro represents the version (usually '\s-1VERSION\s0') | |
609 | .PP | |
610 | \&\s-1VERSION_SYM:\s0 like version but safe for use as an \s-1RCS\s0 revision number | |
611 | .PP | |
612 | \&\s-1DEFINE_VERSION:\s0 \-D line to set the module version when compiling | |
613 | .PP | |
614 | \&\s-1XS_VERSION:\s0 version in your .xs file. Defaults to $(\s-1VERSION\s0) | |
615 | .PP | |
616 | \&\s-1XS_VERSION_MACRO:\s0 which macro represents the \s-1XS\s0 version. | |
617 | .PP | |
618 | \&\s-1XS_DEFINE_VERSION:\s0 \-D line to set the xs version when compiling. | |
619 | .PP | |
620 | Called by init_main. | |
621 | .PP | |
622 | \fIinit_others \fIAbstract\fI\fR | |
623 | .IX Subsection "init_others Abstract" | |
624 | .PP | |
625 | .Vb 1 | |
626 | \& $MM->init_others(); | |
627 | .Ve | |
628 | .PP | |
629 | Initializes the macro definitions used by \fItools_other()\fR and places them | |
630 | in the \f(CW$MM\fR object. | |
631 | .PP | |
632 | If there is no description, its the same as the parameter to | |
633 | \&\fIWriteMakefile()\fR documented in ExtUtils::MakeMaker. | |
634 | .PP | |
635 | Defines at least these macros. | |
636 | .PP | |
637 | .Vb 1 | |
638 | \& Macro Description | |
639 | .Ve | |
640 | .PP | |
641 | .Vb 2 | |
642 | \& NOOP Do nothing | |
643 | \& NOECHO Tell make not to display the command itself | |
644 | .Ve | |
645 | .PP | |
646 | .Vb 4 | |
647 | \& MAKEFILE | |
648 | \& FIRST_MAKEFILE | |
649 | \& MAKEFILE_OLD | |
650 | \& MAKE_APERL_FILE File used by MAKE_APERL | |
651 | .Ve | |
652 | .PP | |
653 | .Vb 2 | |
654 | \& SHELL Program used to run | |
655 | \& shell commands | |
656 | .Ve | |
657 | .PP | |
658 | .Vb 9 | |
659 | \& ECHO Print text adding a newline on the end | |
660 | \& RM_F Remove a file | |
661 | \& RM_RF Remove a directory | |
662 | \& TOUCH Update a file's timestamp | |
663 | \& TEST_F Test for a file's existence | |
664 | \& CP Copy a file | |
665 | \& MV Move a file | |
666 | \& CHMOD Change permissions on a | |
667 | \& file | |
668 | .Ve | |
669 | .PP | |
670 | .Vb 2 | |
671 | \& UMASK_NULL Nullify umask | |
672 | \& DEV_NULL Supress all command output | |
673 | .Ve | |
674 | .PP | |
675 | \fIinit_DIRFILESEP \fIAbstract\fI\fR | |
676 | .IX Subsection "init_DIRFILESEP Abstract" | |
677 | .PP | |
678 | .Vb 2 | |
679 | \& $MM->init_DIRFILESEP; | |
680 | \& my $dirfilesep = $MM->{DIRFILESEP}; | |
681 | .Ve | |
682 | .PP | |
683 | Initializes the \s-1DIRFILESEP\s0 macro which is the seperator between the | |
684 | directory and filename in a filepath. ie. / on Unix, \e on Win32 and | |
685 | nothing on \s-1VMS\s0. | |
686 | .PP | |
687 | For example: | |
688 | .PP | |
689 | .Vb 2 | |
690 | \& # instead of $(INST_ARCHAUTODIR)/extralibs.ld | |
691 | \& $(INST_ARCHAUTODIR)$(DIRFILESEP)extralibs.ld | |
692 | .Ve | |
693 | .PP | |
694 | Something of a hack but it prevents a lot of code duplication between | |
695 | MM_* variants. | |
696 | .PP | |
697 | Do not use this as a seperator between directories. Some operating | |
698 | systems use different seperators between subdirectories as between | |
699 | directories and filenames (for example: VOLUME:[dir1.dir2]file on \s-1VMS\s0). | |
700 | .PP | |
701 | \fIinit_linker \fIAbstract\fI\fR | |
702 | .IX Subsection "init_linker Abstract" | |
703 | .PP | |
704 | .Vb 1 | |
705 | \& $mm->init_linker; | |
706 | .Ve | |
707 | .PP | |
708 | Initialize macros which have to do with linking. | |
709 | .PP | |
710 | \&\s-1PERL_ARCHIVE:\s0 path to libperl.a equivalent to be linked to dynamic | |
711 | extensions. | |
712 | .PP | |
713 | \&\s-1PERL_ARCHIVE_AFTER:\s0 path to a library which should be put on the | |
714 | linker command line \fIafter\fR the external libraries to be linked to | |
715 | dynamic extensions. This may be needed if the linker is one\-pass, and | |
716 | Perl includes some overrides for C \s-1RTL\s0 functions, such as \fImalloc()\fR. | |
717 | .PP | |
718 | \&\s-1EXPORT_LIST:\s0 name of a file that is passed to linker to define symbols | |
719 | to be exported. | |
720 | .PP | |
721 | Some OSes do not need these in which case leave it blank. | |
722 | .PP | |
723 | \fIinit_platform\fR | |
724 | .IX Subsection "init_platform" | |
725 | .PP | |
726 | .Vb 1 | |
727 | \& $mm->init_platform | |
728 | .Ve | |
729 | .PP | |
730 | Initialize any macros which are for platform specific use only. | |
731 | .PP | |
732 | A typical one is the version number of your \s-1OS\s0 specific mocule. | |
733 | (ie. MM_Unix_VERSION or \s-1MM_VMS_VERSION\s0). | |
734 | .Sh "Tools" | |
735 | .IX Subsection "Tools" | |
736 | A grab bag of methods to generate specific macros and commands. | |
737 | .PP | |
738 | \fImanifypods\fR | |
739 | .IX Subsection "manifypods" | |
740 | .PP | |
741 | Defines targets and routines to translate the pods into manpages and | |
742 | put them into the INST_* directories. | |
743 | .PP | |
744 | \fIPOD2MAN_macro\fR | |
745 | .IX Subsection "POD2MAN_macro" | |
746 | .PP | |
747 | .Vb 1 | |
748 | \& my $pod2man_macro = $self->POD2MAN_macro | |
749 | .Ve | |
750 | .PP | |
751 | Returns a definition for the \s-1POD2MAN\s0 macro. This is a program | |
752 | which emulates the pod2man utility. You can add more switches to the | |
753 | command by simply appending them on the macro. | |
754 | .PP | |
755 | Typical usage: | |
756 | .PP | |
757 | .Vb 1 | |
758 | \& $(POD2MAN) --section=3 --perm_rw=$(PERM_RW) podfile1 man_page1 ... | |
759 | .Ve | |
760 | .PP | |
761 | \fItest_via_harness\fR | |
762 | .IX Subsection "test_via_harness" | |
763 | .PP | |
764 | .Vb 1 | |
765 | \& my $command = $mm->test_via_harness($perl, $tests); | |
766 | .Ve | |
767 | .PP | |
768 | Returns a \f(CW$command\fR line which runs the given set of \f(CW$tests\fR with | |
769 | Test::Harness and the given \f(CW$perl\fR. | |
770 | .PP | |
771 | Used on the t/*.t files. | |
772 | .PP | |
773 | \fItest_via_script\fR | |
774 | .IX Subsection "test_via_script" | |
775 | .PP | |
776 | .Vb 1 | |
777 | \& my $command = $mm->test_via_script($perl, $script); | |
778 | .Ve | |
779 | .PP | |
780 | Returns a \f(CW$command\fR line which just runs a single test without | |
781 | Test::Harness. No checks are done on the results, they're just | |
782 | printed. | |
783 | .PP | |
784 | Used for test.pl, since they don't always follow Test::Harness | |
785 | formatting. | |
786 | .PP | |
787 | \fItool_autosplit\fR | |
788 | .IX Subsection "tool_autosplit" | |
789 | .PP | |
790 | Defines a simple perl call that runs autosplit. May be deprecated by | |
791 | pm_to_blib soon. | |
792 | .Sh "File::Spec wrappers" | |
793 | .IX Subsection "File::Spec wrappers" | |
794 | ExtUtils::MM_Any is a subclass of File::Spec. The methods noted here | |
795 | override File::Spec. | |
796 | .PP | |
797 | \fIcatfile\fR | |
798 | .IX Subsection "catfile" | |
799 | .PP | |
800 | File::Spec <= 0.83 has a bug where the file part of catfile is not | |
801 | canonicalized. This override fixes that bug. | |
802 | .Sh "Misc" | |
803 | .IX Subsection "Misc" | |
804 | Methods I can't really figure out where they should go yet. | |
805 | .PP | |
806 | \fIfind_tests\fR | |
807 | .IX Subsection "find_tests" | |
808 | .PP | |
809 | .Vb 1 | |
810 | \& my $test = $mm->find_tests; | |
811 | .Ve | |
812 | .PP | |
813 | Returns a string suitable for feeding to the shell to return all | |
814 | tests in t/*.t. | |
815 | .PP | |
816 | \fIextra_clean_files\fR | |
817 | .IX Subsection "extra_clean_files" | |
818 | .PP | |
819 | .Vb 1 | |
820 | \& my @files_to_clean = $MM->extra_clean_files; | |
821 | .Ve | |
822 | .PP | |
823 | Returns a list of \s-1OS\s0 specific files to be removed in the clean target in | |
824 | addition to the usual set. | |
825 | .PP | |
826 | \fIinstallvars\fR | |
827 | .IX Subsection "installvars" | |
828 | .PP | |
829 | .Vb 1 | |
830 | \& my @installvars = $mm->installvars; | |
831 | .Ve | |
832 | .PP | |
833 | A list of all the INSTALL* variables without the \s-1INSTALL\s0 prefix. Useful | |
834 | for iteration or building related variable sets. | |
835 | .PP | |
836 | \fIlibscan\fR | |
837 | .IX Subsection "libscan" | |
838 | .PP | |
839 | .Vb 1 | |
840 | \& my $wanted = $self->libscan($path); | |
841 | .Ve | |
842 | .PP | |
843 | Takes a path to a file or dir and returns an empty string if we don't | |
844 | want to include this file in the library. Otherwise it returns the | |
845 | the \f(CW$path\fR unchanged. | |
846 | .PP | |
847 | Mainly used to exclude version control administrative directories from | |
848 | installation. | |
849 | .PP | |
850 | \fIplatform_constants\fR | |
851 | .IX Subsection "platform_constants" | |
852 | .PP | |
853 | .Vb 1 | |
854 | \& my $make_frag = $mm->platform_constants | |
855 | .Ve | |
856 | .PP | |
857 | Returns a make fragment defining all the macros initialized in | |
858 | \&\fIinit_platform()\fR rather than put them in \fIconstants()\fR. | |
859 | .SH "AUTHOR" | |
860 | .IX Header "AUTHOR" | |
861 | Michael G Schwern <schwern@pobox.com> and the denizens of | |
862 | makemaker@perl.org with code from ExtUtils::MM_Unix and | |
863 | ExtUtils::MM_Win32. |