Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v8plus / man / man3 / ExtUtils::MakeMaker.3
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.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. | will give a
.\" real vertical bar. \*(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-|\(bv\*(Tr
.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\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.\"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "ExtUtils::MakeMaker 3"
.TH ExtUtils::MakeMaker 3 "2001-09-21" "perl v5.8.8" "Perl Programmers Reference Guide"
.SH "NAME"
ExtUtils::MakeMaker \- Create a module Makefile
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\& use ExtUtils::MakeMaker;
.Ve
.PP
.Vb 1
\& WriteMakefile( ATTRIBUTE => VALUE [, ...] );
.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
MakeMaker 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.
.Sh "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 :\-)
.Sh "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 PREFIX=~
.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
.Sh "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 execute 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
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
.Sh "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
.Sh "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
.Ve
.PP
.Vb 7
\& PERLPREFIX SITEPREFIX VENDORPREFIX
\& INST_ARCHLIB INSTALLARCHLIB INSTALLSITEARCH INSTALLVENDORARCH
\& INST_LIB INSTALLPRIVLIB INSTALLSITELIB INSTALLVENDORLIB
\& INST_BIN INSTALLBIN INSTALLSITEBIN INSTALLVENDORBIN
\& INST_SCRIPT INSTALLSCRIPT INSTALLSCRIPT INSTALLSCRIPT
\& 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 '-V:install.*'
.Ve
.PP
And to check the sequence in which the library directories are
searched by perl, run
.PP
.Vb 1
\& perl -le 'print join $/, @INC'
.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
.Sh "\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. The quickest way to install a module in a non-standard place might
be
.PP
.Vb 1
\& perl Makefile.PL PREFIX=~
.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).
.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 per 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.
.Sh "\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.
.Sh "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 Makefile.aperl (may be system dependent). If you
want to force the creation of a new perl, it is recommended, that you
delete this Makefile.aperl, 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 per 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
.Sh "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.
.Sh "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 to mention,
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).
.Sh "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.
.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"
String containing name (and email address) of package author(s). Is used
in \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 "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-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 above 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 \s-1DISTNAME\-VERSION\s0.
.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-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" => [ 'DESTROY'] }
.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"
Used by 'make install' which copies files from \s-1INST_SCRIPT\s0 to this
directory.
.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-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.
.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-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
\& 'LIBS' => ["-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
\& 'LIBS' => ["-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
\& 'LIBS' => "-ltcl -ltk -lX11"
.Ve
.Sp
MakeMaker will turn it into an array with one element.
.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-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.
.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.
.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-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"
Perl module name for this extension (DBD::Oracle). This will default
to the directory name but should be explicitly defined in the
Makefile.PL.
.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 its 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 module meta-data file during 'make distdir'.
.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 containing all object files, e.g. \*(L"tkpBind.o
tkpButton.o 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
.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 "*" 4
with bugs in memory allocations which are caught by Perl's \fImalloc()\fR;
.IP "*" 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 "*" 4
which rely on special alignment which is not provided by Perl's \fImalloc()\fR.
.RE
.RS 2
.Sp
\&\fB\s-1NOTE\s0.\fR Negligence to set this flag in \fIany one\fR of 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_RW\s0" 2
.IX Item "PERM_RW"
Desired permission for read/writable files. Defaults to \f(CW644\fR.
See also \*(L"perm_rw\*(R" in MM_Unix.
.IP "\s-1PERM_RWX\s0" 2
.IX Item "PERM_RWX"
Desired permission for executable files. Defaults to \f(CW755\fR.
See also \*(L"perm_rwx\*(R" in MM_Unix.
.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. 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 => {'bin/foobar.PL' => 'bin/foobar'}
.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 => {'bin/foobar.PL' => [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
\&\s-1PL\s0 files are normally run \fBafter\fR pm_to_blib and include \s-1INST_LIB\s0 and
\&\s-1INST_ARCH\s0 in its \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 its somewhat \s-1DWIM\s0).
.IP "\s-1PM\s0" 2
.IX Item "PM"
Hashref of .pm files and *.pl files to be installed. e.g.
.Sp
.Vb 1
\& {'name_of_file.pm' => '$(INST_LIBDIR)/install_as.pm'}
.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.
.Sp
Great care is necessary when defining the command if quoting needs to be
done. For instance, you would need to say:
.Sp
.Vb 1
\& {'PM_FILTER' => 'grep -v \e\e"^\e\e#\e\e"'}
.Ve
.Sp
to remove all the leading coments on the fly during the build. The
extra \e\e are necessary, unfortunately, because this variable is interpolated
within the context of a Perl program built on the command line, and double
quotes are what is used with the \-e switch to build that command line. The
# is escaped for the Makefile, since what is going to be generated will then
be:
.Sp
.Vb 1
\& PM_FILTER = grep -v \e"^\e#\e"
.Ve
.Sp
Without the \e\e before the #, we'd have the start of a Makefile comment,
and the macro would be incorrectly defined.
.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-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 effected
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. perl Makefile.PL will die
with the proper message.
.Sp
Note: see Test::Harness for a shortcut for stopping tests early if
you are missing dependencies.
.Sp
Do \fInot\fR use this parameter for simple requirements, which could be resolved
at a later time, e.g. after an unsuccessful \fBmake test\fR of your module.
.Sp
It is \fIextremely\fR rare to have to use \f(CW\*(C`PREREQ_FATAL\*(C'\fR at all!
.IP "\s-1PREREQ_PM\s0" 2
.IX Item "PREREQ_PM"
Hashref: Names of modules that need to be available to run this
extension (e.g. Fcntl for SDBM_File) are the keys of the hash and the
desired version is the value. If the required version number is 0, we
only check if any version is installed already.
.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
$PREREQ_PM = {
'A::B' => Vers1,
'C::D' => Vers2,
...
};
.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
.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"
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-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 the regular expression
.Sp
.Vb 1
\& /([\e$*])(([\ew\e:\e']*)\ebVERSION)\eb.*\e=/
.Ve
.Sp
will be evaluated with \fIeval()\fR and the value of the named variable
\&\fBafter\fR the \fIeval()\fR will be assigned to the \s-1VERSION\s0 attribute of the
MakeMaker object. The following lines will be parsed o.k.:
.Sp
.Vb 6
\& $VERSION = '1.00';
\& *VERSION = \e'1.01';
\& $VERSION = sprintf "%d.%03d", q$Revision: 4535 $ =~ /(\ed+)/g;
\& $FOO::VERSION = '1.10';
\& *FOO::VERSION = \e'1.11';
\& our $VERSION = 1.2.3; # new for perl5.6.0
.Ve
.Sp
but these will fail:
.Sp
.Vb 3
\& my $VERSION = '1.01';
\& local $VERSION = '1.02';
\& local $FOO::VERSION = '1.30';
.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
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 => '$(VERSION_FROM)' }
.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
\& {'name_of_file.xs' => 'name_of_file.c'}
.Ve
.Sp
The .c files will automatically be included in the list of files
deleted by a make clean.
.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 an empty string, which is identical to \f(CW\*(C`\-prototypes\*(C'\fR, 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.
.Sh "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_DEPENDECY, ...}
.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 => 'cvfF', COMPRESS => 'gzip', SUFFIX => '.gz',
\& SHAR => 'shar -m', DIST_CP => 'ln', ZIP => '/bin/zip',
\& ZIPFLAGS => '-rl', DIST_DEFAULT => 'private tardist' }
.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 => 'ar', OTHERLDFLAGS => '...', INST_DYNAMIC_DEP => '...'}
.Ve
.IP "linkext" 2
.IX Item "linkext"
.Vb 1
\& {LINKTYPE => 'static', 'dynamic' or ''}
.Ve
.Sp
\&\s-1NB:\s0 Extensions that have nothing but *.pm files had to say
.Sp
.Vb 1
\& {LINKTYPE => ''}
.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 => '$(INST_ARCHAUTODIR)/*.xyz'}
.Ve
.IP "test" 2
.IX Item "test"
.Vb 1
\& {TESTS => 't/*.t'}
.Ve
.IP "tool_autosplit" 2
.IX Item "tool_autosplit"
.Vb 1
\& {MAXLEN => 8}
.Ve
.Sh "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 <<'MAKE_FRAG';
\& $(MYEXTLIB): sdbm/Makefile
\& cd sdbm && $(MAKE) all
.Ve
.PP
.Vb 2
\& MAKE_FRAG
\& }
.Ve
.Sh "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 => ' '""" 2
.el .IP "\f(CWMAN3PODS => ' '\fR" 2
.IX Item "MAN3PODS => ' '"
This is commonly used to supress 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.
.Sh "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} = ['-ldbm -lucb -lc'];
.Ve
.Sh "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 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 a \s-1META\s0.yml module meta-data file in the
distdir and add this to the distdir's \s-1MANFIEST\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-1TOUNIX\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 ('ci -u')
\& COMPRESS ('gzip --best')
\& POSTOP ('@ :')
\& PREOP ('@ :')
\& TO_UNIX (depends on the system)
\& RCS_LABEL ('rcs -q -Nv$(VERSION_SYM):')
\& SHAR ('shar')
\& SUFFIX ('.gz')
\& TAR ('tar')
\& TARFLAGS ('cvf')
\& ZIP ('zip')
\& ZIPFLAGS ('-r')
.Ve
.PP
An example:
.PP
.Vb 1
\& WriteMakefile( 'dist' => { COMPRESS=>"bzip2", SUFFIX=>".bz2" })
.Ve
.Sh "Module Meta-Data"
.IX Subsection "Module Meta-Data"
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. To this end a simple module
meta-data file has been introduced, \fI\s-1META\s0.yml\fR.
.PP
\&\fI\s-1META\s0.yml\fR is a \s-1YAML\s0 document (see http://www.yaml.org) containing
basic information about the module (name, version, prerequisites...)
in an easy to read format. The format is developed and defined by the
Module::Build developers (see
http://module\-build.sourceforge.net/META\-spec.html)
.PP
MakeMaker will automatically generate a \fI\s-1META\s0.yml\fR file for you and
add it 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.
.Sh "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 1
\& ExtUtils::MakeMaker::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).
.Sh "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.
.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 on whitespace, and the result
is processed before any actual command line arguments are processed.
.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"
ExtUtils::MM_Unix, ExtUtils::Manifest ExtUtils::Install,
ExtUtils::Embed
.SH "AUTHORS"
.IX Header "AUTHORS"
Andy Dougherty \f(CW\*(C`doughera@lafayette.edu\*(C'\fR, Andreas Ko\*: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 <http://www.makemaker.org>.
.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>