.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' '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 >0, 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. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "ExtUtils::MakeMaker 3perl" .TH ExtUtils::MakeMaker 3perl 2024-05-30 "perl v5.38.2" "Perl Programmers Reference Guide" .\" 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 POSIX systems, that program will likely be GNU Make; on Microsoft Windows, it will be either Microsoft NMake, DMake or GNU Make. See the section on the "MAKE" parameter for details. .PP ExtUtils::MakeMaker (EUMM) 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 \fBWriteMakefile()\fR. .PP All inputs to WriteMakefile are Unicode characters, not just octets. EUMM 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. .PP See ExtUtils::MakeMaker::FAQ for details of the design and usage. .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("t/*.t"). 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 INST_LIB, INST_ARCHLIB, INST_SCRIPT, INST_MAN1DIR and INST_MAN3DIR. 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, INST_LIB and INST_ARCHLIB default to \&../../lib, and INST_SCRIPT 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 INSTALLDIRS 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 INSTALL... 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 INSTALL_BASE .IX Subsection "INSTALL_BASE" INSTALL_BASE can be passed into Makefile.PL to change where your module will be installed. INSTALL_BASE is more like what everyone else calls "prefix" than PREFIX 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 PREFIX, it sets several INSTALL* attributes at once. Unlike PREFIX 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 INSTALL_BASE 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 INSTALL_BASE and \f(CW\*(C`\-\-install_base\*(C'\fR to the same location. .PP INSTALL_BASE was added in 6.31. .SS "PREFIX and LIB attribute" .IX Subsection "PREFIX and LIB attribute" PREFIX and LIB 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. INSTALL_BASE works more like what other build systems call "prefix" than PREFIX and we recommend you use that instead. .PP Another way to specify many INSTALL directories with a single parameter is LIB. .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 LIB, PREFIX and the various INSTALL* arguments are resolved so that: .IP \(bu 4 setting LIB overrides any setting of INSTALLPRIVLIB, INSTALLARCHLIB, INSTALLSITELIB, INSTALLSITEARCH (and they are not affected by PREFIX); .IP \(bu 4 without LIB, setting PREFIX 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 AFS or relatives, then the defaults for INSTALLPRIVLIB, INSTALLARCHLIB, INSTALLSCRIPT, 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 "AFS 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 AFS 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 INST_ARCHLIB, SITELIBEXP, and PERL_ARCHLIB. To do that, MakeMaker writes a new Makefile, on UNIX, 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 INSTALLBIN. .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 INST_LIB and INST_ARCHLIB (where to put the files during the \fBmake\fR\|(1) run), PERL_LIB and PERL_ARCHLIB (where to read existing modules from), and PERL_INC (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 PERL_SRC automatically (e.g., \&\f(CW\*(C`../..\*(C'\fR). If PERL_SRC 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 PERL_SRC 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 PERL_SRC 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 INSTALLPRIVLIB and INSTALLARCHLIB is determined by Configure at perl compilation time. MakeMaker supports the user who sets INSTALLPRIVLIB. If INSTALLPRIVLIB is set, but INSTALLARCHLIB not, then MakeMaker defaults the latter to be the same subdirectory of INSTALLPRIVLIB as Configure decided for the counterparts in \f(CW%Config\fR, otherwise it defaults to INSTALLPRIVLIB. The same relationship holds for INSTALLSITELIB and INSTALLSITEARCH. .PP MakeMaker gives you much more freedom than needed to configure internal variables and get different results. It is worth mentioning that \fBmake\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 \fBWriteMakefile()\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 ABSTRACT 2 .IX Item "ABSTRACT" One line description of the module. Will be included in PPD file. .IP ABSTRACT_FROM 2 .IX Item "ABSTRACT_FROM" Name of the file that contains the package description. MakeMaker looks for a line in the POD matching /^($package\es\-\es)(.*)/. This is typically the first line in the "=head1 NAME" section. \f(CW$2\fR becomes the abstract. .IP AUTHOR 2 .IX Item "AUTHOR" Array of strings containing name (and email address) of package author(s). Is used in CPAN Meta files (META.yml or META.json) and PPD (Perl Package Description) files for PPM (Perl Package Manager). .IP BINARY_LOCATION 2 .IX Item "BINARY_LOCATION" Used when creating PPD files for binary packages. It can be set to a full or relative path or URL 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 PPD 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 PPD itself. .IP BUILD_REQUIRES 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 \fIMETA.yml\fR and the \f(CW\*(C`build\*(C'\fR of the \f(CW\*(C`prereqs\*(C'\fR field of your \fIMETA.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 PREREQ_PM. .IP C 2 .IX Item "C" Ref to array of *.c file names. Initialised from a directory scan and the values portion of the XS attribute hash. This is not currently used by MakeMaker but may be handy in Makefile.PLs. .IP CCFLAGS 2 .IX Item "CCFLAGS" String that will be included in the compiler call command line between the arguments INC and OPTIMIZE. Note that setting this will overwrite its default value (\f(CW$Config::Config{ccflags}\fR); to preserve that, include the default value directly, e.g.: .Sp .Vb 1 \& CCFLAGS => "$Config::Config{ccflags} ..." .Ve .Sp The default value is taken from \f(CW$Config\fR{ccflags}. When overriding CCFLAGS, make sure to include the \f(CW$Config\fR{ccflags} settings to avoid binary incompatibilities. .IP CONFIG 2 .IX Item "CONFIG" Arrayref. E.g. [qw(archname manext)] defines ARCHNAME & MANEXT from config.sh. MakeMaker will add to CONFIG the following values anyway: ar cc cccdlflags ccdlflags cpprun dlext dlsrc ld lddlflags ldflags libc lib_ext obj_ext ranlib sitelibexp sitearchexp so .IP CONFIGURE 2 .IX Item "CONFIGURE" CODE reference. The subroutine should return a hash reference. The hash may contain further attributes, e.g. {LIBS => ...}, that have to be determined by some evaluation method. .IP CONFIGURE_REQUIRES 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 \fIMETA.yml\fR and the \f(CW\*(C`configure\*(C'\fR of the \f(CW\*(C`prereqs\*(C'\fR field of your \fIMETA.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 PREREQ_PM. .IP DEFINE 2 .IX Item "DEFINE" Something like \f(CW"\-DHAVE_UNISTD_H"\fR .IP DESTDIR 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 NOTE: Due to the nature of make, it is important that you put the trailing slash on your DESTDIR. \fI~/tmp/\fR not \fI~/tmp\fR. .IP DIR 2 .IX Item "DIR" Ref to array of subdirectories containing Makefile.PLs e.g. ['sdbm'] in ext/SDBM_File .IP DISTNAME 2 .IX Item "DISTNAME" A safe filename for the package. .Sp Defaults to NAME below but with :: replaced with \-. .Sp For example, Foo::Bar becomes Foo-Bar. .IP DISTVNAME 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 OS's where . has special meaning VERSION_SYM may be used in place of VERSION. .IP DLEXT 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 NOTE: 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 DL_FUNCS 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 AIX, OS/2, VMS and Win32 at present. The routine names supplied will be expanded in the same way as XSUB names are expanded by the \fBXS()\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 DL_FUNCS, DL_VARS and FUNCLIST attributes. .IP DL_VARS 2 .IX Item "DL_VARS" Array of symbol names for variables to be made available as universal symbols. Used only under AIX, OS/2, VMS and Win32 at present. Defaults to []. (e.g. [ qw(Foo_version Foo_numstreams Foo_tree ) ]) .IP EXCLUDE_EXT 2 .IX Item "EXCLUDE_EXT" Array of extension names to exclude when doing a static build. This is ignored if INCLUDE_EXT is present. Consult INCLUDE_EXT for more details. (e.g. [ qw( Socket POSIX ) ] ) .Sp This attribute may be most useful when specified as a string on the command line: perl Makefile.PL EXCLUDE_EXT='Socket Safe' .IP EXE_FILES 2 .IX Item "EXE_FILES" Ref to array of executable files. The files will be copied to the INST_SCRIPT 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 FIRST_MAKEFILE 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 MAP_TARGET. .Sp Defaults to 'Makefile' or 'Descrip.MMS' on VMS. .Sp (Note: we couldn't use MAKEFILE because dmake uses this for something else). .IP FULLPERL 2 .IX Item "FULLPERL" Perl binary able to run this extension, load XS modules, etc... .IP FULLPERLRUN 2 .IX Item "FULLPERLRUN" Like PERLRUN, except it uses FULLPERL. .IP FULLPERLRUNINST 2 .IX Item "FULLPERLRUNINST" Like PERLRUNINST, except it uses FULLPERL. .IP FUNCLIST 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 IMPORTS 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 OS/2 and Win32. .IP INC 2 .IX Item "INC" Include file dirs eg: \f(CW"\-I/usr/5include \-I/path/to/inc"\fR .IP INCLUDE_EXT 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 INCLUDE_EXT is present then MakeMaker will build only with those extensions which are explicitly mentioned. (e.g. [ qw( Socket POSIX ) ]) .Sp It is not necessary to mention DynaLoader or the current extension when filling in INCLUDE_EXT. If the INCLUDE_EXT 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='POSIX Socket Devel::Peek' .IP INSTALLARCHLIB 2 .IX Item "INSTALLARCHLIB" Used by 'make install', which copies files from INST_ARCHLIB to this directory if INSTALLDIRS is set to perl. .IP INSTALLBIN 2 .IX Item "INSTALLBIN" Directory to install binary files (e.g. tkperl) into if INSTALLDIRS=perl. .IP INSTALLDIRS 2 .IX Item "INSTALLDIRS" Determines which of the sets of installation directories to choose: perl, site or vendor. Defaults to site. .IP INSTALLMAN1DIR 2 .IX Item "INSTALLMAN1DIR" .PD 0 .IP INSTALLMAN3DIR 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 INSTALLPRIVLIB 2 .IX Item "INSTALLPRIVLIB" Used by 'make install', which copies files from INST_LIB to this directory if INSTALLDIRS is set to perl. .Sp Defaults to \f(CW$Config\fR{installprivlib}. .IP INSTALLSCRIPT 2 .IX Item "INSTALLSCRIPT" Available in version 6.30_02 and above. .Sp Used by 'make install' which copies files from INST_SCRIPT to this directory if INSTALLDIRS=perl. .IP INSTALLSITEARCH 2 .IX Item "INSTALLSITEARCH" Used by 'make install', which copies files from INST_ARCHLIB to this directory if INSTALLDIRS is set to site (default). .IP INSTALLSITEBIN 2 .IX Item "INSTALLSITEBIN" Used by 'make install', which copies files from INST_BIN to this directory if INSTALLDIRS is set to site (default). .IP INSTALLSITELIB 2 .IX Item "INSTALLSITELIB" Used by 'make install', which copies files from INST_LIB to this directory if INSTALLDIRS is set to site (default). .IP INSTALLSITEMAN1DIR 2 .IX Item "INSTALLSITEMAN1DIR" .PD 0 .IP INSTALLSITEMAN3DIR 2 .IX Item "INSTALLSITEMAN3DIR" .PD These directories get the man pages at 'make install' time if INSTALLDIRS=site (default). Defaults to $(SITEPREFIX)/man/man$(MAN*EXT). .Sp If set to 'none', no man pages will be installed. .IP INSTALLSITESCRIPT 2 .IX Item "INSTALLSITESCRIPT" Used by 'make install' which copies files from INST_SCRIPT to this directory if INSTALLDIRS is set to site (default). .IP INSTALLVENDORARCH 2 .IX Item "INSTALLVENDORARCH" Used by 'make install', which copies files from INST_ARCHLIB to this directory if INSTALLDIRS is set to vendor. Note that if you do not set this, the value of INSTALLVENDORLIB will be used, which is probably not what you want. .IP INSTALLVENDORBIN 2 .IX Item "INSTALLVENDORBIN" Used by 'make install', which copies files from INST_BIN to this directory if INSTALLDIRS is set to vendor. .IP INSTALLVENDORLIB 2 .IX Item "INSTALLVENDORLIB" Used by 'make install', which copies files from INST_LIB to this directory if INSTALLDIRS is set to vendor. .IP INSTALLVENDORMAN1DIR 2 .IX Item "INSTALLVENDORMAN1DIR" .PD 0 .IP INSTALLVENDORMAN3DIR 2 .IX Item "INSTALLVENDORMAN3DIR" .PD These directories get the man pages at 'make install' time if INSTALLDIRS=vendor. Defaults to $(VENDORPREFIX)/man/man$(MAN*EXT). .Sp If set to 'none', no man pages will be installed. .IP INSTALLVENDORSCRIPT 2 .IX Item "INSTALLVENDORSCRIPT" Available in version 6.30_02 and above. .Sp Used by 'make install' which copies files from INST_SCRIPT to this directory if INSTALLDIRS is set to vendor. .IP INST_ARCHLIB 2 .IX Item "INST_ARCHLIB" Same as INST_LIB for architecture dependent files. .IP INST_BIN 2 .IX Item "INST_BIN" Directory to put real binary files during 'make'. These will be copied to INSTALLBIN during 'make install' .IP INST_LIB 2 .IX Item "INST_LIB" Directory where we put library files of this extension while building it. .IP INST_MAN1DIR 2 .IX Item "INST_MAN1DIR" Directory to hold the man pages at 'make' time .IP INST_MAN3DIR 2 .IX Item "INST_MAN3DIR" Directory to hold the man pages at 'make' time .IP INST_SCRIPT 2 .IX Item "INST_SCRIPT" Directory where executable files should be installed during \&'make'. Defaults to "./blib/script", just to have a dummy location during testing. make install will copy the files in INST_SCRIPT to INSTALLSCRIPT. .IP LD 2 .IX Item "LD" Program to be used to link libraries for dynamic loading. .Sp Defaults to \f(CW$Config\fR{ld}. .IP LDDLFLAGS 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 "lddlflags" in Config) .Sp Defaults to \f(CW$Config\fR{lddlflags}. .IP LDFROM 2 .IX Item "LDFROM" Defaults to "$(OBJECT)" 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 LIB 2 .IX Item "LIB" LIB 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 INSTALLPRIVLIB and INSTALLSITELIB to that value regardless any explicit setting of those arguments (or of PREFIX). INSTALLARCHLIB and INSTALLSITEARCH are set to the corresponding architecture subdirectory. .IP LIBPERL_A 2 .IX Item "LIBPERL_A" The filename of the perllibrary that will be used together with this extension. Defaults to libperl.a. .IP LIBS 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 LICENSE 2 .IX Item "LICENSE" Available in version 6.31 and above. .Sp The licensing terms of your distribution. Generally it's "perl_5" for the same license as Perl itself. .Sp See CPAN::Meta::Spec for the list of options. .Sp Defaults to "unknown". .IP LINKTYPE 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 MAGICXS 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 MAKE 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 MAKE 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 ("Dennis Vadura's Make") 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 MAKE 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 MAKEAPERL 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 MAKEFILE_OLD 2 .IX Item "MAKEFILE_OLD" When 'make clean' or similar is run, the $(FIRST_MAKEFILE) will be backed up at this location. .Sp Defaults to $(FIRST_MAKEFILE).old or $(FIRST_MAKEFILE)_old on VMS. .IP MAN1PODS 2 .IX Item "MAN1PODS" Hashref of pod-containing files. MakeMaker will default this to all EXE_FILES files that include POD directives. The files listed here will be converted to man pages and installed as was requested at Configure time. .Sp This hash should map POD files (or scripts containing POD) 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 MAN3PODS 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 POD directives. Files that contain POD will be the default keys of the MAN3PODS 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 MAN1PODS. .IP MAP_TARGET 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 META_ADD 2 .IX Item "META_ADD" .PD 0 .IP META_MERGE 2 .IX Item "META_MERGE" .PD Available in version 6.46 and above. .Sp A hashref of items to add to the CPAN Meta file (\fIMETA.yml\fR or \&\fIMETA.json\fR). .Sp They differ in how they behave if they have the same key as the default metadata. META_ADD will override the default value with its own. META_MERGE will merge its value with the default. .Sp Unless you want to override the defaults, prefer META_MERGE so as to get the advantage of any future defaults. .Sp Where prereqs are concerned, if META_MERGE is used, prerequisites are merged with their counterpart \f(CWWriteMakefile()\fR argument (PREREQ_PM is merged into {prereqs}{runtime}{requires}, BUILD_REQUIRES into \f(CW\*(C`{prereqs}{build}{requires}\*(C'\fR, CONFIGURE_REQUIRES into \f(CW\*(C`{prereqs}{configure}{requires}\*(C'\fR, and TEST_REQUIRES into \f(CW\*(C`{prereqs}{test}{requires})\*(C'\fR. When prereqs are specified with META_ADD, the only prerequisites added to the file come from the metadata, not \f(CWWriteMakefile()\fR arguments. .Sp Note that these configuration options are only used for generating \fIMETA.yml\fR and \fIMETA.json\fR \-\- they are NOT used for \fIMYMETA.yml\fR and \fIMYMETA.json\fR. Therefore data in these fields should NOT be used for dynamic (user-side) configuration. .Sp By default CPAN Meta specification \f(CW1.4\fR is used. In order to use CPAN 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 MIN_PERL_VERSION 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 MYEXTLIB 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 NAME 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 "DISTNAME", installation locations within the Perl library and where XS files will be looked for by default (see "XS"). .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 XS code should be in \&\fIBar.xs\fR unless stated otherwise. .Sp Your distribution \fBmust\fR have a \f(CW\*(C`NAME\*(C'\fR. .IP NEEDS_LINKING 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 NOECHO 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 NORECURS 2 .IX Item "NORECURS" Boolean. Attribute to inhibit descending into subdirectories. .IP NO_META 2 .IX Item "NO_META" When true, suppresses the generation and addition to the MANIFEST of the META.yml and META.json module meta-data files during 'make distdir'. .Sp Defaults to false. .IP NO_MYMETA 2 .IX Item "NO_MYMETA" Available in version 6.57_02 and above. .Sp When true, suppresses the generation of MYMETA.yml and MYMETA.json module meta-data files during 'perl Makefile.PL'. .Sp Defaults to false. .IP NO_PACKLIST 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 NO_PERLLOCAL 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 NO_VC 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 NO_VC is set, the version check is neglected. Do not write this into your Makefile.PL, use it interactively instead. .IP OBJECT 2 .IX Item "OBJECT" List of object files, defaults to '$(BASEEXT)$(OBJ_EXT)', but can be a long string or an array containing all object files, e.g. "tkpBind.o tkpButton.o tkpCanvas.o" or ["tkpBind.o", "tkpButton.o", "tkpCanvas.o"] .Sp (Where BASEEXT is the last component of NAME, and OBJ_EXT is \f(CW$Config\fR{obj_ext}.) .IP OPTIMIZE 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 PERL 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 PERL_CORE 2 .IX Item "PERL_CORE" Set only when MakeMaker is building the extensions of the Perl core distribution. .IP PERLMAINCC 2 .IX Item "PERLMAINCC" The call to the program that is able to compile perlmain.c. Defaults to $(CC). .IP PERL_ARCHLIB 2 .IX Item "PERL_ARCHLIB" Same as for PERL_LIB, but for architecture dependent files. .Sp Used only when MakeMaker is building the extensions of the Perl core distribution (because normally $(PERL_ARCHLIB) is automatically in \f(CW@INC\fR, and adding it would get in the way of PERL5LIB). .IP PERL_LIB 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 $(PERL_LIB) is automatically in \f(CW@INC\fR, and adding it would get in the way of PERL5LIB). .IP PERL_MALLOC_OK 2 .IX Item "PERL_MALLOC_OK" defaults to 0. Should be set to TRUE if the extension can work with the memory allocation routines substituted by the Perl \fBmalloc()\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 \fBmalloc()\fR; .IP \(bu 4 which interact with the memory allocator in other ways than via \&\fBmalloc()\fR, \fBrealloc()\fR, \fBfree()\fR, \fBcalloc()\fR, \fBsbrk()\fR and \fBbrk()\fR; .IP \(bu 4 which rely on special alignment which is not provided by Perl's \fBmalloc()\fR. .RE .RS 2 .Sp \&\fBNOTE.\fR Neglecting to set this flag in \fIany one\fR of the loaded extension nullifies many advantages of Perl's \fBmalloc()\fR, such as better usage of system resources, error detection, memory usage reporting, catchable failure of memory allocations, etc. .RE .IP PERLPREFIX 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 PREFIX. .IP PERLRUN 2 .IX Item "PERLRUN" Use this instead of $(PERL) when you wish to run perl. It will set up extra necessary flags for you. .IP PERLRUNINST 2 .IX Item "PERLRUNINST" Use this instead of $(PERL) when you wish to run perl to work with modules. It will add things like \-I$(INST_ARCH) and other necessary flags so perl can see the modules you're about to install. .IP PERL_SRC 2 .IX Item "PERL_SRC" Directory containing the Perl source code (use of this should be avoided, it may be undefined) .IP PERM_DIR 2 .IX Item "PERM_DIR" Available in version 6.51_01 and above. .Sp Desired permission for directories. Defaults to \f(CW755\fR. .IP PERM_RW 2 .IX Item "PERM_RW" Desired permission for read/writable files. Defaults to \f(CW644\fR. .IP PERM_RWX 2 .IX Item "PERM_RWX" Desired permission for executable files. Defaults to \f(CW755\fR. .IP PL_FILES 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. PL_FILES accepts a hash ref, the key being the file to run and the value is passed in as the first argument when the PL 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 PL files are normally run \fBafter\fR pm_to_blib and include INST_LIB and INST_ARCH in their \f(CW@INC\fR, so the just built modules can be accessed... unless the PL file is making a module (or anything else in PM) in which case it is run \fBbefore\fR pm_to_blib and does not include INST_LIB and INST_ARCH in its \f(CW@INC\fR. This apparently odd behavior is there for backwards compatibility (and it's somewhat DWIM). 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 PM 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 PMLIBDIRS directories. Defining PM in the Makefile.PL will override PMLIBDIRS. .IP PMLIBDIRS 2 .IX Item "PMLIBDIRS" Ref to array of subdirectories containing library files. Defaults to [ 'lib', $(BASEEXT) ]. The directories will be scanned and \fIany\fR files they contain will be installed in the corresponding location in the library. A \fBlibscan()\fR method can be used to alter the behaviour. Defining PM in the Makefile.PL will override PMLIBDIRS. .Sp (Where BASEEXT is the last component of NAME.) .IP PM_FILTER 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 \&\fBpm_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 POLLUTE 2 .IX Item "POLLUTE" Prior to 5.6 various interpreter variables were available without a \f(CW\*(C`PL_\*(C'\fR prefix, eg. \f(CW\*(C`PL_undef\*(C'\fR was available as \f(CW\*(C`undef\*(C'\fR. As of release 5.6, these are only defined if the POLLUTE flag is enabled: .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 PPM_INSTALL_EXEC 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 PPM_INSTALL_SCRIPT 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 PPM_UNINSTALL_EXEC 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 PPM_UNINSTALL_SCRIPT 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 PREFIX 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 PREFIX 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 LIB or any INSTALL* variables they will not be affected by the PREFIX. .IP PREREQ_FATAL 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 "make test" prematurely if it doesn't. See "BAIL_OUT" in Test::More for more details. .IP PREREQ_PM 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 \fIMETA.yml\fR and the \&\f(CW\*(C`runtime\*(C'\fR of the \f(CW\*(C`prereqs\*(C'\fR field of your \fIMETA.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 PREREQ_PRINT 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 BUILD_REQUIRES is not empty, it will be dumped as \f(CW$BUILD_REQUIRES\fR hashref. .IP PRINT_PREREQ 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 SITEPREFIX 2 .IX Item "SITEPREFIX" Like PERLPREFIX, 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 PREFIX .IP SIGN 2 .IX Item "SIGN" Available in version 6.18 and above. .Sp When true, perform the generation and addition to the MANIFEST of the SIGNATURE 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 SKIP 2 .IX Item "SKIP" Arrayref. E.g. [qw(name1 name2)] skip (do not write) sections of the Makefile. Caution! Do not use the SKIP attribute for the negligible speedup. It may seriously damage the resulting Makefile. Only use it if you really need it. .IP TEST_REQUIRES 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 \fIMETA.yml\fR and the \f(CW\*(C`test\*(C'\fR of the \f(CW\*(C`prereqs\*(C'\fR field of your \fIMETA.json\fR. .Sp The format is the same as PREREQ_PM. .IP TYPEMAPS 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 TYPEMAPS. The default system typemap has lowest precedence. .IP VENDORPREFIX 2 .IX Item "VENDORPREFIX" Like PERLPREFIX, but only for the vendor install locations. .Sp Defaults to \f(CW$Config\fR{vendorprefixexp}. .Sp Overridable by PREFIX .IP VERBINST 2 .IX Item "VERBINST" If true, make install will be verbose .IP VERSION 2 .IX Item "VERSION" Your version number for distributing the package. This defaults to 0.1. .IP VERSION_FROM 2 .IX Item "VERSION_FROM" Instead of specifying the VERSION 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 VERSION_FROM 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 "Version strings" 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 VERSION_FROM 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 VERSION 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 VERSION_SYM 2 .IX Item "VERSION_SYM" A sanitized VERSION with . replaced by _. For places where . has special meaning (some filesystems, RCS labels, etc...) .IP XS 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 XSBUILD 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 XS 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 XS 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 (SO/SL), so if you override it, make sure it includes what you want to make the final SO/SL, almost certainly including the XS basename with \&\f(CW\*(C`$(OBJ_EXT)\*(C'\fR appended. .IP XSMULTI 2 .IX Item "XSMULTI" Available in version 7.12 and above. .Sp When this is set to \f(CW1\fR, multiple XS 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 XSOPT 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 TYPEMAP parameter exists for that purpose. .IP XSPROTOARG 2 .IX Item "XSPROTOARG" May be set to \f(CW\*(C`\-prototypes\*(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 XS_VERSION 2 .IX Item "XS_VERSION" Your version number for the .xs file of this package. This defaults to the value of the VERSION 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 (ANY_TARGET 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 COMPRESS, then SUFFIX should also be altered, as it is needed to tell make the target file of the compression. Setting DIST_CP to ln can be useful, if you need to preserve the timestamps on your files. DIST_CP 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 NB: 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 \&\fBMY::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" \&\fBWriteMakefile()\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. MAN3PODS 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 \fBWriteMakefile()\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 \fBeval()\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 MANIFEST file and vice versa. (See "fullcheck" in ExtUtils::Manifest 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 "skipcheck" in ExtUtils::Manifest 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 MANIFEST 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 MANIFEST file, adding all remaining files found (See "mkmanifest" in ExtUtils::Manifest for details) .IP "make distdir" 4 .IX Item "make distdir" Copies all the files that are in the MANIFEST 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 META.yml and META.json module meta-data file in the distdir and add this to the distdir's MANIFEST. You can shut this behavior off with the NO_META 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 $(PREOP) which defaults to a null command, followed by $(TO_UNIX), which defaults to a null command under UNIX, and will convert files in distribution directory to UNIX 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 $(POSTOP) which defaults to a null command. .IP "make dist" 4 .IX Item "make dist" Defaults to $(DIST_DEFAULT) 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 $(PREOP) 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 $(POSTOP) 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 $(PREOP) 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 $(POSTOP) which defaults to a null command. .IP "make ci" 4 .IX Item "make ci" Does a $(CI) and a $(RCS_LABEL) on all files in the MANIFEST 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 (META and MYMETA)" .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 CPAN Meta files distributed with each distribution. .PP The original format of CPAN Meta files was YAML and the corresponding file was called \fIMETA.yml\fR. In 2010, version 2 of the CPAN::Meta::Spec was released, which mandates JSON format for the metadata in order to overcome certain compatibility issues between YAML 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 \&\fIMETA.json\fR and \fIMETA.yml\fR files for you and add them to your \fIMANIFEST\fR as part of the 'distdir' target (and thus the 'dist' target). This is intended to seamlessly and rapidly populate CPAN with module meta-data. If you wish to shut this feature off, set the \f(CW\*(C`NO_META\*(C'\fR \f(CWWriteMakefile()\fR flag to true. .PP At the 2008 QA Hackathon in Oslo, Perl module toolchain maintainers agreed to use the CPAN Meta format to communicate post-configuration requirements between toolchain components. These files, \fIMYMETA.json\fR and \fIMYMETA.yml\fR, are generated when \fIMakefile.PL\fR generates a \fIMakefile\fR (if CPAN::Meta is installed). Clients like CPAN or CPANPLUS 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(CWWriteMakefile()\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 "usual" build targets. To do so, use .PP .Vb 2 \& use ExtUtils::MakeMaker qw(WriteEmptyMakefile); \& WriteEmptyMakefile(); .Ve .PP instead of \fBWriteMakefile()\fR. .PP This may be useful if other modules expect this module to be \fIbuilt\fR OK, as opposed to \fIwork\fR OK (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(CWprompt()\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(CWprompt()\fR detects that it is not running interactively and there is nothing on STDIN or if the PERL_MM_USE_DEFAULT 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(CWos_unsupported()\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 "OS unsupported". .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 PERL_MM_OPT 4 .IX Item "PERL_MM_OPT" Command line options used by \f(CW\*(C`MakeMaker\->new()\*(C'\fR, and thus by \&\f(CWWriteMakefile()\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 PERL_MM_USE_DEFAULT 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 PERL_CORE 4 .IX Item "PERL_CORE" Same as the PERL_CORE 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 may be easier to extend to suit your needs. .PP Module::Build::Tiny is a minimal pure-Perl alternative to MakeMaker that follows the Build.PL protocol of Module::Build but without its complexity and cruft, implementing only the installation of the module and leaving authoring to mbtiny or other authoring tools. .PP Module::Install is a (now discouraged) 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 CPAN 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. Test::File::ShareDir helps when writing tests to use the shared files both before and after installation. .PP Dist::Zilla is an authoring tool which allows great customization and extensibility of the author experience, relying on the existing install tools like ExtUtils::MakeMaker only for installation. .PP Dist::Milla is a Dist::Zilla bundle that greatly simplifies common usage. .PP Minilla is a minimal authoring tool that does the same things as Dist::Milla without the overhead of Dist::Zilla. .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. VMS support by Charles Bailey \f(CW\*(C`bailey@newman.upenn.edu\*(C'\fR. OS/2 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 . .PP Repository available at . .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