1 .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3
4 .\" ========================================================================
5 .de Sh \" Subsection heading
13 .de Sp \" Vertical space (when we can't use .PP)
17 .de Vb \" Begin verbatim text
22 .de Ve \" End verbatim text
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<>.
33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
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
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.
57 . tm Index:\\$1\t\\n%\t"\\$2"
63 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
64 .\" way too many mistakes in technical documents.
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
79 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
85 . \" simple accents for nroff and troff
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'
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 \
129 .\" ========================================================================
131 .IX Title "ExtUtils::MM_Unix 3"
132 .TH ExtUtils::MM_Unix 3 "2009-07-07" "perl v5.8.7" "User Contributed Perl Documentation"
134 ExtUtils::MM_Unix \- methods used by ExtUtils::MakeMaker
136 .IX Header "SYNOPSIS"
137 \&\f(CW\*(C`require ExtUtils::MM_Unix;\*(C'\fR
139 .IX Header "DESCRIPTION"
140 The methods provided by this package are designed to be used in
141 conjunction with ExtUtils::MakeMaker. When MakeMaker writes a
142 Makefile, it creates one or more objects that inherit their methods
143 from a package \f(CW\*(C`MM\*(C'\fR. \s-1MM\s0 itself doesn't provide any methods, but it
144 \&\s-1ISA\s0 ExtUtils::MM_Unix class. The inheritance tree of \s-1MM\s0 lets operating
145 specific packages take the responsibility for all the methods provided
146 by MM_Unix. We are trying to reduce the number of the necessary
147 overrides by defining rather primitive operations within
150 If you are going to write a platform specific \s-1MM\s0 package, please try
151 to limit the necessary overrides to primitive methods, and if it is not
152 possible to do so, let's work out how to achieve that gain.
154 If you are overriding any of these methods in your Makefile.PL (in the
155 \&\s-1MY\s0 class), please report that to the makemaker mailing list. We are
156 trying to minimize the necessary method overrides and switch to data
157 driven Makefile.PLs wherever possible. In the long run less methods
158 will be overridable via the \s-1MY\s0 class.
161 The following description of methods is still under
162 development. Please refer to the code for not suitably documented
163 sections and complain loudly to the makemaker@perl.org mailing list.
164 Better yet, provide a patch.
166 Not all of the methods below are overridable in a
167 Makefile.PL. Overridable methods are marked as (o). All methods are
168 overridable by a platform specific MM_*.pm file.
170 Cross-platform methods are being moved into MM_Any. If you can't find
171 something that used to be in here, look in MM_Any.
173 .IX Subsection "Methods"
176 Simply says that we're Unix.
179 Defines the suffix rules to compile different flavors of C files to
182 .IX Item "cflags (o)"
183 Does very much the same as the cflags script in the perl
184 distribution. It doesn't return the whole compiler command line, but
185 initializes all of its parts. The const_cccmd method then actually
186 returns the definition of the \s-1CCCMD\s0 macro which uses these parts.
187 .IP "const_cccmd (o)" 4
188 .IX Item "const_cccmd (o)"
189 Returns the full compiler call for C programs and stores the
190 definition in \s-1CONST_CCCMD\s0.
191 .IP "const_config (o)" 4
192 .IX Item "const_config (o)"
193 Defines a couple of constants in the Makefile that are imported from
195 .IP "const_loadlibs (o)" 4
196 .IX Item "const_loadlibs (o)"
197 Defines \s-1EXTRALIBS\s0, \s-1LDLOADLIBS\s0, \s-1BSLOADLIBS\s0, \s-1LD_RUN_PATH\s0. See
198 ExtUtils::Liblist for details.
199 .IP "constants (o)" 4
200 .IX Item "constants (o)"
202 \& my $make_frag = $mm\->constants;
205 Prints out macros for lots of constants.
207 .IX Item "depend (o)"
208 Same as macro for the depend attribute.
215 Defines the \s-1DESTDIR\s0 and DEST* variables paralleling the INSTALL*.
222 Defines a lot of macros for distribution support.
225 \& macro description default
229 \& TAR tar command to use tar
230 \& TARFLAGS flags to pass to TAR cvf
234 \& ZIP zip command to use zip
235 \& ZIPFLAGS flags to pass to ZIP \-r
239 \& COMPRESS compression command to gzip \-\-best
241 \& SUFFIX suffix to put on .gz
246 \& SHAR shar command to use shar
250 \& PREOP extra commands to run before
251 \& making the archive
252 \& POSTOP extra commands to run after
253 \& making the archive
257 \& TO_UNIX a command to convert linefeeds
258 \& to Unix style in your archive
262 \& CI command to checkin your ci \-u
263 \& sources to version control
264 \& RCS_LABEL command to label your sources rcs \-Nv$(VERSION_SYM): \-q
265 \& just after CI is run
269 \& DIST_CP $how argument to manicopy() best
270 \& when the distdir is created
274 \& DIST_DEFAULT default target to use to tardist
275 \& create a distribution
279 \& DISTVNAME name of the resulting archive $(DISTNAME)\-$(VERSION)
285 \& my $dist_macros = $mm\->dist(%overrides);
288 Generates a make fragment defining all the macros initialized in
291 %overrides can be used to override any of the above.
292 .IP "dist_basics (o)" 4
293 .IX Item "dist_basics (o)"
294 Defines the targets distclean, distcheck, skipcheck, manifest, veryclean.
296 .IX Item "dist_ci (o)"
297 Defines a check in target for \s-1RCS\s0.
298 .IP "dist_core (o)" 4
299 .IX Item "dist_core (o)"
301 \& my $dist_make_fragment = $MM\->dist_core;
304 Puts the targets necessary for 'make dist' together into one make
306 .IP "\fBdist_target\fR" 4
307 .IX Item "dist_target"
309 \& my $make_frag = $MM\->dist_target;
312 Returns the 'dist' target to make an archive for distribution. This
313 target simply checks to make sure the Makefile is up-to-date and
314 depends on $(\s-1DIST_DEFAULT\s0).
315 .IP "\fBtardist_target\fR" 4
316 .IX Item "tardist_target"
318 \& my $make_frag = $MM\->tardist_target;
321 Returns the 'tardist' target which is simply so 'make tardist' works.
322 The real work is done by the dynamically named \fItardistfile_target()\fR
323 method, tardist should have that as a dependency.
324 .IP "\fBzipdist_target\fR" 4
325 .IX Item "zipdist_target"
327 \& my $make_frag = $MM\->zipdist_target;
330 Returns the 'zipdist' target which is simply so 'make zipdist' works.
331 The real work is done by the dynamically named \fIzipdistfile_target()\fR
332 method, zipdist should have that as a dependency.
333 .IP "\fBtarfile_target\fR" 4
334 .IX Item "tarfile_target"
336 \& my $make_frag = $MM\->tarfile_target;
339 The name of this target is the name of the tarball generated by
340 tardist. This target does the actual work of turning the distdir into
342 .IP "zipfile_target" 4
343 .IX Item "zipfile_target"
345 \& my $make_frag = $MM\->zipfile_target;
348 The name of this target is the name of the zip file generated by
349 zipdist. This target does the actual work of turning the distdir into
351 .IP "uutardist_target" 4
352 .IX Item "uutardist_target"
354 \& my $make_frag = $MM\->uutardist_target;
357 Converts the tarfile into a uuencoded file
358 .IP "shdist_target" 4
359 .IX Item "shdist_target"
361 \& my $make_frag = $MM\->shdist_target;
364 Converts the distdir into a shell archive.
366 .IX Item "dlsyms (o)"
367 Used by some \s-1OS\s0' to define \s-1DL_FUNCS\s0 and \s-1DL_VARS\s0 and write the *.exp files.
369 Normally just returns an empty string.
370 .IP "dynamic_bs (o)" 4
371 .IX Item "dynamic_bs (o)"
372 Defines targets for bootstrap files.
373 .IP "dynamic_lib (o)" 4
374 .IX Item "dynamic_lib (o)"
375 Defines how to produce the *.so (or equivalent) files.
378 Deprecated method. Use libscan instead.
380 .IX Item "extliblist"
381 Called by init_others, and calls ext ExtUtils::Liblist. See
382 ExtUtils::Liblist for details.
385 Finds the executables \s-1PERL\s0 and \s-1FULLPERL\s0
389 \& $mm\->fixin(@files);
392 Inserts the sharpbang or equivalent magic number to a set of \f(CW@files\fR.
395 Writes an empty \s-1FORCE:\s0 target.
397 .IX Item "guess_name"
398 Guess the name of this package by examining the working directory's
399 name. MakeMaker calls this only if the developer has not supplied a
400 \&\s-1NAME\s0 attribute.
401 .IP "has_link_code" 4
402 .IX Item "has_link_code"
403 Returns true if C, \s-1XS\s0, \s-1MYEXTLIB\s0 or similar objects exist within this
404 object that need a compiler. Does not descend into subdirectories as
405 \&\fIneeds_linking()\fR does.
407 .IX Item "init_dirscan"
408 Scans the directory structure and initializes \s-1DIR\s0, \s-1XS\s0, \s-1XS_FILES\s0,
409 C, C_FILES, O_FILES, H, H_FILES, \s-1PL_FILES\s0, \s-1EXE_FILES\s0.
413 .IX Item "init_MANPODS"
414 Determines if man pages should be generated and initializes \s-1MAN1PODS\s0
415 and \s-1MAN3PODS\s0 as appropriate.
416 .IP "init_MAN1PODS" 4
417 .IX Item "init_MAN1PODS"
418 Initializes \s-1MAN1PODS\s0 from the list of \s-1EXE_FILES\s0.
419 .IP "init_MAN3PODS" 4
420 .IX Item "init_MAN3PODS"
421 Initializes \s-1MAN3PODS\s0 from the list of \s-1PM\s0 files.
424 Initializes \s-1PMLIBDIRS\s0 and \s-1PM\s0 from \s-1PMLIBDIRS\s0.
425 .IP "init_DIRFILESEP" 4
426 .IX Item "init_DIRFILESEP"
427 Using / for Unix. Called by init_main.
430 Initializes \s-1AR\s0, \s-1AR_STATIC_ARGS\s0, \s-1BASEEXT\s0, \s-1CONFIG\s0, \s-1DISTNAME\s0, \s-1DLBASE\s0,
431 \&\s-1EXE_EXT\s0, \s-1FULLEXT\s0, \s-1FULLPERL\s0, \s-1FULLPERLRUN\s0, \s-1FULLPERLRUNINST\s0, INST_*,
432 INSTALL*, \s-1INSTALLDIRS\s0, \s-1LIB_EXT\s0, \s-1LIBPERL_A\s0, \s-1MAP_TARGET\s0, \s-1NAME\s0,
433 \&\s-1OBJ_EXT\s0, \s-1PARENT_NAME\s0, \s-1PERL\s0, \s-1PERL_ARCHLIB\s0, \s-1PERL_INC\s0, \s-1PERL_LIB\s0,
434 \&\s-1PERL_SRC\s0, \s-1PERLRUN\s0, \s-1PERLRUNINST\s0, \s-1PREFIX\s0, \s-1VERSION\s0,
435 \&\s-1VERSION_SYM\s0, \s-1XS_VERSION\s0.
437 .IX Item "init_others"
438 Initializes \s-1EXTRALIBS\s0, \s-1BSLOADLIBS\s0, \s-1LDLOADLIBS\s0, \s-1LIBS\s0, \s-1LD_RUN_PATH\s0, \s-1LD\s0,
439 \&\s-1OBJECT\s0, \s-1BOOTDEP\s0, \s-1PERLMAINCC\s0, \s-1LDFROM\s0, \s-1LINKTYPE\s0, \s-1SHELL\s0, \s-1NOOP\s0,
440 \&\s-1FIRST_MAKEFILE\s0, \s-1MAKEFILE_OLD\s0, \s-1NOECHO\s0, \s-1RM_F\s0, \s-1RM_RF\s0, \s-1TEST_F\s0,
441 \&\s-1TOUCH\s0, \s-1CP\s0, \s-1MV\s0, \s-1CHMOD\s0, \s-1UMASK_NULL\s0, \s-1ECHO\s0, \s-1ECHO_N\s0
443 .IX Item "init_linker"
444 Unix has no need of special linker flags.
451 Called by init_main. Sets up \s-1ABSPERL\s0, \s-1PERL\s0, \s-1FULLPERL\s0 and all the
452 *PERLRUN* permutations.
455 \& PERL is allowed to be miniperl
456 \& FULLPERL must be a complete perl
460 \& ABSPERL is PERL converted to an absolute path
464 \& *PERLRUN contains everything necessary to run perl, find it's
469 \& *PERLRUNINST is *PERLRUN + everything necessary to find the
470 \& modules being built.
472 .IP "init_platform" 4
473 .IX Item "init_platform"
475 .IP "platform_constants" 4
476 .IX Item "platform_constants"
485 Called by init_main. Initializes PERL_*
492 Sets up macros having to do with \s-1XS\s0 code. Currently just \s-1INST_STATIC\s0,
493 \&\s-1INST_DYNAMIC\s0 and \s-1INST_BOOT\s0.
495 .IX Item "install (o)"
496 Defines the install target.
497 .IP "installbin (o)" 4
498 .IX Item "installbin (o)"
499 Defines targets to make and to install \s-1EXE_FILES\s0.
501 .IX Item "linkext (o)"
502 Defines the linkext target which in turn defines the \s-1LINKTYPE\s0.
505 Takes as arguments a directory name and a regular expression. Returns
506 all entries in the directory that match the regular expression.
509 Simple subroutine to insert the macros defined by the macro attribute
511 .IP "makeaperl (o)" 4
512 .IX Item "makeaperl (o)"
513 Called by staticmake. Defines how to write the Makefile to produce a
516 By default the Makefile produced includes all the static extensions in
517 the perl library. (Purified versions of library files, e.g.,
518 DynaLoader_pure_p1_c0_032.a are automatically ignored to avoid link errors.)
520 .IX Item "makefile (o)"
521 Defines how to rewrite the Makefile.
522 .IP "maybe_command" 4
523 .IX Item "maybe_command"
524 Returns true, if the argument is likely to be a command.
525 .IP "needs_linking (o)" 4
526 .IX Item "needs_linking (o)"
527 Does this module need linking? Looks into subdirectory objects (see
528 also \fIhas_link_code()\fR)
529 .IP "parse_abstract" 4
530 .IX Item "parse_abstract"
531 parse a file and return what you think is the \s-1ABSTRACT\s0
532 .IP "parse_version" 4
533 .IX Item "parse_version"
535 \& my $version = MM\->parse_version($file);
538 Parse a \f(CW$file\fR and return what \f(CW$VERSION\fR is set to by the first assignment.
539 It will return the string \*(L"undef\*(R" if it can't figure out what \f(CW$VERSION\fR
540 is. \f(CW$VERSION\fR should be for all to see, so \f(CW\*(C`our $VERSION\*(C'\fR or plain \f(CW$VERSION\fR
541 are okay, but \f(CW\*(C`my $VERSION\*(C'\fR is not.
543 \&\fIparse_version()\fR will try to \f(CW\*(C`use version\*(C'\fR before checking for
544 \&\f(CW$VERSION\fR so the following will work.
547 \& $VERSION = qv(1.2.3);
550 .IX Item "pasthru (o)"
551 Defines the string that is passed to recursive make calls in
554 .IX Item "perl_script"
555 Takes one argument, a file name, and returns the file name, if the
556 argument is likely to be a perl script. On MM_Unix this is true for
557 any ordinary, readable file.
558 .IP "perldepend (o)" 4
559 .IX Item "perldepend (o)"
560 Defines the dependency from all *.h files that come with the perl
563 .IX Item "pm_to_blib"
564 Defines target that copies all files in the hash \s-1PM\s0 to their
565 destination and autosplits them. See \*(L"\s-1DESCRIPTION\s0\*(R" in ExtUtils::Install
566 .IP "post_constants (o)" 4
567 .IX Item "post_constants (o)"
568 Returns an empty string per default. Dedicated to overrides from
569 within Makefile.PL after all constants have been defined.
570 .IP "post_initialize (o)" 4
571 .IX Item "post_initialize (o)"
572 Returns an empty string per default. Used in Makefile.PLs to add some
573 chunk of text to the Makefile after the object is initialized.
574 .IP "postamble (o)" 4
575 .IX Item "postamble (o)"
576 Returns an empty string. Can be used in Makefile.PLs to write some
577 text to the Makefile at the end.
580 Defines target that creates a \s-1PPD\s0 (Perl Package Description) file
581 for a binary distribution.
585 \& $MM\->prefixify($var, $prefix, $new_prefix, $default);
588 Using either \f(CW$MM\fR\->{uc \f(CW$var\fR} || \f(CW$Config\fR{lc \f(CW$var\fR}, it will attempt to
589 replace it's \f(CW$prefix\fR with a \f(CW$new_prefix\fR.
591 Should the \f(CW$prefix\fR fail to match \fI\s-1AND\s0\fR a \s-1PREFIX\s0 was given as an
592 argument to \fIWriteMakefile()\fR it will set it to the \f(CW$new_prefix\fR +
593 \&\f(CW$default\fR. This is for systems whose file layouts don't neatly fit into
594 our ideas of prefixes.
596 This is for heuristics which attempt to create directory structures
597 that mirror those of the installed perl.
602 \& $MM\->prefixify('installman1dir', '/usr', '/home/foo', 'man/man1');
605 this will attempt to remove '/usr' from the front of the
606 \&\f(CW$MM\fR\->{\s-1INSTALLMAN1DIR\s0} path (initializing it to \f(CW$Config\fR{installman1dir}
607 if necessary) and replace it with '/home/foo'. If this fails it will
608 simply use '/home/foo/man/man1'.
609 .IP "processPL (o)" 4
610 .IX Item "processPL (o)"
611 Defines targets to run *.PL files.
613 .IX Item "quote_paren"
614 Backslashes parentheses \f(CW\*(C`()\*(C'\fR in command line arguments.
615 Doesn't handle recursive Makefile \f(CW\*(C`$(...)\*(C'\fR constructs,
616 but handles simple ones.
617 .IP "replace_manpage_separator" 4
618 .IX Item "replace_manpage_separator"
620 \& my $man_name = $MM\->replace_manpage_separator($file_path);
623 Takes the name of a package, which may be a nested package, in the
624 form 'Foo/Bar.pm' and replaces the slash with \f(CW\*(C`::\*(C'\fR or something else
625 safe for a man page file name. Returns the replacement.
631 .IP "quote_literal" 4
632 .IX Item "quote_literal"
633 .IP "escape_newlines" 4
634 .IX Item "escape_newlines"
636 .IX Item "max_exec_len"
638 Using \s-1POSIX::ARG_MAX\s0. Otherwise falling back to 4096.
640 .IX Item "static (o)"
641 Defines the static target.
642 .IP "static_lib (o)" 4
643 .IX Item "static_lib (o)"
644 Defines how to produce the *.a (or equivalent) files.
645 .IP "staticmake (o)" 4
646 .IX Item "staticmake (o)"
649 .IX Item "subdir_x (o)"
650 Helper subroutine for subdirs
652 .IX Item "subdirs (o)"
653 Defines targets to process subdirectories.
656 Defines the test targets.
657 .IP "test_via_harness (override)" 4
658 .IX Item "test_via_harness (override)"
659 For some reason which I forget, Unix machines like to have
660 \&\s-1PERL_DL_NONLAZY\s0 set for tests.
661 .IP "test_via_script (override)" 4
662 .IX Item "test_via_script (override)"
663 Again, the \s-1PERL_DL_NONLAZY\s0 thing.
664 .IP "tool_xsubpp (o)" 4
665 .IX Item "tool_xsubpp (o)"
666 Determines typemaps, xsubpp version, prototype behaviour.
668 .IX Item "all_target"
670 .IP "top_targets (o)" 4
671 .IX Item "top_targets (o)"
672 Defines the targets all, subdirs, config, and O_FILES
675 Obsolete, deprecated method. Not used since Version 5.21.
678 Defines the suffix rules to compile \s-1XS\s0 files to C.
680 .IX Item "xs_cpp (o)"
681 Defines the suffix rules to compile \s-1XS\s0 files to \*(C+.
684 Defines suffix rules to go from \s-1XS\s0 to object files directly. This is
685 only intended for broken make implementations.
687 .IX Header "SEE ALSO"