.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.13)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.el \{\
. de IX
..
.\}
.\" ========================================================================
.\"
.IX Title "ExtUtils::MakeMaker 3"
.TH ExtUtils::MakeMaker 3 "2019-04-28" "perl v5.10.1" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
ExtUtils::MakeMaker \- Create a module Makefile
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\& use ExtUtils::MakeMaker;
\&
\& WriteMakefile(
\& NAME => "Foo::Bar",
\& VERSION_FROM => "lib/Foo/Bar.pm",
\& );
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This utility is designed to write a Makefile for an extension module
from a Makefile.PL. It is based on the Makefile.SH model provided by
Andy Dougherty and the perl5\-porters.
.PP
It splits the task of generating the Makefile into several subroutines
that can be individually overridden. Each subroutine returns the text
it wishes to have written to the Makefile.
.PP
As there are various Make programs with incompatible syntax, which
use operating system shells, again with incompatible syntax, it is
important for users of this module to know which flavour of Make
a Makefile has been written for so they'll use the correct one and
won't have to face the possibly bewildering errors resulting from
using the wrong one.
.PP
On \s-1POSIX\s0 systems, that program will likely be \s-1GNU\s0 Make; on Microsoft
Windows, it will be either Microsoft NMake, DMake or \s-1GNU\s0 Make.
See the section on the \*(L"\s-1MAKE\s0\*(R" parameter for details.
.PP
ExtUtils::MakeMaker (\s-1EUMM\s0) is object oriented. Each directory below the current
directory that contains a Makefile.PL is treated as a separate
object. This makes it possible to write an unlimited number of
Makefiles with a single invocation of \fIWriteMakefile()\fR.
.PP
All inputs to WriteMakefile are Unicode characters, not just octets. \s-1EUMM\s0
seeks to handle all of these correctly. It is currently still not possible
to portably use Unicode characters in module names, because this requires
Perl to handle Unicode filenames, which is not yet the case on Windows.
.SS "How To Write A Makefile.PL"
.IX Subsection "How To Write A Makefile.PL"
See ExtUtils::MakeMaker::Tutorial.
.PP
The long answer is the rest of the manpage :\-)
.SS "Default Makefile Behaviour"
.IX Subsection "Default Makefile Behaviour"
The generated Makefile enables the user of the extension to invoke
.PP
.Vb 4
\& perl Makefile.PL # optionally "perl Makefile.PL verbose"
\& make
\& make test # optionally set TEST_VERBOSE=1
\& make install # See below
.Ve
.PP
The Makefile to be produced may be altered by adding arguments of the
form \f(CW\*(C`KEY=VALUE\*(C'\fR. E.g.
.PP
.Vb 1
\& perl Makefile.PL INSTALL_BASE=~
.Ve
.PP
Other interesting targets in the generated Makefile are
.PP
.Vb 5
\& make config # to check if the Makefile is up\-to\-date
\& make clean # delete local temp files (Makefile gets renamed)
\& make realclean # delete derived files (including ./blib)
\& make ci # check in all the files in the MANIFEST file
\& make dist # see below the Distribution Support section
.Ve
.SS "make test"
.IX Subsection "make test"
MakeMaker checks for the existence of a file named \fItest.pl\fR in the
current directory, and if it exists it executes the script with the
proper set of perl \f(CW\*(C`\-I\*(C'\fR options.
.PP
MakeMaker also checks for any files matching glob(\*(L"t/*.t\*(R"). It will
execute all matching files in alphabetical order via the
Test::Harness module with the \f(CW\*(C`\-I\*(C'\fR switches set correctly.
.PP
You can also organize your tests within subdirectories in the \fIt/\fR directory.
To do so, use the \fItest\fR directive in your \fIMakefile.PL\fR. For example, if you
had tests in:
.PP
.Vb 2
\& t/foo
\& t/foo/bar
.Ve
.PP
You could tell make to run tests in both of those directories with the
following directives:
.PP
.Vb 2
\& test => {TESTS => \*(Aqt/*/*.t t/*/*/*.t\*(Aq}
\& test => {TESTS => \*(Aqt/foo/*.t t/foo/bar/*.t\*(Aq}
.Ve
.PP
The first will run all test files in all first-level subdirectories and all
subdirectories they contain. The second will run tests in only the \fIt/foo\fR
and \fIt/foo/bar\fR.
.PP
If you'd like to see the raw output of your tests, set the
\&\f(CW\*(C`TEST_VERBOSE\*(C'\fR variable to true.
.PP
.Vb 1
\& make test TEST_VERBOSE=1
.Ve
.PP
If you want to run particular test files, set the \f(CW\*(C`TEST_FILES\*(C'\fR variable.
It is possible to use globbing with this mechanism.
.PP
.Vb 1
\& make test TEST_FILES=\*(Aqt/foobar.t t/dagobah*.t\*(Aq
.Ve
.PP
Windows users who are using \f(CW\*(C`nmake\*(C'\fR should note that due to a bug in \f(CW\*(C`nmake\*(C'\fR,
when specifying \f(CW\*(C`TEST_FILES\*(C'\fR you must use back-slashes instead of forward-slashes.
.PP
.Vb 1
\& nmake test TEST_FILES=\*(Aqt\efoobar.t t\edagobah*.t\*(Aq
.Ve
.SS "make testdb"
.IX Subsection "make testdb"
A useful variation of the above is the target \f(CW\*(C`testdb\*(C'\fR. It runs the
test under the Perl debugger (see perldebug). If the file
\&\fItest.pl\fR exists in the current directory, it is used for the test.
.PP
If you want to debug some other testfile, set the \f(CW\*(C`TEST_FILE\*(C'\fR variable
thusly:
.PP
.Vb 1
\& make testdb TEST_FILE=t/mytest.t
.Ve
.PP
By default the debugger is called using \f(CW\*(C`\-d\*(C'\fR option to perl. If you
want to specify some other option, set the \f(CW\*(C`TESTDB_SW\*(C'\fR variable:
.PP
.Vb 1
\& make testdb TESTDB_SW=\-Dx
.Ve
.SS "make install"
.IX Subsection "make install"
make alone puts all relevant files into directories that are named by
the macros \s-1INST_LIB\s0, \s-1INST_ARCHLIB\s0, \s-1INST_SCRIPT\s0, \s-1INST_MAN1DIR\s0 and
\&\s-1INST_MAN3DIR\s0. All these default to something below ./blib if you are
\&\fInot\fR building below the perl source directory. If you \fIare\fR
building below the perl source, \s-1INST_LIB\s0 and \s-1INST_ARCHLIB\s0 default to
\&../../lib, and \s-1INST_SCRIPT\s0 is not defined.
.PP
The \fIinstall\fR target of the generated Makefile copies the files found
below each of the INST_* directories to their INSTALL*
counterparts. Which counterparts are chosen depends on the setting of
\&\s-1INSTALLDIRS\s0 according to the following table:
.PP
.Vb 2
\& INSTALLDIRS set to
\& perl site vendor
\&
\& PERLPREFIX SITEPREFIX VENDORPREFIX
\& INST_ARCHLIB INSTALLARCHLIB INSTALLSITEARCH INSTALLVENDORARCH
\& INST_LIB INSTALLPRIVLIB INSTALLSITELIB INSTALLVENDORLIB
\& INST_BIN INSTALLBIN INSTALLSITEBIN INSTALLVENDORBIN
\& INST_SCRIPT INSTALLSCRIPT INSTALLSITESCRIPT INSTALLVENDORSCRIPT
\& INST_MAN1DIR INSTALLMAN1DIR INSTALLSITEMAN1DIR INSTALLVENDORMAN1DIR
\& INST_MAN3DIR INSTALLMAN3DIR INSTALLSITEMAN3DIR INSTALLVENDORMAN3DIR
.Ve
.PP
The \s-1INSTALL\s0... macros in turn default to their \f(CW%Config\fR
($Config{installprivlib}, \f(CW$Config\fR{installarchlib}, etc.) counterparts.
.PP
You can check the values of these variables on your system with
.PP
.Vb 1
\& perl \*(Aq\-V:install.*\*(Aq
.Ve
.PP
And to check the sequence in which the library directories are
searched by perl, run
.PP
.Vb 1
\& perl \-le \*(Aqprint join $/, @INC\*(Aq
.Ve
.PP
Sometimes older versions of the module you're installing live in other
directories in \f(CW@INC\fR. Because Perl loads the first version of a module it
finds, not the newest, you might accidentally get one of these older
versions even after installing a brand new version. To delete \fIall other
versions of the module you're installing\fR (not simply older ones) set the
\&\f(CW\*(C`UNINST\*(C'\fR variable.
.PP
.Vb 1
\& make install UNINST=1
.Ve
.SS "\s-1INSTALL_BASE\s0"
.IX Subsection "INSTALL_BASE"
\&\s-1INSTALL_BASE\s0 can be passed into Makefile.PL to change where your
module will be installed. \s-1INSTALL_BASE\s0 is more like what everyone
else calls \*(L"prefix\*(R" than \s-1PREFIX\s0 is.
.PP
To have everything installed in your home directory, do the following.
.PP
.Vb 2
\& # Unix users, INSTALL_BASE=~ works fine
\& perl Makefile.PL INSTALL_BASE=/path/to/your/home/dir
.Ve
.PP
Like \s-1PREFIX\s0, it sets several INSTALL* attributes at once. Unlike
\&\s-1PREFIX\s0 it is easy to predict where the module will end up. The
installation pattern looks like this:
.PP
.Vb 6
\& INSTALLARCHLIB INSTALL_BASE/lib/perl5/$Config{archname}
\& INSTALLPRIVLIB INSTALL_BASE/lib/perl5
\& INSTALLBIN INSTALL_BASE/bin
\& INSTALLSCRIPT INSTALL_BASE/bin
\& INSTALLMAN1DIR INSTALL_BASE/man/man1
\& INSTALLMAN3DIR INSTALL_BASE/man/man3
.Ve
.PP
\&\s-1INSTALL_BASE\s0 in MakeMaker and \f(CW\*(C`\-\-install_base\*(C'\fR in Module::Build (as
of 0.28) install to the same location. If you want MakeMaker and
Module::Build to install to the same location simply set \s-1INSTALL_BASE\s0
and \f(CW\*(C`\-\-install_base\*(C'\fR to the same location.
.PP
\&\s-1INSTALL_BASE\s0 was added in 6.31.
.SS "\s-1PREFIX\s0 and \s-1LIB\s0 attribute"
.IX Subsection "PREFIX and LIB attribute"
\&\s-1PREFIX\s0 and \s-1LIB\s0 can be used to set several INSTALL* attributes in one
go. Here's an example for installing into your home directory.
.PP
.Vb 2
\& # Unix users, PREFIX=~ works fine
\& perl Makefile.PL PREFIX=/path/to/your/home/dir
.Ve
.PP
This will install all files in the module under your home directory,
with man pages and libraries going into an appropriate place (usually
~/man and ~/lib). How the exact location is determined is complicated
and depends on how your Perl was configured. \s-1INSTALL_BASE\s0 works more
like what other build systems call \*(L"prefix\*(R" than \s-1PREFIX\s0 and we
recommend you use that instead.
.PP
Another way to specify many \s-1INSTALL\s0 directories with a single
parameter is \s-1LIB\s0.
.PP
.Vb 1
\& perl Makefile.PL LIB=~/lib
.Ve
.PP
This will install the module's architecture-independent files into
~/lib, the architecture-dependent files into ~/lib/$archname.
.PP
Note, that in both cases the tilde expansion is done by MakeMaker, not
by perl by default, nor by make.
.PP
Conflicts between parameters \s-1LIB\s0, \s-1PREFIX\s0 and the various INSTALL*
arguments are resolved so that:
.IP "\(bu" 4
setting \s-1LIB\s0 overrides any setting of \s-1INSTALLPRIVLIB\s0, \s-1INSTALLARCHLIB\s0,
\&\s-1INSTALLSITELIB\s0, \s-1INSTALLSITEARCH\s0 (and they are not affected by \s-1PREFIX\s0);
.IP "\(bu" 4
without \s-1LIB\s0, setting \s-1PREFIX\s0 replaces the initial \f(CW$Config{prefix}\fR
part of those INSTALL* arguments, even if the latter are explicitly
set (but are set to still start with \f(CW$Config{prefix}\fR).
.PP
If the user has superuser privileges, and is not working on \s-1AFS\s0 or
relatives, then the defaults for \s-1INSTALLPRIVLIB\s0, \s-1INSTALLARCHLIB\s0,
\&\s-1INSTALLSCRIPT\s0, etc. will be appropriate, and this incantation will be
the best:
.PP
.Vb 4
\& perl Makefile.PL;
\& make;
\& make test
\& make install
.Ve
.PP
make install by default writes some documentation of what has been
done into the file \f(CW\*(C`$(INSTALLARCHLIB)/perllocal.pod\*(C'\fR. This feature
can be bypassed by calling make pure_install.
.SS "\s-1AFS\s0 users"
.IX Subsection "AFS users"
will have to specify the installation directories as these most
probably have changed since perl itself has been installed. They will
have to do this by calling
.PP
.Vb 3
\& perl Makefile.PL INSTALLSITELIB=/afs/here/today \e
\& INSTALLSCRIPT=/afs/there/now INSTALLMAN3DIR=/afs/for/manpages
\& make
.Ve
.PP
Be careful to repeat this procedure every time you recompile an
extension, unless you are sure the \s-1AFS\s0 installation directories are
still valid.
.SS "Static Linking of a new Perl Binary"
.IX Subsection "Static Linking of a new Perl Binary"
An extension that is built with the above steps is ready to use on
systems supporting dynamic loading. On systems that do not support
dynamic loading, any newly created extension has to be linked together
with the available resources. MakeMaker supports the linking process
by creating appropriate targets in the Makefile whenever an extension
is built. You can invoke the corresponding section of the makefile with
.PP
.Vb 1
\& make perl
.Ve
.PP
That produces a new perl binary in the current directory with all
extensions linked in that can be found in \s-1INST_ARCHLIB\s0, \s-1SITELIBEXP\s0,
and \s-1PERL_ARCHLIB\s0. To do that, MakeMaker writes a new Makefile, on
\&\s-1UNIX\s0, this is called \fIMakefile.aperl\fR (may be system dependent). If you
want to force the creation of a new perl, it is recommended that you
delete this \fIMakefile.aperl\fR, so the directories are searched through
for linkable libraries again.
.PP
The binary can be installed into the directory where perl normally
resides on your machine with
.PP
.Vb 1
\& make inst_perl
.Ve
.PP
To produce a perl binary with a different name than \f(CW\*(C`perl\*(C'\fR, either say
.PP
.Vb 3
\& perl Makefile.PL MAP_TARGET=myperl
\& make myperl
\& make inst_perl
.Ve
.PP
or say
.PP
.Vb 3
\& perl Makefile.PL
\& make myperl MAP_TARGET=myperl
\& make inst_perl MAP_TARGET=myperl
.Ve
.PP
In any case you will be prompted with the correct invocation of the
\&\f(CW\*(C`inst_perl\*(C'\fR target that installs the new binary into \s-1INSTALLBIN\s0.
.PP
make inst_perl by default writes some documentation of what has been
done into the file \f(CW\*(C`$(INSTALLARCHLIB)/perllocal.pod\*(C'\fR. This
can be bypassed by calling make pure_inst_perl.
.PP
Warning: the inst_perl: target will most probably overwrite your
existing perl binary. Use with care!
.PP
Sometimes you might want to build a statically linked perl although
your system supports dynamic loading. In this case you may explicitly
set the linktype with the invocation of the Makefile.PL or make:
.PP
.Vb 1
\& perl Makefile.PL LINKTYPE=static # recommended
.Ve
.PP
or
.PP
.Vb 1
\& make LINKTYPE=static # works on most systems
.Ve
.SS "Determination of Perl Library and Installation Locations"
.IX Subsection "Determination of Perl Library and Installation Locations"
MakeMaker needs to know, or to guess, where certain things are
located. Especially \s-1INST_LIB\s0 and \s-1INST_ARCHLIB\s0 (where to put the files
during the \fImake\fR\|(1) run), \s-1PERL_LIB\s0 and \s-1PERL_ARCHLIB\s0 (where to read
existing modules from), and \s-1PERL_INC\s0 (header files and \f(CW\*(C`libperl*.*\*(C'\fR).
.PP
Extensions may be built either using the contents of the perl source
directory tree or from the installed perl library. The recommended way
is to build extensions after you have run 'make install' on perl
itself. You can do that in any directory on your hard disk that is not
below the perl source tree. The support for extensions below the ext
directory of the perl distribution is only good for the standard
extensions that come with perl.
.PP
If an extension is being built below the \f(CW\*(C`ext/\*(C'\fR directory of the perl
source then MakeMaker will set \s-1PERL_SRC\s0 automatically (e.g.,
\&\f(CW\*(C`../..\*(C'\fR). If \s-1PERL_SRC\s0 is defined and the extension is recognized as
a standard extension, then other variables default to the following:
.PP
.Vb 5
\& PERL_INC = PERL_SRC
\& PERL_LIB = PERL_SRC/lib
\& PERL_ARCHLIB = PERL_SRC/lib
\& INST_LIB = PERL_LIB
\& INST_ARCHLIB = PERL_ARCHLIB
.Ve
.PP
If an extension is being built away from the perl source then MakeMaker
will leave \s-1PERL_SRC\s0 undefined and default to using the installed copy
of the perl library. The other variables default to the following:
.PP
.Vb 5
\& PERL_INC = $archlibexp/CORE
\& PERL_LIB = $privlibexp
\& PERL_ARCHLIB = $archlibexp
\& INST_LIB = ./blib/lib
\& INST_ARCHLIB = ./blib/arch
.Ve
.PP
If perl has not yet been installed then \s-1PERL_SRC\s0 can be defined on the
command line as shown in the previous section.
.SS "Which architecture dependent directory?"
.IX Subsection "Which architecture dependent directory?"
If you don't want to keep the defaults for the INSTALL* macros,
MakeMaker helps you to minimize the typing needed: the usual
relationship between \s-1INSTALLPRIVLIB\s0 and \s-1INSTALLARCHLIB\s0 is determined
by Configure at perl compilation time. MakeMaker supports the user who
sets \s-1INSTALLPRIVLIB\s0. If \s-1INSTALLPRIVLIB\s0 is set, but \s-1INSTALLARCHLIB\s0 not,
then MakeMaker defaults the latter to be the same subdirectory of
\&\s-1INSTALLPRIVLIB\s0 as Configure decided for the counterparts in \f(CW%Config\fR,
otherwise it defaults to \s-1INSTALLPRIVLIB\s0. The same relationship holds
for \s-1INSTALLSITELIB\s0 and \s-1INSTALLSITEARCH\s0.
.PP
MakeMaker gives you much more freedom than needed to configure
internal variables and get different results. It is worth mentioning
that \fImake\fR\|(1) also lets you configure most of the variables that are
used in the Makefile. But in the majority of situations this will not
be necessary, and should only be done if the author of a package
recommends it (or you know what you're doing).
.SS "Using Attributes and Parameters"
.IX Subsection "Using Attributes and Parameters"
The following attributes may be specified as arguments to \fIWriteMakefile()\fR
or as NAME=VALUE pairs on the command line. Attributes that became
available with later versions of MakeMaker are indicated.
.PP
In order to maintain portability of attributes with older versions of
MakeMaker you may want to use App::EUMM::Upgrade with your \f(CW\*(C`Makefile.PL\*(C'\fR.
.IP "\s-1ABSTRACT\s0" 2
.IX Item "ABSTRACT"
One line description of the module. Will be included in \s-1PPD\s0 file.
.IP "\s-1ABSTRACT_FROM\s0" 2
.IX Item "ABSTRACT_FROM"
Name of the file that contains the package description. MakeMaker looks
for a line in the \s-1POD\s0 matching /^($package\es\-\es)(.*)/. This is typically
the first line in the \*(L"=head1 \s-1NAME\s0\*(R" section. \f(CW$2\fR becomes the abstract.
.IP "\s-1AUTHOR\s0" 2
.IX Item "AUTHOR"
Array of strings containing name (and email address) of package author(s).
Is used in \s-1CPAN\s0 Meta files (\s-1META\s0.yml or \s-1META\s0.json) and \s-1PPD\s0
(Perl Package Description) files for \s-1PPM\s0 (Perl Package Manager).
.IP "\s-1BINARY_LOCATION\s0" 2
.IX Item "BINARY_LOCATION"
Used when creating \s-1PPD\s0 files for binary packages. It can be set to a
full or relative path or \s-1URL\s0 to the binary archive for a particular
architecture. For example:
.Sp
.Vb 1
\& perl Makefile.PL BINARY_LOCATION=x86/Agent.tar.gz
.Ve
.Sp
builds a \s-1PPD\s0 package that references a binary of the \f(CW\*(C`Agent\*(C'\fR package,
located in the \f(CW\*(C`x86\*(C'\fR directory relative to the \s-1PPD\s0 itself.
.IP "\s-1BUILD_REQUIRES\s0" 2
.IX Item "BUILD_REQUIRES"
Available in version 6.55_03 and above.
.Sp
A hash of modules that are needed to build your module but not run it.
.Sp
This will go into the \f(CW\*(C`build_requires\*(C'\fR field of your \fI\s-1META\s0.yml\fR and the \f(CW\*(C`build\*(C'\fR of the \f(CW\*(C`prereqs\*(C'\fR field of your \fI\s-1META\s0.json\fR.
.Sp
Defaults to \f(CW\*(C`{ "ExtUtils::MakeMaker" => 0 }\*(C'\fR if this attribute is not specified.
.Sp
The format is the same as \s-1PREREQ_PM\s0.
.IP "C" 2
.IX Item "C"
Ref to array of *.c file names. Initialised from a directory scan
and the values portion of the \s-1XS\s0 attribute hash. This is not
currently used by MakeMaker but may be handy in Makefile.PLs.
.IP "\s-1CCFLAGS\s0" 2
.IX Item "CCFLAGS"
String that will be included in the compiler call command line between
the arguments \s-1INC\s0 and \s-1OPTIMIZE\s0.
.IP "\s-1CONFIG\s0" 2
.IX Item "CONFIG"
Arrayref. E.g. [qw(archname manext)] defines \s-1ARCHNAME\s0 & \s-1MANEXT\s0 from
config.sh. MakeMaker will add to \s-1CONFIG\s0 the following values anyway:
ar
cc
cccdlflags
ccdlflags
dlext
dlsrc
ld
lddlflags
ldflags
libc
lib_ext
obj_ext
ranlib
sitelibexp
sitearchexp
so
.IP "\s-1CONFIGURE\s0" 2
.IX Item "CONFIGURE"
\&\s-1CODE\s0 reference. The subroutine should return a hash reference. The
hash may contain further attributes, e.g. {\s-1LIBS\s0 => ...}, that have to
be determined by some evaluation method.
.IP "\s-1CONFIGURE_REQUIRES\s0" 2
.IX Item "CONFIGURE_REQUIRES"
Available in version 6.52 and above.
.Sp
A hash of modules that are required to run Makefile.PL itself, but not
to run your distribution.
.Sp
This will go into the \f(CW\*(C`configure_requires\*(C'\fR field of your \fI\s-1META\s0.yml\fR and the \f(CW\*(C`configure\*(C'\fR of the \f(CW\*(C`prereqs\*(C'\fR field of your \fI\s-1META\s0.json\fR.
.Sp
Defaults to \f(CW\*(C`{ "ExtUtils::MakeMaker" => 0 }\*(C'\fR if this attribute is not specified.
.Sp
The format is the same as \s-1PREREQ_PM\s0.
.IP "\s-1DEFINE\s0" 2
.IX Item "DEFINE"
Something like \f(CW"\-DHAVE_UNISTD_H"\fR
.IP "\s-1DESTDIR\s0" 2
.IX Item "DESTDIR"
This is the root directory into which the code will be installed. It
\&\fIprepends itself to the normal prefix\fR. For example, if your code
would normally go into \fI/usr/local/lib/perl\fR you could set DESTDIR=~/tmp/
and installation would go into \fI~/tmp/usr/local/lib/perl\fR.
.Sp
This is primarily of use for people who repackage Perl modules.
.Sp
\&\s-1NOTE:\s0 Due to the nature of make, it is important that you put the trailing
slash on your \s-1DESTDIR\s0. \fI~/tmp/\fR not \fI~/tmp\fR.
.IP "\s-1DIR\s0" 2
.IX Item "DIR"
Ref to array of subdirectories containing Makefile.PLs e.g. ['sdbm']
in ext/SDBM_File
.IP "\s-1DISTNAME\s0" 2
.IX Item "DISTNAME"
A safe filename for the package.
.Sp
Defaults to \s-1NAME\s0 below but with :: replaced with \-.
.Sp
For example, Foo::Bar becomes Foo-Bar.
.IP "\s-1DISTVNAME\s0" 2
.IX Item "DISTVNAME"
Your name for distributing the package with the version number
included. This is used by 'make dist' to name the resulting archive
file.
.Sp
Defaults to DISTNAME-VERSION.
.Sp
For example, version 1.04 of Foo::Bar becomes Foo\-Bar\-1.04.
.Sp
On some \s-1OS\s0's where . has special meaning \s-1VERSION_SYM\s0 may be used in
place of \s-1VERSION\s0.
.IP "\s-1DLEXT\s0" 2
.IX Item "DLEXT"
Specifies the extension of the module's loadable object. For example:
.Sp
.Vb 1
\& DLEXT => \*(Aqunusual_ext\*(Aq, # Default value is $Config{so}
.Ve
.Sp
\&\s-1NOTE:\s0 When using this option to alter the extension of a module's
loadable object, it is also necessary that the module's pm file
specifies the same change:
.Sp
.Vb 1
\& local $DynaLoader::dl_dlext = \*(Aqunusual_ext\*(Aq;
.Ve
.IP "\s-1DL_FUNCS\s0" 2
.IX Item "DL_FUNCS"
Hashref of symbol names for routines to be made available as universal
symbols. Each key/value pair consists of the package name and an
array of routine names in that package. Used only under \s-1AIX\s0, \s-1OS/2\s0,
\&\s-1VMS\s0 and Win32 at present. The routine names supplied will be expanded
in the same way as \s-1XSUB\s0 names are expanded by the \s-1\fIXS\s0()\fR macro.
Defaults to
.Sp
.Vb 1
\& {"$(NAME)" => ["boot_$(NAME)" ] }
.Ve
.Sp
e.g.
.Sp
.Vb 2
\& {"RPC" => [qw( boot_rpcb rpcb_gettime getnetconfigent )],
\& "NetconfigPtr" => [ \*(AqDESTROY\*(Aq] }
.Ve
.Sp
Please see the ExtUtils::Mksymlists documentation for more information
about the \s-1DL_FUNCS\s0, \s-1DL_VARS\s0 and \s-1FUNCLIST\s0 attributes.
.IP "\s-1DL_VARS\s0" 2
.IX Item "DL_VARS"
Array of symbol names for variables to be made available as universal symbols.
Used only under \s-1AIX\s0, \s-1OS/2\s0, \s-1VMS\s0 and Win32 at present. Defaults to [].
(e.g. [ qw(Foo_version Foo_numstreams Foo_tree ) ])
.IP "\s-1EXCLUDE_EXT\s0" 2
.IX Item "EXCLUDE_EXT"
Array of extension names to exclude when doing a static build. This
is ignored if \s-1INCLUDE_EXT\s0 is present. Consult \s-1INCLUDE_EXT\s0 for more
details. (e.g. [ qw( Socket \s-1POSIX\s0 ) ] )
.Sp
This attribute may be most useful when specified as a string on the
command line: perl Makefile.PL EXCLUDE_EXT='Socket Safe'
.IP "\s-1EXE_FILES\s0" 2
.IX Item "EXE_FILES"
Ref to array of executable files. The files will be copied to the
\&\s-1INST_SCRIPT\s0 directory. Make realclean will delete them from there
again.
.Sp
If your executables start with something like #!perl or
#!/usr/bin/perl MakeMaker will change this to the path of the perl
\&'Makefile.PL' was invoked with so the programs will be sure to run
properly even if perl is not in /usr/bin/perl.
.IP "\s-1FIRST_MAKEFILE\s0" 2
.IX Item "FIRST_MAKEFILE"
The name of the Makefile to be produced. This is used for the second
Makefile that will be produced for the \s-1MAP_TARGET\s0.
.Sp
Defaults to 'Makefile' or 'Descrip.MMS' on \s-1VMS\s0.
.Sp
(Note: we couldn't use \s-1MAKEFILE\s0 because dmake uses this for something
else).
.IP "\s-1FULLPERL\s0" 2
.IX Item "FULLPERL"
Perl binary able to run this extension, load \s-1XS\s0 modules, etc...
.IP "\s-1FULLPERLRUN\s0" 2
.IX Item "FULLPERLRUN"
Like \s-1PERLRUN\s0, except it uses \s-1FULLPERL\s0.
.IP "\s-1FULLPERLRUNINST\s0" 2
.IX Item "FULLPERLRUNINST"
Like \s-1PERLRUNINST\s0, except it uses \s-1FULLPERL\s0.
.IP "\s-1FUNCLIST\s0" 2
.IX Item "FUNCLIST"
This provides an alternate means to specify function names to be
exported from the extension. Its value is a reference to an
array of function names to be exported by the extension. These
names are passed through unaltered to the linker options file.
.IP "H" 2
.IX Item "H"
Ref to array of *.h file names. Similar to C.
.IP "\s-1IMPORTS\s0" 2
.IX Item "IMPORTS"
This attribute is used to specify names to be imported into the
extension. Takes a hash ref.
.Sp
It is only used on \s-1OS/2\s0 and Win32.
.IP "\s-1INC\s0" 2
.IX Item "INC"
Include file dirs eg: \f(CW"\-I/usr/5include \-I/path/to/inc"\fR
.IP "\s-1INCLUDE_EXT\s0" 2
.IX Item "INCLUDE_EXT"
Array of extension names to be included when doing a static build.
MakeMaker will normally build with all of the installed extensions when
doing a static build, and that is usually the desired behavior. If
\&\s-1INCLUDE_EXT\s0 is present then MakeMaker will build only with those extensions
which are explicitly mentioned. (e.g. [ qw( Socket \s-1POSIX\s0 ) ])
.Sp
It is not necessary to mention DynaLoader or the current extension when
filling in \s-1INCLUDE_EXT\s0. If the \s-1INCLUDE_EXT\s0 is mentioned but is empty then
only DynaLoader and the current extension will be included in the build.
.Sp
This attribute may be most useful when specified as a string on the
command line: perl Makefile.PL INCLUDE_EXT='\s-1POSIX\s0 Socket Devel::Peek'
.IP "\s-1INSTALLARCHLIB\s0" 2
.IX Item "INSTALLARCHLIB"
Used by 'make install', which copies files from \s-1INST_ARCHLIB\s0 to this
directory if \s-1INSTALLDIRS\s0 is set to perl.
.IP "\s-1INSTALLBIN\s0" 2
.IX Item "INSTALLBIN"
Directory to install binary files (e.g. tkperl) into if
INSTALLDIRS=perl.
.IP "\s-1INSTALLDIRS\s0" 2
.IX Item "INSTALLDIRS"
Determines which of the sets of installation directories to choose:
perl, site or vendor. Defaults to site.
.IP "\s-1INSTALLMAN1DIR\s0" 2
.IX Item "INSTALLMAN1DIR"
.PD 0
.IP "\s-1INSTALLMAN3DIR\s0" 2
.IX Item "INSTALLMAN3DIR"
.PD
These directories get the man pages at 'make install' time if
INSTALLDIRS=perl. Defaults to \f(CW$Config\fR{installman*dir}.
.Sp
If set to 'none', no man pages will be installed.
.IP "\s-1INSTALLPRIVLIB\s0" 2
.IX Item "INSTALLPRIVLIB"
Used by 'make install', which copies files from \s-1INST_LIB\s0 to this
directory if \s-1INSTALLDIRS\s0 is set to perl.
.Sp
Defaults to \f(CW$Config\fR{installprivlib}.
.IP "\s-1INSTALLSCRIPT\s0" 2
.IX Item "INSTALLSCRIPT"
Available in version 6.30_02 and above.
.Sp
Used by 'make install' which copies files from \s-1INST_SCRIPT\s0 to this
directory if INSTALLDIRS=perl.
.IP "\s-1INSTALLSITEARCH\s0" 2
.IX Item "INSTALLSITEARCH"
Used by 'make install', which copies files from \s-1INST_ARCHLIB\s0 to this
directory if \s-1INSTALLDIRS\s0 is set to site (default).
.IP "\s-1INSTALLSITEBIN\s0" 2
.IX Item "INSTALLSITEBIN"
Used by 'make install', which copies files from \s-1INST_BIN\s0 to this
directory if \s-1INSTALLDIRS\s0 is set to site (default).
.IP "\s-1INSTALLSITELIB\s0" 2
.IX Item "INSTALLSITELIB"
Used by 'make install', which copies files from \s-1INST_LIB\s0 to this
directory if \s-1INSTALLDIRS\s0 is set to site (default).
.IP "\s-1INSTALLSITEMAN1DIR\s0" 2
.IX Item "INSTALLSITEMAN1DIR"
.PD 0
.IP "\s-1INSTALLSITEMAN3DIR\s0" 2
.IX Item "INSTALLSITEMAN3DIR"
.PD
These directories get the man pages at 'make install' time if
INSTALLDIRS=site (default). Defaults to
$(\s-1SITEPREFIX\s0)/man/man$(MAN*EXT).
.Sp
If set to 'none', no man pages will be installed.
.IP "\s-1INSTALLSITESCRIPT\s0" 2
.IX Item "INSTALLSITESCRIPT"
Used by 'make install' which copies files from \s-1INST_SCRIPT\s0 to this
directory if \s-1INSTALLDIRS\s0 is set to site (default).
.IP "\s-1INSTALLVENDORARCH\s0" 2
.IX Item "INSTALLVENDORARCH"
Used by 'make install', which copies files from \s-1INST_ARCHLIB\s0 to this
directory if \s-1INSTALLDIRS\s0 is set to vendor. Note that if you do not set
this, the value of \s-1INSTALLVENDORLIB\s0 will be used, which is probably not
what you want.
.IP "\s-1INSTALLVENDORBIN\s0" 2
.IX Item "INSTALLVENDORBIN"
Used by 'make install', which copies files from \s-1INST_BIN\s0 to this
directory if \s-1INSTALLDIRS\s0 is set to vendor.
.IP "\s-1INSTALLVENDORLIB\s0" 2
.IX Item "INSTALLVENDORLIB"
Used by 'make install', which copies files from \s-1INST_LIB\s0 to this
directory if \s-1INSTALLDIRS\s0 is set to vendor.
.IP "\s-1INSTALLVENDORMAN1DIR\s0" 2
.IX Item "INSTALLVENDORMAN1DIR"
.PD 0
.IP "\s-1INSTALLVENDORMAN3DIR\s0" 2
.IX Item "INSTALLVENDORMAN3DIR"
.PD
These directories get the man pages at 'make install' time if
INSTALLDIRS=vendor. Defaults to $(\s-1VENDORPREFIX\s0)/man/man$(MAN*EXT).
.Sp
If set to 'none', no man pages will be installed.
.IP "\s-1INSTALLVENDORSCRIPT\s0" 2
.IX Item "INSTALLVENDORSCRIPT"
Available in version 6.30_02 and above.
.Sp
Used by 'make install' which copies files from \s-1INST_SCRIPT\s0 to this
directory if \s-1INSTALLDIRS\s0 is set to vendor.
.IP "\s-1INST_ARCHLIB\s0" 2
.IX Item "INST_ARCHLIB"
Same as \s-1INST_LIB\s0 for architecture dependent files.
.IP "\s-1INST_BIN\s0" 2
.IX Item "INST_BIN"
Directory to put real binary files during 'make'. These will be copied
to \s-1INSTALLBIN\s0 during 'make install'
.IP "\s-1INST_LIB\s0" 2
.IX Item "INST_LIB"
Directory where we put library files of this extension while building
it.
.IP "\s-1INST_MAN1DIR\s0" 2
.IX Item "INST_MAN1DIR"
Directory to hold the man pages at 'make' time
.IP "\s-1INST_MAN3DIR\s0" 2
.IX Item "INST_MAN3DIR"
Directory to hold the man pages at 'make' time
.IP "\s-1INST_SCRIPT\s0" 2
.IX Item "INST_SCRIPT"
Directory where executable files should be installed during
\&'make'. Defaults to \*(L"./blib/script\*(R", just to have a dummy location during
testing. make install will copy the files in \s-1INST_SCRIPT\s0 to
\&\s-1INSTALLSCRIPT\s0.
.IP "\s-1LD\s0" 2
.IX Item "LD"
Program to be used to link libraries for dynamic loading.
.Sp
Defaults to \f(CW$Config\fR{ld}.
.IP "\s-1LDDLFLAGS\s0" 2
.IX Item "LDDLFLAGS"
Any special flags that might need to be passed to ld to create a
shared library suitable for dynamic loading. It is up to the makefile
to use it. (See \*(L"lddlflags\*(R" in Config)
.Sp
Defaults to \f(CW$Config\fR{lddlflags}.
.IP "\s-1LDFROM\s0" 2
.IX Item "LDFROM"
Defaults to \*(L"$(\s-1OBJECT\s0)\*(R" and is used in the ld command to specify
what files to link/load from (also see dynamic_lib below for how to
specify ld flags)
.IP "\s-1LIB\s0" 2
.IX Item "LIB"
\&\s-1LIB\s0 should only be set at \f(CW\*(C`perl Makefile.PL\*(C'\fR time but is allowed as a
MakeMaker argument. It has the effect of setting both \s-1INSTALLPRIVLIB\s0
and \s-1INSTALLSITELIB\s0 to that value regardless any explicit setting of
those arguments (or of \s-1PREFIX\s0). \s-1INSTALLARCHLIB\s0 and \s-1INSTALLSITEARCH\s0
are set to the corresponding architecture subdirectory.
.IP "\s-1LIBPERL_A\s0" 2
.IX Item "LIBPERL_A"
The filename of the perllibrary that will be used together with this
extension. Defaults to libperl.a.
.IP "\s-1LIBS\s0" 2
.IX Item "LIBS"
An anonymous array of alternative library
specifications to be searched for (in order) until
at least one library is found. E.g.
.Sp
.Vb 1
\& \*(AqLIBS\*(Aq => ["\-lgdbm", "\-ldbm \-lfoo", "\-L/path \-ldbm.nfs"]
.Ve
.Sp
Mind, that any element of the array
contains a complete set of arguments for the ld
command. So do not specify
.Sp
.Vb 1
\& \*(AqLIBS\*(Aq => ["\-ltcl", "\-ltk", "\-lX11"]
.Ve
.Sp
See ODBM_File/Makefile.PL for an example, where an array is needed. If
you specify a scalar as in
.Sp
.Vb 1
\& \*(AqLIBS\*(Aq => "\-ltcl \-ltk \-lX11"
.Ve
.Sp
MakeMaker will turn it into an array with one element.
.IP "\s-1LICENSE\s0" 2
.IX Item "LICENSE"
Available in version 6.31 and above.
.Sp
The licensing terms of your distribution. Generally it's \*(L"perl_5\*(R" for the
same license as Perl itself.
.Sp
See CPAN::Meta::Spec for the list of options.
.Sp
Defaults to \*(L"unknown\*(R".
.IP "\s-1LINKTYPE\s0" 2
.IX Item "LINKTYPE"
\&'static' or 'dynamic' (default unless usedl=undef in
config.sh). Should only be used to force static linking (also see
linkext below).
.IP "\s-1MAGICXS\s0" 2
.IX Item "MAGICXS"
Available in version 6.8305 and above.
.Sp
When this is set to \f(CW1\fR, \f(CW\*(C`OBJECT\*(C'\fR will be automagically derived from
\&\f(CW\*(C`O_FILES\*(C'\fR.
.IP "\s-1MAKE\s0" 2
.IX Item "MAKE"
Available in version 6.30_01 and above.
.Sp
Variant of make you intend to run the generated Makefile with. This
parameter lets Makefile.PL know what make quirks to account for when
generating the Makefile.
.Sp
MakeMaker also honors the \s-1MAKE\s0 environment variable. This parameter
takes precedence.
.Sp
Currently the only significant values are 'dmake' and 'nmake' for Windows
users, instructing MakeMaker to generate a Makefile in the flavour of
DMake (\*(L"Dennis Vadura's Make\*(R") or Microsoft NMake respectively.
.Sp
Defaults to \f(CW$Config\fR{make}, which may go looking for a Make program
in your environment.
.Sp
How are you supposed to know what flavour of Make a Makefile has
been generated for if you didn't specify a value explicitly? Search
the generated Makefile for the definition of the \s-1MAKE\s0 variable,
which is used to recursively invoke the Make utility. That will tell
you what Make you're supposed to invoke the Makefile with.
.IP "\s-1MAKEAPERL\s0" 2
.IX Item "MAKEAPERL"
Boolean which tells MakeMaker that it should include the rules to
make a perl. This is handled automatically as a switch by
MakeMaker. The user normally does not need it.
.IP "\s-1MAKEFILE_OLD\s0" 2
.IX Item "MAKEFILE_OLD"
When 'make clean' or similar is run, the $(\s-1FIRST_MAKEFILE\s0) will be
backed up at this location.
.Sp
Defaults to $(\s-1FIRST_MAKEFILE\s0).old or $(\s-1FIRST_MAKEFILE\s0)_old on \s-1VMS\s0.
.IP "\s-1MAN1PODS\s0" 2
.IX Item "MAN1PODS"
Hashref of pod-containing files. MakeMaker will default this to all
\&\s-1EXE_FILES\s0 files that include \s-1POD\s0 directives. The files listed
here will be converted to man pages and installed as was requested
at Configure time.
.Sp
This hash should map \s-1POD\s0 files (or scripts containing \s-1POD\s0) to the
man file names under the \f(CW\*(C`blib/man1/\*(C'\fR directory, as in the following
example:
.Sp
.Vb 4
\& MAN1PODS => {
\& \*(Aqdoc/command.pod\*(Aq => \*(Aqblib/man1/command.1\*(Aq,
\& \*(Aqscripts/script.pl\*(Aq => \*(Aqblib/man1/script.1\*(Aq,
\& }
.Ve
.IP "\s-1MAN3PODS\s0" 2
.IX Item "MAN3PODS"
Hashref that assigns to *.pm and *.pod files the files into which the
manpages are to be written. MakeMaker parses all *.pod and *.pm files
for \s-1POD\s0 directives. Files that contain \s-1POD\s0 will be the default keys of
the \s-1MAN3PODS\s0 hashref. These will then be converted to man pages during
\&\f(CW\*(C`make\*(C'\fR and will be installed during \f(CW\*(C`make install\*(C'\fR.
.Sp
Example similar to \s-1MAN1PODS\s0.
.IP "\s-1MAP_TARGET\s0" 2
.IX Item "MAP_TARGET"
If it is intended that a new perl binary be produced, this variable
may hold a name for that binary. Defaults to perl
.IP "\s-1META_ADD\s0" 2
.IX Item "META_ADD"
.PD 0
.IP "\s-1META_MERGE\s0" 2
.IX Item "META_MERGE"
.PD
Available in version 6.46 and above.
.Sp
A hashref of items to add to the \s-1CPAN\s0 Meta file (\fI\s-1META\s0.yml\fR or
\&\fI\s-1META\s0.json\fR).
.Sp
They differ in how they behave if they have the same key as the
default metadata. \s-1META_ADD\s0 will override the default value with its
own. \s-1META_MERGE\s0 will merge its value with the default.
.Sp
Unless you want to override the defaults, prefer \s-1META_MERGE\s0 so as to
get the advantage of any future defaults.
.Sp
Where prereqs are concerned, if \s-1META_MERGE\s0 is used, prerequisites are merged
with their counterpart \f(CW\*(C`WriteMakefile()\*(C'\fR argument
(\s-1PREREQ_PM\s0 is merged into {prereqs}{runtime}{requires},
\&\s-1BUILD_REQUIRES\s0 into \f(CW\*(C`{prereqs}{build}{requires}\*(C'\fR,
\&\s-1CONFIGURE_REQUIRES\s0 into \f(CW\*(C`{prereqs}{configure}{requires}\*(C'\fR,
and \s-1TEST_REQUIRES\s0 into \f(CW\*(C`{prereqs}{test}{requires})\*(C'\fR.
When prereqs are specified with \s-1META_ADD\s0, the only prerequisites added to the
file come from the metadata, not \f(CW\*(C`WriteMakefile()\*(C'\fR arguments.
.Sp
Note that these configuration options are only used for generating \fI\s-1META\s0.yml\fR
and \fI\s-1META\s0.json\fR \*(-- they are \s-1NOT\s0 used for \fI\s-1MYMETA\s0.yml\fR and \fI\s-1MYMETA\s0.json\fR.
Therefore data in these fields should \s-1NOT\s0 be used for dynamic (user-side)
configuration.
.Sp
By default \s-1CPAN\s0 Meta specification \f(CW1.4\fR is used. In order to use
\&\s-1CPAN\s0 Meta specification \f(CW2.0\fR, indicate with \f(CW\*(C`meta\-spec\*(C'\fR the version
you want to use.
.Sp
.Vb 1
\& META_MERGE => {
\&
\& "meta\-spec" => { version => 2 },
\&
\& resources => {
\&
\& repository => {
\& type => \*(Aqgit\*(Aq,
\& url => \*(Aqgit://github.com/Perl\-Toolchain\-Gang/ExtUtils\-MakeMaker.git\*(Aq,
\& web => \*(Aqhttps://github.com/Perl\-Toolchain\-Gang/ExtUtils\-MakeMaker\*(Aq,
\& },
\&
\& },
\&
\& },
.Ve
.IP "\s-1MIN_PERL_VERSION\s0" 2
.IX Item "MIN_PERL_VERSION"
Available in version 6.48 and above.
.Sp
The minimum required version of Perl for this distribution.
.Sp
Either the 5.006001 or the 5.6.1 format is acceptable.
.IP "\s-1MYEXTLIB\s0" 2
.IX Item "MYEXTLIB"
If the extension links to a library that it builds, set this to the
name of the library (see SDBM_File)
.IP "\s-1NAME\s0" 2
.IX Item "NAME"
The package representing the distribution. For example, \f(CW\*(C`Test::More\*(C'\fR
or \f(CW\*(C`ExtUtils::MakeMaker\*(C'\fR. It will be used to derive information about
the distribution such as the \*(L"\s-1DISTNAME\s0\*(R", installation locations
within the Perl library and where \s-1XS\s0 files will be looked for by
default (see \*(L"\s-1XS\s0\*(R").
.Sp
\&\f(CW\*(C`NAME\*(C'\fR \fImust\fR be a valid Perl package name and it \fImust\fR have an
associated \f(CW\*(C`.pm\*(C'\fR file. For example, \f(CW\*(C`Foo::Bar\*(C'\fR is a valid \f(CW\*(C`NAME\*(C'\fR
and there must exist \fIFoo/Bar.pm\fR. Any \s-1XS\s0 code should be in
\&\fIBar.xs\fR unless stated otherwise.
.Sp
Your distribution \fBmust\fR have a \f(CW\*(C`NAME\*(C'\fR.
.IP "\s-1NEEDS_LINKING\s0" 2
.IX Item "NEEDS_LINKING"
MakeMaker will figure out if an extension contains linkable code
anywhere down the directory tree, and will set this variable
accordingly, but you can speed it up a very little bit if you define
this boolean variable yourself.
.IP "\s-1NOECHO\s0" 2
.IX Item "NOECHO"
Command so make does not print the literal commands it's running.
.Sp
By setting it to an empty string you can generate a Makefile that
prints all commands. Mainly used in debugging MakeMaker itself.
.Sp
Defaults to \f(CW\*(C`@\*(C'\fR.
.IP "\s-1NORECURS\s0" 2
.IX Item "NORECURS"
Boolean. Attribute to inhibit descending into subdirectories.
.IP "\s-1NO_META\s0" 2
.IX Item "NO_META"
When true, suppresses the generation and addition to the \s-1MANIFEST\s0 of
the \s-1META\s0.yml and \s-1META\s0.json module meta-data files during 'make distdir'.
.Sp
Defaults to false.
.IP "\s-1NO_MYMETA\s0" 2
.IX Item "NO_MYMETA"
Available in version 6.57_02 and above.
.Sp
When true, suppresses the generation of \s-1MYMETA\s0.yml and \s-1MYMETA\s0.json module
meta-data files during 'perl Makefile.PL'.
.Sp
Defaults to false.
.IP "\s-1NO_PACKLIST\s0" 2
.IX Item "NO_PACKLIST"
Available in version 6.7501 and above.
.Sp
When true, suppresses the writing of \f(CW\*(C`packlist\*(C'\fR files for installs.
.Sp
Defaults to false.
.IP "\s-1NO_PERLLOCAL\s0" 2
.IX Item "NO_PERLLOCAL"
Available in version 6.7501 and above.
.Sp
When true, suppresses the appending of installations to \f(CW\*(C`perllocal\*(C'\fR.
.Sp
Defaults to false.
.IP "\s-1NO_VC\s0" 2
.IX Item "NO_VC"
In general, any generated Makefile checks for the current version of
MakeMaker and the version the Makefile was built under. If \s-1NO_VC\s0 is
set, the version check is neglected. Do not write this into your
Makefile.PL, use it interactively instead.
.IP "\s-1OBJECT\s0" 2
.IX Item "OBJECT"
List of object files, defaults to '$(\s-1BASEEXT\s0)$(\s-1OBJ_EXT\s0)', but can be a long
string or an array containing all object files, e.g. \*(L"tkpBind.o
tkpButton.o tkpCanvas.o\*(R" or [\*(L"tkpBind.o\*(R", \*(L"tkpButton.o\*(R", \*(L"tkpCanvas.o\*(R"]
.Sp
(Where \s-1BASEEXT\s0 is the last component of \s-1NAME\s0, and \s-1OBJ_EXT\s0 is \f(CW$Config\fR{obj_ext}.)
.IP "\s-1OPTIMIZE\s0" 2
.IX Item "OPTIMIZE"
Defaults to \f(CW\*(C`\-O\*(C'\fR. Set it to \f(CW\*(C`\-g\*(C'\fR to turn debugging on. The flag is
passed to subdirectory makes.
.IP "\s-1PERL\s0" 2
.IX Item "PERL"
Perl binary for tasks that can be done by miniperl. If it contains
spaces or other shell metacharacters, it needs to be quoted in a way
that protects them, since this value is intended to be inserted in a
shell command line in the Makefile. E.g.:
.Sp
.Vb 3
\& # Perl executable lives in "C:/Program Files/Perl/bin"
\& # Normally you don\*(Aqt need to set this yourself!
\& $ perl Makefile.PL PERL=\*(Aq"C:/Program Files/Perl/bin/perl.exe" \-w\*(Aq
.Ve
.IP "\s-1PERL_CORE\s0" 2
.IX Item "PERL_CORE"
Set only when MakeMaker is building the extensions of the Perl core
distribution.
.IP "\s-1PERLMAINCC\s0" 2
.IX Item "PERLMAINCC"
The call to the program that is able to compile perlmain.c. Defaults
to $(\s-1CC\s0).
.IP "\s-1PERL_ARCHLIB\s0" 2
.IX Item "PERL_ARCHLIB"
Same as for \s-1PERL_LIB\s0, but for architecture dependent files.
.Sp
Used only when MakeMaker is building the extensions of the Perl core
distribution (because normally $(\s-1PERL_ARCHLIB\s0) is automatically in \f(CW@INC\fR,
and adding it would get in the way of \s-1PERL5LIB\s0).
.IP "\s-1PERL_LIB\s0" 2
.IX Item "PERL_LIB"
Directory containing the Perl library to use.
.Sp
Used only when MakeMaker is building the extensions of the Perl core
distribution (because normally $(\s-1PERL_LIB\s0) is automatically in \f(CW@INC\fR,
and adding it would get in the way of \s-1PERL5LIB\s0).
.IP "\s-1PERL_MALLOC_OK\s0" 2
.IX Item "PERL_MALLOC_OK"
defaults to 0. Should be set to \s-1TRUE\s0 if the extension can work with
the memory allocation routines substituted by the Perl \fImalloc()\fR subsystem.
This should be applicable to most extensions with exceptions of those
.RS 2
.IP "\(bu" 4
with bugs in memory allocations which are caught by Perl's \fImalloc()\fR;
.IP "\(bu" 4
which interact with the memory allocator in other ways than via
\&\fImalloc()\fR, \fIrealloc()\fR, \fIfree()\fR, \fIcalloc()\fR, \fIsbrk()\fR and \fIbrk()\fR;
.IP "\(bu" 4
which rely on special alignment which is not provided by Perl's \fImalloc()\fR.
.RE
.RS 2
.Sp
\&\fB\s-1NOTE\s0.\fR Neglecting to set this flag in \fIany one\fR of the loaded extension
nullifies many advantages of Perl's \fImalloc()\fR, such as better usage of
system resources, error detection, memory usage reporting, catchable failure
of memory allocations, etc.
.RE
.IP "\s-1PERLPREFIX\s0" 2
.IX Item "PERLPREFIX"
Directory under which core modules are to be installed.
.Sp
Defaults to \f(CW$Config\fR{installprefixexp}, falling back to
\&\f(CW$Config\fR{installprefix}, \f(CW$Config\fR{prefixexp} or \f(CW$Config\fR{prefix} should
\&\f(CW$Config\fR{installprefixexp} not exist.
.Sp
Overridden by \s-1PREFIX\s0.
.IP "\s-1PERLRUN\s0" 2
.IX Item "PERLRUN"
Use this instead of $(\s-1PERL\s0) when you wish to run perl. It will set up
extra necessary flags for you.
.IP "\s-1PERLRUNINST\s0" 2
.IX Item "PERLRUNINST"
Use this instead of $(\s-1PERL\s0) when you wish to run perl to work with
modules. It will add things like \-I$(\s-1INST_ARCH\s0) and other necessary
flags so perl can see the modules you're about to install.
.IP "\s-1PERL_SRC\s0" 2
.IX Item "PERL_SRC"
Directory containing the Perl source code (use of this should be
avoided, it may be undefined)
.IP "\s-1PERM_DIR\s0" 2
.IX Item "PERM_DIR"
Available in version 6.51_01 and above.
.Sp
Desired permission for directories. Defaults to \f(CW755\fR.
.IP "\s-1PERM_RW\s0" 2
.IX Item "PERM_RW"
Desired permission for read/writable files. Defaults to \f(CW644\fR.
.IP "\s-1PERM_RWX\s0" 2
.IX Item "PERM_RWX"
Desired permission for executable files. Defaults to \f(CW755\fR.
.IP "\s-1PL_FILES\s0" 2
.IX Item "PL_FILES"
MakeMaker can run programs to generate files for you at build time.
By default any file named *.PL (except Makefile.PL and Build.PL) in
the top level directory will be assumed to be a Perl program and run
passing its own basename in as an argument. This basename is actually a build
target, and there is an intention, but not a requirement, that the *.PL file
make the file passed to to as an argument. For example...
.Sp
.Vb 1
\& perl foo.PL foo
.Ve
.Sp
This behavior can be overridden by supplying your own set of files to
search. \s-1PL_FILES\s0 accepts a hash ref, the key being the file to run
and the value is passed in as the first argument when the \s-1PL\s0 file is run.
.Sp
.Vb 1
\& PL_FILES => {\*(Aqbin/foobar.PL\*(Aq => \*(Aqbin/foobar\*(Aq}
\&
\& PL_FILES => {\*(Aqfoo.PL\*(Aq => \*(Aqfoo.c\*(Aq}
.Ve
.Sp
Would run bin/foobar.PL like this:
.Sp
.Vb 1
\& perl bin/foobar.PL bin/foobar
.Ve
.Sp
If multiple files from one program are desired an array ref can be used.
.Sp
.Vb 1
\& PL_FILES => {\*(Aqbin/foobar.PL\*(Aq => [qw(bin/foobar1 bin/foobar2)]}
.Ve
.Sp
In this case the program will be run multiple times using each target file.
.Sp
.Vb 2
\& perl bin/foobar.PL bin/foobar1
\& perl bin/foobar.PL bin/foobar2
.Ve
.Sp
If an output file depends on extra input files beside the script itself,
a hash ref can be used in version 7.36 and above:
.Sp
.Vb 4
\& PL_FILES => { \*(Aqfoo.PL\*(Aq => {
\& \*(Aqfoo.out\*(Aq => \*(Aqfoo.in\*(Aq,
\& \*(Aqbar.out\*(Aq => [qw(bar1.in bar2.in)],
\& }
.Ve
.Sp
In this case the extra input files will be passed to the program after
the target file:
.Sp
.Vb 2
\& perl foo.PL foo.out foo.in
\& perl foo.PL bar.out bar1.in bar2.in
.Ve
.Sp
\&\s-1PL\s0 files are normally run \fBafter\fR pm_to_blib and include \s-1INST_LIB\s0 and
\&\s-1INST_ARCH\s0 in their \f(CW@INC\fR, so the just built modules can be
accessed... unless the \s-1PL\s0 file is making a module (or anything else in
\&\s-1PM\s0) in which case it is run \fBbefore\fR pm_to_blib and does not include
\&\s-1INST_LIB\s0 and \s-1INST_ARCH\s0 in its \f(CW@INC\fR. This apparently odd behavior
is there for backwards compatibility (and it's somewhat \s-1DWIM\s0). The argument
passed to the .PL is set up as a target to build in the Makefile. In other
sections such as \f(CW\*(C`postamble\*(C'\fR you can specify a dependency on the
filename/argument that the .PL is supposed (or will have, now that that is
is a dependency) to generate. Note the file to be generated will still be
generated and the .PL will still run even without an explicit dependency created
by you, since the \f(CW\*(C`all\*(C'\fR target still depends on running all eligible to run.PL
files.
.IP "\s-1PM\s0" 2
.IX Item "PM"
Hashref of .pm files and *.pl files to be installed. e.g.
.Sp
.Vb 1
\& {\*(Aqname_of_file.pm\*(Aq => \*(Aq$(INST_LIB)/install_as.pm\*(Aq}
.Ve
.Sp
By default this will include *.pm and *.pl and the files found in
the \s-1PMLIBDIRS\s0 directories. Defining \s-1PM\s0 in the
Makefile.PL will override \s-1PMLIBDIRS\s0.
.IP "\s-1PMLIBDIRS\s0" 2
.IX Item "PMLIBDIRS"
Ref to array of subdirectories containing library files. Defaults to
[ 'lib', $(\s-1BASEEXT\s0) ]. The directories will be scanned and \fIany\fR files
they contain will be installed in the corresponding location in the
library. A \fIlibscan()\fR method can be used to alter the behaviour.
Defining \s-1PM\s0 in the Makefile.PL will override \s-1PMLIBDIRS\s0.
.Sp
(Where \s-1BASEEXT\s0 is the last component of \s-1NAME\s0.)
.IP "\s-1PM_FILTER\s0" 2
.IX Item "PM_FILTER"
A filter program, in the traditional Unix sense (input from stdin, output
to stdout) that is passed on each .pm file during the build (in the
\&\fIpm_to_blib()\fR phase). It is empty by default, meaning no filtering is done.
You could use:
.Sp
.Vb 1
\& PM_FILTER => \*(Aqperl \-ne "print unless /^\e\e#/"\*(Aq,
.Ve
.Sp
to remove all the leading comments on the fly during the build. In order
to be as portable as possible, please consider using a Perl one-liner
rather than Unix (or other) utilities, as above. The # is escaped for
the Makefile, since what is going to be generated will then be:
.Sp
.Vb 1
\& PM_FILTER = perl \-ne "print unless /^\e#/"
.Ve
.Sp
Without the \e before the #, we'd have the start of a Makefile comment,
and the macro would be incorrectly defined.
.Sp
You will almost certainly be better off using the \f(CW\*(C`PL_FILES\*(C'\fR system,
instead. See above, or the ExtUtils::MakeMaker::FAQ entry.
.IP "\s-1POLLUTE\s0" 2
.IX Item "POLLUTE"
Release 5.005 grandfathered old global symbol names by providing preprocessor
macros for extension source compatibility. As of release 5.6, these
preprocessor definitions are not available by default. The \s-1POLLUTE\s0 flag
specifies that the old names should still be defined:
.Sp
.Vb 1
\& perl Makefile.PL POLLUTE=1
.Ve
.Sp
Please inform the module author if this is necessary to successfully install
a module under 5.6 or later.
.IP "\s-1PPM_INSTALL_EXEC\s0" 2
.IX Item "PPM_INSTALL_EXEC"
Name of the executable used to run \f(CW\*(C`PPM_INSTALL_SCRIPT\*(C'\fR below. (e.g. perl)
.IP "\s-1PPM_INSTALL_SCRIPT\s0" 2
.IX Item "PPM_INSTALL_SCRIPT"
Name of the script that gets executed by the Perl Package Manager after
the installation of a package.
.IP "\s-1PPM_UNINSTALL_EXEC\s0" 2
.IX Item "PPM_UNINSTALL_EXEC"
Available in version 6.8502 and above.
.Sp
Name of the executable used to run \f(CW\*(C`PPM_UNINSTALL_SCRIPT\*(C'\fR below. (e.g. perl)
.IP "\s-1PPM_UNINSTALL_SCRIPT\s0" 2
.IX Item "PPM_UNINSTALL_SCRIPT"
Available in version 6.8502 and above.
.Sp
Name of the script that gets executed by the Perl Package Manager before
the removal of a package.
.IP "\s-1PREFIX\s0" 2
.IX Item "PREFIX"
This overrides all the default install locations. Man pages,
libraries, scripts, etc... MakeMaker will try to make an educated
guess about where to place things under the new \s-1PREFIX\s0 based on your
Config defaults. Failing that, it will fall back to a structure
which should be sensible for your platform.
.Sp
If you specify \s-1LIB\s0 or any INSTALL* variables they will not be affected
by the \s-1PREFIX\s0.
.IP "\s-1PREREQ_FATAL\s0" 2
.IX Item "PREREQ_FATAL"
Bool. If this parameter is true, failing to have the required modules
(or the right versions thereof) will be fatal. \f(CW\*(C`perl Makefile.PL\*(C'\fR
will \f(CW\*(C`die\*(C'\fR instead of simply informing the user of the missing dependencies.
.Sp
It is \fIextremely\fR rare to have to use \f(CW\*(C`PREREQ_FATAL\*(C'\fR. Its use by module
authors is \fIstrongly discouraged\fR and should never be used lightly.
.Sp
For dependencies that are required in order to run \f(CW\*(C`Makefile.PL\*(C'\fR,
see \f(CW\*(C`CONFIGURE_REQUIRES\*(C'\fR.
.Sp
Module installation tools have ways of resolving unmet dependencies but
to do that they need a \fIMakefile\fR. Using \f(CW\*(C`PREREQ_FATAL\*(C'\fR breaks this.
That's bad.
.Sp
Assuming you have good test coverage, your tests should fail with
missing dependencies informing the user more strongly that something
is wrong. You can write a \fIt/00compile.t\fR test which will simply
check that your code compiles and stop \*(L"make test\*(R" prematurely if it
doesn't. See \*(L"\s-1BAIL_OUT\s0\*(R" in Test::More for more details.
.IP "\s-1PREREQ_PM\s0" 2
.IX Item "PREREQ_PM"
A hash of modules that are needed to run your module. The keys are
the module names ie. Test::More, and the minimum version is the
value. If the required version number is 0 any version will do.
The versions given may be a Perl v\-string (see version) or a range
(see CPAN::Meta::Requirements).
.Sp
This will go into the \f(CW\*(C`requires\*(C'\fR field of your \fI\s-1META\s0.yml\fR and the
\&\f(CW\*(C`runtime\*(C'\fR of the \f(CW\*(C`prereqs\*(C'\fR field of your \fI\s-1META\s0.json\fR.
.Sp
.Vb 3
\& PREREQ_PM => {
\& # Require Test::More at least 0.47
\& "Test::More" => "0.47",
\&
\& # Require any version of Acme::Buffy
\& "Acme::Buffy" => 0,
\& }
.Ve
.IP "\s-1PREREQ_PRINT\s0" 2
.IX Item "PREREQ_PRINT"
Bool. If this parameter is true, the prerequisites will be printed to
stdout and MakeMaker will exit. The output format is an evalable hash
ref.
.Sp
.Vb 5
\& $PREREQ_PM = {
\& \*(AqA::B\*(Aq => Vers1,
\& \*(AqC::D\*(Aq => Vers2,
\& ...
\& };
.Ve
.Sp
If a distribution defines a minimal required perl version, this is
added to the output as an additional line of the form:
.Sp
.Vb 1
\& $MIN_PERL_VERSION = \*(Aq5.008001\*(Aq;
.Ve
.Sp
If \s-1BUILD_REQUIRES\s0 is not empty, it will be dumped as \f(CW$BUILD_REQUIRES\fR hashref.
.IP "\s-1PRINT_PREREQ\s0" 2
.IX Item "PRINT_PREREQ"
RedHatism for \f(CW\*(C`PREREQ_PRINT\*(C'\fR. The output format is different, though:
.Sp
.Vb 1
\& perl(A::B)>=Vers1 perl(C::D)>=Vers2 ...
.Ve
.Sp
A minimal required perl version, if present, will look like this:
.Sp
.Vb 1
\& perl(perl)>=5.008001
.Ve
.IP "\s-1SITEPREFIX\s0" 2
.IX Item "SITEPREFIX"
Like \s-1PERLPREFIX\s0, but only for the site install locations.
.Sp
Defaults to \f(CW$Config\fR{siteprefixexp}. Perls prior to 5.6.0 didn't have
an explicit siteprefix in the Config. In those cases
\&\f(CW$Config\fR{installprefix} will be used.
.Sp
Overridable by \s-1PREFIX\s0
.IP "\s-1SIGN\s0" 2
.IX Item "SIGN"
Available in version 6.18 and above.
.Sp
When true, perform the generation and addition to the \s-1MANIFEST\s0 of the
\&\s-1SIGNATURE\s0 file in the distdir during 'make distdir', via 'cpansign
\&\-s'.
.Sp
Note that you need to install the Module::Signature module to
perform this operation.
.Sp
Defaults to false.
.IP "\s-1SKIP\s0" 2
.IX Item "SKIP"
Arrayref. E.g. [qw(name1 name2)] skip (do not write) sections of the
Makefile. Caution! Do not use the \s-1SKIP\s0 attribute for the negligible
speedup. It may seriously damage the resulting Makefile. Only use it
if you really need it.
.IP "\s-1TEST_REQUIRES\s0" 2
.IX Item "TEST_REQUIRES"
Available in version 6.64 and above.
.Sp
A hash of modules that are needed to test your module but not run or
build it.
.Sp
This will go into the \f(CW\*(C`build_requires\*(C'\fR field of your \fI\s-1META\s0.yml\fR and the \f(CW\*(C`test\*(C'\fR of the \f(CW\*(C`prereqs\*(C'\fR field of your \fI\s-1META\s0.json\fR.
.Sp
The format is the same as \s-1PREREQ_PM\s0.
.IP "\s-1TYPEMAPS\s0" 2
.IX Item "TYPEMAPS"
Ref to array of typemap file names. Use this when the typemaps are
in some directory other than the current directory or when they are
not named \fBtypemap\fR. The last typemap in the list takes
precedence. A typemap in the current directory has highest
precedence, even if it isn't listed in \s-1TYPEMAPS\s0. The default system
typemap has lowest precedence.
.IP "\s-1VENDORPREFIX\s0" 2
.IX Item "VENDORPREFIX"
Like \s-1PERLPREFIX\s0, but only for the vendor install locations.
.Sp
Defaults to \f(CW$Config\fR{vendorprefixexp}.
.Sp
Overridable by \s-1PREFIX\s0
.IP "\s-1VERBINST\s0" 2
.IX Item "VERBINST"
If true, make install will be verbose
.IP "\s-1VERSION\s0" 2
.IX Item "VERSION"
Your version number for distributing the package. This defaults to
0.1.
.IP "\s-1VERSION_FROM\s0" 2
.IX Item "VERSION_FROM"
Instead of specifying the \s-1VERSION\s0 in the Makefile.PL you can let
MakeMaker parse a file to determine the version number. The parsing
routine requires that the file named by \s-1VERSION_FROM\s0 contains one
single line to compute the version number. The first line in the file
that contains something like a \f(CW$VERSION\fR assignment or \f(CW\*(C`package Name
VERSION\*(C'\fR will be used. The following lines will be parsed o.k.:
.Sp
.Vb 7
\& # Good
\& package Foo::Bar 1.23; # 1.23
\& $VERSION = \*(Aq1.00\*(Aq; # 1.00
\& *VERSION = \e\*(Aq1.01\*(Aq; # 1.01
\& ($VERSION) = q$Revision$ =~ /(\ed+)/g; # The digits in $Revision$
\& $FOO::VERSION = \*(Aq1.10\*(Aq; # 1.10
\& *FOO::VERSION = \e\*(Aq1.11\*(Aq; # 1.11
.Ve
.Sp
but these will fail:
.Sp
.Vb 4
\& # Bad
\& my $VERSION = \*(Aq1.01\*(Aq;
\& local $VERSION = \*(Aq1.02\*(Aq;
\& local $FOO::VERSION = \*(Aq1.30\*(Aq;
.Ve
.Sp
(Putting \f(CW\*(C`my\*(C'\fR or \f(CW\*(C`local\*(C'\fR on the preceding line will work o.k.)
.Sp
\&\*(L"Version strings\*(R" are incompatible and should not be used.
.Sp
.Vb 3
\& # Bad
\& $VERSION = 1.2.3;
\& $VERSION = v1.2.3;
.Ve
.Sp
version objects are fine. As of MakeMaker 6.35 version.pm will be
automatically loaded, but you must declare the dependency on version.pm.
For compatibility with older MakeMaker you should load on the same line
as \f(CW$VERSION\fR is declared.
.Sp
.Vb 2
\& # All on one line
\& use version; our $VERSION = qv(1.2.3);
.Ve
.Sp
The file named in \s-1VERSION_FROM\s0 is not added as a dependency to
Makefile. This is not really correct, but it would be a major pain
during development to have to rewrite the Makefile for any smallish
change in that file. If you want to make sure that the Makefile
contains the correct \s-1VERSION\s0 macro after any change of the file, you
would have to do something like
.Sp
.Vb 1
\& depend => { Makefile => \*(Aq$(VERSION_FROM)\*(Aq }
.Ve
.Sp
See attribute \f(CW\*(C`depend\*(C'\fR below.
.IP "\s-1VERSION_SYM\s0" 2
.IX Item "VERSION_SYM"
A sanitized \s-1VERSION\s0 with . replaced by _. For places where . has
special meaning (some filesystems, \s-1RCS\s0 labels, etc...)
.IP "\s-1XS\s0" 2
.IX Item "XS"
Hashref of .xs files. MakeMaker will default this. e.g.
.Sp
.Vb 1
\& {\*(Aqname_of_file.xs\*(Aq => \*(Aqname_of_file.c\*(Aq}
.Ve
.Sp
The .c files will automatically be included in the list of files
deleted by a make clean.
.IP "\s-1XSBUILD\s0" 2
.IX Item "XSBUILD"
Available in version 7.12 and above.
.Sp
Hashref with options controlling the operation of \f(CW\*(C`XSMULTI\*(C'\fR:
.Sp
.Vb 10
\& {
\& xs => {
\& all => {
\& # options applying to all .xs files for this distribution
\& },
\& \*(Aqlib/Class/Name/File\*(Aq => { # specifically for this file
\& DEFINE => \*(Aq\-Dfunktastic\*(Aq, # defines for only this file
\& INC => "\-I$funkyliblocation", # include flags for only this file
\& # OBJECT => \*(Aqlib/Class/Name/File$(OBJ_EXT)\*(Aq, # default
\& LDFROM => "lib/Class/Name/File\e$(OBJ_EXT) $otherfile\e$(OBJ_EXT)", # what\*(Aqs linked
\& },
\& },
\& }
.Ve
.Sp
Note \f(CW\*(C`xs\*(C'\fR is the file-extension. More possibilities may arise in the
future. Note that object names are specified without their \s-1XS\s0 extension.
.Sp
\&\f(CW\*(C`LDFROM\*(C'\fR defaults to the same as \f(CW\*(C`OBJECT\*(C'\fR. \f(CW\*(C`OBJECT\*(C'\fR defaults to,
for \f(CW\*(C`XSMULTI\*(C'\fR, just the \s-1XS\s0 filename with the extension replaced with
the compiler-specific object-file extension.
.Sp
The distinction between \f(CW\*(C`OBJECT\*(C'\fR and \f(CW\*(C`LDFROM\*(C'\fR: \f(CW\*(C`OBJECT\*(C'\fR is the make
target, so make will try to build it. However, \f(CW\*(C`LDFROM\*(C'\fR is what will
actually be linked together to make the shared object or static library
(\s-1SO/SL\s0), so if you override it, make sure it includes what you want to
make the final \s-1SO/SL\s0, almost certainly including the \s-1XS\s0 basename with
\&\f(CW\*(C`$(OBJ_EXT)\*(C'\fR appended.
.IP "\s-1XSMULTI\s0" 2
.IX Item "XSMULTI"
Available in version 7.12 and above.
.Sp
When this is set to \f(CW1\fR, multiple \s-1XS\s0 files may be placed under \fIlib/\fR
next to their corresponding \f(CW\*(C`*.pm\*(C'\fR files (this is essential for compiling
with the correct \f(CW\*(C`VERSION\*(C'\fR values). This feature should be considered
experimental, and details of it may change.
.Sp
This feature was inspired by, and small portions of code copied from,
ExtUtils::MakeMaker::BigHelper. Hopefully this feature will render
that module mainly obsolete.
.IP "\s-1XSOPT\s0" 2
.IX Item "XSOPT"
String of options to pass to xsubpp. This might include \f(CW\*(C`\-C++\*(C'\fR or
\&\f(CW\*(C`\-extern\*(C'\fR. Do not include typemaps here; the \s-1TYPEMAP\s0 parameter exists for
that purpose.
.IP "\s-1XSPROTOARG\s0" 2
.IX Item "XSPROTOARG"
May be set to \f(CW\*(C`\-protoypes\*(C'\fR, \f(CW\*(C`\-noprototypes\*(C'\fR or the empty string. The
empty string is equivalent to the xsubpp default, or \f(CW\*(C`\-noprototypes\*(C'\fR.
See the xsubpp documentation for details. MakeMaker
defaults to the empty string.
.IP "\s-1XS_VERSION\s0" 2
.IX Item "XS_VERSION"
Your version number for the .xs file of this package. This defaults
to the value of the \s-1VERSION\s0 attribute.
.SS "Additional lowercase attributes"
.IX Subsection "Additional lowercase attributes"
can be used to pass parameters to the methods which implement that
part of the Makefile. Parameters are specified as a hash ref but are
passed to the method as a hash.
.IP "clean" 2
.IX Item "clean"
.Vb 1
\& {FILES => "*.xyz foo"}
.Ve
.IP "depend" 2
.IX Item "depend"
.Vb 1
\& {ANY_TARGET => ANY_DEPENDENCY, ...}
.Ve
.Sp
(\s-1ANY_TARGET\s0 must not be given a double-colon rule by MakeMaker.)
.IP "dist" 2
.IX Item "dist"
.Vb 3
\& {TARFLAGS => \*(AqcvfF\*(Aq, COMPRESS => \*(Aqgzip\*(Aq, SUFFIX => \*(Aq.gz\*(Aq,
\& SHAR => \*(Aqshar \-m\*(Aq, DIST_CP => \*(Aqln\*(Aq, ZIP => \*(Aq/bin/zip\*(Aq,
\& ZIPFLAGS => \*(Aq\-rl\*(Aq, DIST_DEFAULT => \*(Aqprivate tardist\*(Aq }
.Ve
.Sp
If you specify \s-1COMPRESS\s0, then \s-1SUFFIX\s0 should also be altered, as it is
needed to tell make the target file of the compression. Setting
\&\s-1DIST_CP\s0 to ln can be useful, if you need to preserve the timestamps on
your files. \s-1DIST_CP\s0 can take the values 'cp', which copies the file,
\&'ln', which links the file, and 'best' which copies symbolic links and
links the rest. Default is 'best'.
.IP "dynamic_lib" 2
.IX Item "dynamic_lib"
.Vb 1
\& {ARMAYBE => \*(Aqar\*(Aq, OTHERLDFLAGS => \*(Aq...\*(Aq, INST_DYNAMIC_DEP => \*(Aq...\*(Aq}
.Ve
.IP "linkext" 2
.IX Item "linkext"
.Vb 1
\& {LINKTYPE => \*(Aqstatic\*(Aq, \*(Aqdynamic\*(Aq or \*(Aq\*(Aq}
.Ve
.Sp
\&\s-1NB:\s0 Extensions that have nothing but *.pm files had to say
.Sp
.Vb 1
\& {LINKTYPE => \*(Aq\*(Aq}
.Ve
.Sp
with Pre\-5.0 MakeMakers. Since version 5.00 of MakeMaker such a line
can be deleted safely. MakeMaker recognizes when there's nothing to
be linked.
.IP "macro" 2
.IX Item "macro"
.Vb 1
\& {ANY_MACRO => ANY_VALUE, ...}
.Ve
.IP "postamble" 2
.IX Item "postamble"
Anything put here will be passed to \fIMY::postamble()\fR if you have one.
.IP "realclean" 2
.IX Item "realclean"
.Vb 1
\& {FILES => \*(Aq$(INST_ARCHAUTODIR)/*.xyz\*(Aq}
.Ve
.IP "test" 2
.IX Item "test"
Specify the targets for testing.
.Sp
.Vb 1
\& {TESTS => \*(Aqt/*.t\*(Aq}
.Ve
.Sp
\&\f(CW\*(C`RECURSIVE_TEST_FILES\*(C'\fR can be used to include all directories
recursively under \f(CW\*(C`t\*(C'\fR that contain \f(CW\*(C`.t\*(C'\fR files. It will be ignored if
you provide your own \f(CW\*(C`TESTS\*(C'\fR attribute, defaults to false.
.Sp
.Vb 1
\& {RECURSIVE_TEST_FILES=>1}
.Ve
.Sp
This is supported since 6.76
.IP "tool_autosplit" 2
.IX Item "tool_autosplit"
.Vb 1
\& {MAXLEN => 8}
.Ve
.SS "Overriding MakeMaker Methods"
.IX Subsection "Overriding MakeMaker Methods"
If you cannot achieve the desired Makefile behaviour by specifying
attributes you may define private subroutines in the Makefile.PL.
Each subroutine returns the text it wishes to have written to
the Makefile. To override a section of the Makefile you can
either say:
.PP
.Vb 1
\& sub MY::c_o { "new literal text" }
.Ve
.PP
or you can edit the default by saying something like:
.PP
.Vb 6
\& package MY; # so that "SUPER" works right
\& sub c_o {
\& my $inherited = shift\->SUPER::c_o(@_);
\& $inherited =~ s/old text/new text/;
\& $inherited;
\& }
.Ve
.PP
If you are running experiments with embedding perl as a library into
other applications, you might find MakeMaker is not sufficient. You'd
better have a look at ExtUtils::Embed which is a collection of utilities
for embedding.
.PP
If you still need a different solution, try to develop another
subroutine that fits your needs and submit the diffs to
\&\f(CW\*(C`makemaker@perl.org\*(C'\fR
.PP
For a complete description of all MakeMaker methods see
ExtUtils::MM_Unix.
.PP
Here is a simple example of how to add a new target to the generated
Makefile:
.PP
.Vb 4
\& sub MY::postamble {
\& return <<\*(AqMAKE_FRAG\*(Aq;
\& $(MYEXTLIB): sdbm/Makefile
\& cd sdbm && $(MAKE) all
\&
\& MAKE_FRAG
\& }
.Ve
.SS "The End Of Cargo Cult Programming"
.IX Subsection "The End Of Cargo Cult Programming"
\&\fIWriteMakefile()\fR now does some basic sanity checks on its parameters to
protect against typos and malformatted values. This means some things
which happened to work in the past will now throw warnings and
possibly produce internal errors.
.PP
Some of the most common mistakes:
.ie n .IP """MAN3PODS => \*(Aq \*(Aq""" 2
.el .IP "\f(CWMAN3PODS => \*(Aq \*(Aq\fR" 2
.IX Item "MAN3PODS => "
This is commonly used to suppress the creation of man pages. \s-1MAN3PODS\s0
takes a hash ref not a string, but the above worked by accident in old
versions of MakeMaker.
.Sp
The correct code is \f(CW\*(C`MAN3PODS => { }\*(C'\fR.
.SS "Hintsfile support"
.IX Subsection "Hintsfile support"
MakeMaker.pm uses the architecture-specific information from
Config.pm. In addition it evaluates architecture specific hints files
in a \f(CW\*(C`hints/\*(C'\fR directory. The hints files are expected to be named
like their counterparts in \f(CW\*(C`PERL_SRC/hints\*(C'\fR, but with an \f(CW\*(C`.pl\*(C'\fR file
name extension (eg. \f(CW\*(C`next_3_2.pl\*(C'\fR). They are simply \f(CW\*(C`eval\*(C'\fRed by
MakeMaker within the \fIWriteMakefile()\fR subroutine, and can be used to
execute commands as well as to include special variables. The rules
which hintsfile is chosen are the same as in Configure.
.PP
The hintsfile is \fIeval()\fRed immediately after the arguments given to
WriteMakefile are stuffed into a hash reference \f(CW$self\fR but before this
reference becomes blessed. So if you want to do the equivalent to
override or create an attribute you would say something like
.PP
.Vb 1
\& $self\->{LIBS} = [\*(Aq\-ldbm \-lucb \-lc\*(Aq];
.Ve
.SS "Distribution Support"
.IX Subsection "Distribution Support"
For authors of extensions MakeMaker provides several Makefile
targets. Most of the support comes from the ExtUtils::Manifest module,
where additional documentation can be found.
.IP "make distcheck" 4
.IX Item "make distcheck"
reports which files are below the build directory but not in the
\&\s-1MANIFEST\s0 file and vice versa. (See \fIExtUtils::Manifest::fullcheck()\fR for
details)
.IP "make skipcheck" 4
.IX Item "make skipcheck"
reports which files are skipped due to the entries in the
\&\f(CW\*(C`MANIFEST.SKIP\*(C'\fR file (See \fIExtUtils::Manifest::skipcheck()\fR for
details)
.IP "make distclean" 4
.IX Item "make distclean"
does a realclean first and then the distcheck. Note that this is not
needed to build a new distribution as long as you are sure that the
\&\s-1MANIFEST\s0 file is ok.
.IP "make veryclean" 4
.IX Item "make veryclean"
does a realclean first and then removes backup files such as \f(CW\*(C`*~\*(C'\fR,
\&\f(CW\*(C`*.bak\*(C'\fR, \f(CW\*(C`*.old\*(C'\fR and \f(CW\*(C`*.orig\*(C'\fR
.IP "make manifest" 4
.IX Item "make manifest"
rewrites the \s-1MANIFEST\s0 file, adding all remaining files found (See
\&\fIExtUtils::Manifest::mkmanifest()\fR for details)
.IP "make distdir" 4
.IX Item "make distdir"
Copies all the files that are in the \s-1MANIFEST\s0 file to a newly created
directory with the name \f(CW\*(C`$(DISTNAME)\-$(VERSION)\*(C'\fR. If that directory
exists, it will be removed first.
.Sp
Additionally, it will create \s-1META\s0.yml and \s-1META\s0.json module meta-data file
in the distdir and add this to the distdir's \s-1MANIFEST\s0. You can shut this
behavior off with the \s-1NO_META\s0 flag.
.IP "make disttest" 4
.IX Item "make disttest"
Makes a distdir first, and runs a \f(CW\*(C`perl Makefile.PL\*(C'\fR, a make, and
a make test in that directory.
.IP "make tardist" 4
.IX Item "make tardist"
First does a distdir. Then a command $(\s-1PREOP\s0) which defaults to a null
command, followed by $(\s-1TO_UNIX\s0), which defaults to a null command under
\&\s-1UNIX\s0, and will convert files in distribution directory to \s-1UNIX\s0 format
otherwise. Next it runs \f(CW\*(C`tar\*(C'\fR on that directory into a tarfile and
deletes the directory. Finishes with a command $(\s-1POSTOP\s0) which
defaults to a null command.
.IP "make dist" 4
.IX Item "make dist"
Defaults to $(\s-1DIST_DEFAULT\s0) which in turn defaults to tardist.
.IP "make uutardist" 4
.IX Item "make uutardist"
Runs a tardist first and uuencodes the tarfile.
.IP "make shdist" 4
.IX Item "make shdist"
First does a distdir. Then a command $(\s-1PREOP\s0) which defaults to a null
command. Next it runs \f(CW\*(C`shar\*(C'\fR on that directory into a sharfile and
deletes the intermediate directory again. Finishes with a command
$(\s-1POSTOP\s0) which defaults to a null command. Note: For shdist to work
properly a \f(CW\*(C`shar\*(C'\fR program that can handle directories is mandatory.
.IP "make zipdist" 4
.IX Item "make zipdist"
First does a distdir. Then a command $(\s-1PREOP\s0) which defaults to a null
command. Runs \f(CW\*(C`$(ZIP) $(ZIPFLAGS)\*(C'\fR on that directory into a
zipfile. Then deletes that directory. Finishes with a command
$(\s-1POSTOP\s0) which defaults to a null command.
.IP "make ci" 4
.IX Item "make ci"
Does a $(\s-1CI\s0) and a $(\s-1RCS_LABEL\s0) on all files in the \s-1MANIFEST\s0 file.
.PP
Customization of the dist targets can be done by specifying a hash
reference to the dist attribute of the WriteMakefile call. The
following parameters are recognized:
.PP
.Vb 12
\& CI (\*(Aqci \-u\*(Aq)
\& COMPRESS (\*(Aqgzip \-\-best\*(Aq)
\& POSTOP (\*(Aq@ :\*(Aq)
\& PREOP (\*(Aq@ :\*(Aq)
\& TO_UNIX (depends on the system)
\& RCS_LABEL (\*(Aqrcs \-q \-Nv$(VERSION_SYM):\*(Aq)
\& SHAR (\*(Aqshar\*(Aq)
\& SUFFIX (\*(Aq.gz\*(Aq)
\& TAR (\*(Aqtar\*(Aq)
\& TARFLAGS (\*(Aqcvf\*(Aq)
\& ZIP (\*(Aqzip\*(Aq)
\& ZIPFLAGS (\*(Aq\-r\*(Aq)
.Ve
.PP
An example:
.PP
.Vb 7
\& WriteMakefile(
\& ...other options...
\& dist => {
\& COMPRESS => "bzip2",
\& SUFFIX => ".bz2"
\& }
\& );
.Ve
.SS "Module Meta-Data (\s-1META\s0 and \s-1MYMETA\s0)"
.IX Subsection "Module Meta-Data (META and MYMETA)"
Long plaguing users of MakeMaker based modules has been the problem of
getting basic information about the module out of the sources
\&\fIwithout\fR running the \fIMakefile.PL\fR and doing a bunch of messy
heuristics on the resulting \fIMakefile\fR. Over the years, it has become
standard to keep this information in one or more \s-1CPAN\s0 Meta files
distributed with each distribution.
.PP
The original format of \s-1CPAN\s0 Meta files was \s-1YAML\s0 and the corresponding
file was called \fI\s-1META\s0.yml\fR. In 2010, version 2 of the CPAN::Meta::Spec
was released, which mandates \s-1JSON\s0 format for the metadata in order to
overcome certain compatibility issues between \s-1YAML\s0 serializers and to
avoid breaking older clients unable to handle a new version of the spec.
The CPAN::Meta library is now standard for accessing old and new-style
Meta files.
.PP
If CPAN::Meta is installed, MakeMaker will automatically generate
\&\fI\s-1META\s0.json\fR and \fI\s-1META\s0.yml\fR files for you and add them to your \fI\s-1MANIFEST\s0\fR as
part of the 'distdir' target (and thus the 'dist' target). This is intended to
seamlessly and rapidly populate \s-1CPAN\s0 with module meta-data. If you wish to
shut this feature off, set the \f(CW\*(C`NO_META\*(C'\fR \f(CW\*(C`WriteMakefile()\*(C'\fR flag to true.
.PP
At the 2008 \s-1QA\s0 Hackathon in Oslo, Perl module toolchain maintainers agreed
to use the \s-1CPAN\s0 Meta format to communicate post-configuration requirements
between toolchain components. These files, \fI\s-1MYMETA\s0.json\fR and \fI\s-1MYMETA\s0.yml\fR,
are generated when \fIMakefile.PL\fR generates a \fIMakefile\fR (if CPAN::Meta
is installed). Clients like \s-1CPAN\s0 or \s-1CPANPLUS\s0 will read these
files to see what prerequisites must be fulfilled before building or testing
the distribution. If you wish to shut this feature off, set the \f(CW\*(C`NO_MYMETA\*(C'\fR
\&\f(CW\*(C`WriteMakeFile()\*(C'\fR flag to true.
.SS "Disabling an extension"
.IX Subsection "Disabling an extension"
If some events detected in \fIMakefile.PL\fR imply that there is no way
to create the Module, but this is a normal state of things, then you
can create a \fIMakefile\fR which does nothing, but succeeds on all the
\&\*(L"usual\*(R" build targets. To do so, use
.PP
.Vb 2
\& use ExtUtils::MakeMaker qw(WriteEmptyMakefile);
\& WriteEmptyMakefile();
.Ve
.PP
instead of \fIWriteMakefile()\fR.
.PP
This may be useful if other modules expect this module to be \fIbuilt\fR
\&\s-1OK\s0, as opposed to \fIwork\fR \s-1OK\s0 (say, this system-dependent module builds
in a subdirectory of some other distribution, or is listed as a
dependency in a CPAN::Bundle, but the functionality is supported by
different means on the current architecture).
.SS "Other Handy Functions"
.IX Subsection "Other Handy Functions"
.IP "prompt" 4
.IX Item "prompt"
.Vb 2
\& my $value = prompt($message);
\& my $value = prompt($message, $default);
.Ve
.Sp
The \f(CW\*(C`prompt()\*(C'\fR function provides an easy way to request user input
used to write a makefile. It displays the \f(CW$message\fR as a prompt for
input. If a \f(CW$default\fR is provided it will be used as a default. The
function returns the \f(CW$value\fR selected by the user.
.Sp
If \f(CW\*(C`prompt()\*(C'\fR detects that it is not running interactively and there
is nothing on \s-1STDIN\s0 or if the \s-1PERL_MM_USE_DEFAULT\s0 environment variable
is set to true, the \f(CW$default\fR will be used without prompting. This
prevents automated processes from blocking on user input.
.Sp
If no \f(CW$default\fR is provided an empty string will be used instead.
.IP "os_unsupported" 4
.IX Item "os_unsupported"
.Vb 2
\& os_unsupported();
\& os_unsupported if $^O eq \*(AqMSWin32\*(Aq;
.Ve
.Sp
The \f(CW\*(C`os_unsupported()\*(C'\fR function provides a way to correctly exit your
\&\f(CW\*(C`Makefile.PL\*(C'\fR before calling \f(CW\*(C`WriteMakefile\*(C'\fR. It is essentially a
\&\f(CW\*(C`die\*(C'\fR with the message \*(L"\s-1OS\s0 unsupported\*(R".
.Sp
This is supported since 7.26
.SS "Supported versions of Perl"
.IX Subsection "Supported versions of Perl"
Please note that while this module works on Perl 5.6, it is no longer
being routinely tested on 5.6 \- the earliest Perl version being routinely
tested, and expressly supported, is 5.8.1. However, patches to repair
any breakage on 5.6 are still being accepted.
.SH "ENVIRONMENT"
.IX Header "ENVIRONMENT"
.IP "\s-1PERL_MM_OPT\s0" 4
.IX Item "PERL_MM_OPT"
Command line options used by \f(CW\*(C`MakeMaker\->new()\*(C'\fR, and thus by
\&\f(CW\*(C`WriteMakefile()\*(C'\fR. The string is split as the shell would, and the result
is processed before any actual command line arguments are processed.
.Sp
.Vb 1
\& PERL_MM_OPT=\*(AqCCFLAGS="\-Wl,\-rpath \-Wl,/foo/bar/lib" LIBS="\-lwibble \-lwobble"\*(Aq
.Ve
.IP "\s-1PERL_MM_USE_DEFAULT\s0" 4
.IX Item "PERL_MM_USE_DEFAULT"
If set to a true value then MakeMaker's prompt function will
always return the default without waiting for user input.
.IP "\s-1PERL_CORE\s0" 4
.IX Item "PERL_CORE"
Same as the \s-1PERL_CORE\s0 parameter. The parameter overrides this.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
Module::Build is a pure-Perl alternative to MakeMaker which does
not rely on make or any other external utility. It is easier to
extend to suit your needs.
.PP
Module::Install is a wrapper around MakeMaker which adds features
not normally available.
.PP
ExtUtils::ModuleMaker and Module::Starter are both modules to
help you setup your distribution.
.PP
CPAN::Meta and CPAN::Meta::Spec explain \s-1CPAN\s0 Meta files in detail.
.PP
File::ShareDir::Install makes it easy to install static, sometimes
also referred to as 'shared' files. File::ShareDir helps accessing
the shared files after installation.
.PP
Dist::Zilla makes it easy for the module author to create MakeMaker-based
distributions with lots of bells and whistles.
.SH "AUTHORS"
.IX Header "AUTHORS"
Andy Dougherty \f(CW\*(C`doughera@lafayette.edu\*(C'\fR, Andreas König
\&\f(CW\*(C`andreas.koenig@mind.de\*(C'\fR, Tim Bunce \f(CW\*(C`timb@cpan.org\*(C'\fR. \s-1VMS\s0
support by Charles Bailey \f(CW\*(C`bailey@newman.upenn.edu\*(C'\fR. \s-1OS/2\s0 support
by Ilya Zakharevich \f(CW\*(C`ilya@math.ohio\-state.edu\*(C'\fR.
.PP
Currently maintained by Michael G Schwern \f(CW\*(C`schwern@pobox.com\*(C'\fR
.PP
Send patches and ideas to \f(CW\*(C`makemaker@perl.org\*(C'\fR.
.PP
Send bug reports via http://rt.cpan.org/. Please send your
generated Makefile along with your report.
.PP
For more up-to-date information, see <https://metacpan.org/release/ExtUtils\-MakeMaker>.
.PP
Repository available at <https://github.com/Perl\-Toolchain\-Gang/ExtUtils\-MakeMaker>.
.SH "LICENSE"
.IX Header "LICENSE"
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
.PP
See <http://www.perl.com/perl/misc/Artistic.html>
Copyright 2K16 - 2K18 Indonesian Hacker Rulez