NAME
ExtUtils::MMUnix - methods used by ExtUtils::MakeMaker
SYNOPSIS
"require ExtUtils::MMUnix;"DESCRIPTION
The methods provided by this package are designed to be used in con-
junction with ExtUtils::MakeMaker. When MakeMaker writes a Makefile, it creates one or more objects that inherit their methods from a package"MM". MM itself doesn't provide any methods, but it ISA ExtU-
tils::MMUnix class. The inheritance tree of MM lets operating specific packages take the responsibility for all the methods provided by MMUnix. We are trying to reduce the number of the necessary overrides by defining rather primitive operations within ExtUtils::MMUnix. If you are going to write a platform specific MM package, please try to limit the necessary overrides to primitive methods, and if it is not possible to do so, let's work out how to achieve that gain. If you are overriding any of these methods in your Makefile.PL (in the MY class), please report that to the makemaker mailing list. We are trying to minimize the necessary method overrides and switch to data driven Makefile.PLs wherever possible. In the long run less methods will be overridable via the MY class. MMEETTHHOODDSS The following description of methods is still under development. Please refer to the code for not suitably documented sections and complain loudly to the makemaker@perl.org mailing list. Better yet, provide a patch.Not all of the methods below are overridable in a Makefile.PL. Overrid-
able methods are marked as (o). All methods are overridable by a plat-
form specific MM*.pm file.Cross-platform methods are being moved into MMAny. If you can't find
something that used to be in here, look in MMAny. Methods osflavor Simply says that we're Unix. co (o) Defines the suffix rules to compile different flavors of C files to object files. cflags (o)Does very much the same as the cflags script in the perl distribu-
tion. It doesn't return the whole compiler command line, but ini-
tializes all of its parts. The constcccmd method then actually returns the definition of the CCCMD macro which uses these parts. constcccmd (o)Returns the full compiler call for C programs and stores the defi-
nition in CONSTCCCMD. constconfig (o) Defines a couple of constants in the Makefile that are importedfrom %Config.
constloadlibs (o)Defines EXTRALIBS, LDLOADLIBS, BSLOADLIBS, LDRUNPATH. See ExtU-
tils::Liblist for details. constants (o)my $makefrag = $mm->constants;
Prints out macros for lots of constants. depend (o) Same as macro for the depend attribute. initDEST$mm->initDEST
Defines the DESTDIR and DEST* variables paralleling the INSTALL*. initdist$mm->initdist;
Defines a lot of macros for distribution support. macro description default TAR tar command to use tar TARFLAGS flags to pass to TAR cvf ZIP zip command to use zipZIPFLAGS flags to pass to ZIP -r
COMPRESS compression command to gzip -best
use for tarfiles SUFFIX suffix to put on .gz compressed files SHAR shar command to use shar PREOP extra commands to run before making the archive POSTOP extra commands to run after making the archive TOUNIX a command to convert linefeeds to Unix style in your archiveCI command to checkin your ci -u
sources to version controlRCSLABEL command to label your sources rcs -Nv$(VERSIONSYM): -q
just after CI is runDISTCP $how argument to manicopy() best
when the distdir is created DISTDEFAULT default target to use to tardist create a distributionDISTVNAME name of the resulting archive $(DISTNAME)-$(VERSION)
(minus suffixes) dist (o)my $distmacros = $mm->dist(%overrides);
Generates a make fragment defining all the macros initialized in initdist.%overrides can be used to override any of the above.
distbasics (o) Defines the targets distclean, distcheck, skipcheck, manifest, veryclean. distci (o) Defines a check in target for RCS. distcore (o)my $distmakefragment = $MM->distcore;
Puts the targets necessary for 'make dist' together into one make fragment. ddiissttttaarrggeettmy $makefrag = $MM->disttarget;
Returns the 'dist' target to make an archive for distribution.This target simply checks to make sure the Makefile is up-to-date
and depends on $(DISTDEFAULT).
ttaarrddiissttttaarrggeettmy $makefrag = $MM->tardisttarget;
Returns the 'tardist' target which is simply so 'make tardist'works. The real work is done by the dynamically named tardist-
filetarget() method, tardist should have that as a dependency. zziippddiissttttaarrggeettmy $makefrag = $MM->zipdisttarget;
Returns the 'zipdist' target which is simply so 'make zipdist'works. The real work is done by the dynamically named zipdist-
filetarget() method, zipdist should have that as a dependency. ttaarrffiilleettaarrggeettmy $makefrag = $MM->tarfiletarget;
The name of this target is the name of the tarball generated by tardist. This target does the actual work of turning the distdir into a tarball. zipfiletargetmy $makefrag = $MM->zipfiletarget;
The name of this target is the name of the zip file generated by zipdist. This target does the actual work of turning the distdir into a zip file. uutardisttargetmy $makefrag = $MM->uutardisttarget;
Converts the tarfile into a uuencoded file shdisttargetmy $makefrag = $MM->shdisttarget;
Converts the distdir into a shell archive. dlsyms (o) Used by some OS' to define DLFUNCS and DLVARS and write the *.exp files. Normally just returns an empty string. dynamicbs (o) Defines targets for bootstrap files. dynamiclib (o) Defines how to produce the *.so (or equivalent) files. exescan Deprecated method. Use libscan instead. extliblistCalled by initothers, and calls ext ExtUtils::Liblist. See ExtU-
tils::Liblist for details. findperl Finds the executables PERL and FULLPERL fixin$mm->fixin(@files);
Inserts the sharpbang or equivalent magic number to a set of @files. force (o) Writes an empty FORCE: target. guessname Guess the name of this package by examining the working directory's name. MakeMaker calls this only if the developer has not supplied aNAME attribute.
haslinkcode Returns true if C, XS, MYEXTLIB or similar objects exist withinthis object that need a compiler. Does not descend into subdirecto-
ries as needslinking() does. initdirscan Scans the directory structure and initializes DIR, XS, XSFILES, PM, C, CFILES, OFILES, H, HFILES, PLFILES, MAN*PODS, EXEFILES. Called by initmain. initDIRFILESEP Using / for Unix. Called by initmain. initmainInitializes AR, ARSTATICARGS, BASEEXT, CONFIG, DISTNAME, DLBASE,
EXEEXT, FULLEXT, FULLPERL, FULLPERLRUN, FULLPERLRUNINST, INST*,INSTALL*, INSTALLDIRS, LIBEXT, LIBPERLA, MAPTARGET, NAME,
OBJEXT, PARENTNAME, PERL, PERLARCHLIB, PERLINC, PERLLIB,
PERLSRC, PERLRUN, PERLRUNINST, PREFIX, VERSION, VERSIONSYM, XSVERSION. initothers Initializes EXTRALIBS, BSLOADLIBS, LDLOADLIBS, LIBS, LDRUNPATH, LD, OBJECT, BOOTDEP, PERLMAINCC, LDFROM, LINKTYPE, SHELL, NOOP, FIRSTMAKEFILE, MAKEFILEOLD, NOECHO, RMF, RMRF, TESTF, TOUCH, CP, MV, CHMOD, UMASKNULL, ECHO, ECHON initlinker Unix has no need of special linker flags. initPERL$mm->initPERL;
Called by initmain. Sets up ABSPERL, PERL, FULLPERL and all the *PERLRUN* permutations. PERL is allowed to be miniperl FULLPERL must be a complete perl ABSPERL is PERL converted to an absolute path *PERLRUN contains everything necessary to run perl, find it's libraries, etc... *PERLRUNINST is *PERLRUN + everything necessary to find the modules being built. initplatform platformconstants Add MMUnixVERSION. initPERM$mm->initPERM
Called by initmain. Initializes PERL* initxs$mm->initxs
Sets up macros having to do with XS code. Currently just INSTSTATIC, INSTDYNAMIC and INSTBOOT. install (o) Defines the install target. installbin (o) Defines targets to make and to install EXEFILES. linkext (o) Defines the linkext target which in turn defines the LINKTYPE. lsdir Takes as arguments a directory name and a regular expression.Returns all entries in the directory that match the regular expres-
sion. macro (o) Simple subroutine to insert the macros defined by the macro attribute into the Makefile. makeaperl (o) Called by staticmake. Defines how to write the Makefile to produce a static new perl. By default the Makefile produced includes all the static extensions in the perl library. (Purified versions of library files, e.g., DynaLoaderpurep1c0032.a are automatically ignored to avoid link errors.) makefile (o) Defines how to rewrite the Makefile. maybecommand Returns true, if the argument is likely to be a command. needslinking (o) Does this module need linking? Looks into subdirectory objects (see also haslinkcode()) nicetext misnamed method (will have to be changed). The MMUnix method just returns the argument without further processing. On VMS used to insure that colons marking targets are preceded byspace - most Unix Makes don't need this, but it's necessary under
VMS to distinguish the target delimiter from a colon appearing as part of a filespec. parseabstract parse a file and return what you think is the ABSTRACT parseversionparse a file and return what you think is $VERSION in this file set
to. It will return the string "undef" if it can't figure out what$VERSION is. $VERSION should be for all to see, so our $VERSION or
plain $VERSION are okay, but my $VERSION is not.
pasthru (o)Defines the string that is passed to recursive make calls in subdi-
rectories. perlscript Takes one argument, a file name, and returns the file name, if the argument is likely to be a perl script. On MMUnix this is true for any ordinary, readable file. perldepend (o) Defines the dependency from all *.h files that come with the perl distribution. permrw (o) Returns the attribute "PERMRW" or the string 644. Used as the string that is passed to the "chmod" command to set the permissions for read/writeable files. MakeMaker chooses 644 because it hasturned out in the past that relying on the umask provokes hard-to-
track bug reports. When the return value is used by the perl func-
tion "chmod", it is interpreted as an octal value. permrwx (o) Returns the attribute "PERMRWX" or the string 755, i.e. the string that is passed to the "chmod" command to set the permissions for executable files. See also perlrw. pmtoblibDefines target that copies all files in the hash PM to their desti-
nation and autosplits them. See "DESCRIPTION" in ExtUtils::Install
postconstants (o) Returns an empty string per default. Dedicated to overrides from within Makefile.PL after all constants have been defined. postinitialize (o) Returns an empty string per default. Used in Makefile.PLs to add some chunk of text to the Makefile after the object is initialized. postamble (o) Returns an empty string. Can be used in Makefile.PLs to write some text to the Makefile at the end. ppd Defines target that creates a PPD (Perl Package Description) file for a binary distribution. prefixify$MM->prefixify($var, $prefix, $newprefix, $default);
Using either $MM->{uc $var} || $Config{lc $var}, it will attempt to
replace it's $prefix with a $newprefix.
Should the $prefix fail to match AND a PREFIX was given as an argu-
ment to WriteMakefile() it will set it to the $newprefix +
$default. This is for systems whose file layouts don't neatly fit
into our ideas of prefixes. This is for heuristics which attempt to create directory structures that mirror those of the installed perl. For example:$MM->prefixify('installman1dir', '/usr', '/home/foo', 'man/man1');
this will attempt to remove '/usr' from the front of the$MM->{INSTALLMAN1DIR} path (initializing it to $Config{install-
man1dir} if necessary) and replace it with '/home/foo'. If this fails it will simply use '/home/foo/man/man1'. processPL (o) Defines targets to run *.PL files. quoteparen Backslashes parentheses "()" in command line arguments. Doesn'thandle recursive Makefile "$(...)" constructs, but handles simple
ones. replacemanpageseparatormy $manname = $MM->replacemanpageseparator($filepath);
Takes the name of a package, which may be a nested package, in the form 'Foo/Bar.pm' and replaces the slash with "::" or something else safe for a man page file name. Returns the replacement. cd oneliner quoteliteral escapenewlines maxexeclen Using POSIX::ARGMAX. Otherwise falling back to 4096. static (o) Defines the static target. staticlib (o) Defines how to produce the *.a (or equivalent) files. staticmake (o) Calls makeaperl. subdirx (o) Helper subroutine for subdirs subdirs (o) Defines targets to process subdirectories. test (o) Defines the test targets. testviaharness (override) For some reason which I forget, Unix machines like to have PERLDLNONLAZY set for tests. testviascript (override) Again, the PERLDLNONLAZY thing. toolsother (o)my $makefrag = $MM->toolsother;
Returns a make fragment containing definitions for the macros initothers() initializes. toolxsubpp (o) Determines typemaps, xsubpp version, prototype behaviour. alltarget Build man pages, too toptargets (o) Defines the targets all, subdirs, config, and OFILES writedoc Obsolete, deprecated method. Not used since Version 5.21. xsc (o) Defines the suffix rules to compile XS files to C. xscpp (o) Defines the suffix rules to compile XS files to C++. xso (o) Defines suffix rules to go from XS to object files directly. This is only intended for broken make implementations.SEE ALSO
ExtUtils::MakeMakerperl v5.8.8 2001-09-21 ExtUtils::MMUnix(3pm)