makemaker.html
来自「perl教程」· HTML 代码 · 共 1,694 行 · 第 1/5 页
HTML
1,694 行
</dd>
</li>
<dt><strong><a name="item_perl">PERL</a></strong>
<dd>
<p>Perl binary for tasks that can be done by miniperl</p>
</dd>
</li>
<dt><strong><a name="item_perl_core">PERL_CORE</a></strong>
<dd>
<p>Set only when MakeMaker is building the extensions of the Perl core
distribution.</p>
</dd>
</li>
<dt><strong><a name="item_perlmaincc">PERLMAINCC</a></strong>
<dd>
<p>The call to the program that is able to compile perlmain.c. Defaults
to $(CC).</p>
</dd>
</li>
<dt><strong><a name="item_perl_archlib">PERL_ARCHLIB</a></strong>
<dd>
<p>Same as for PERL_LIB, but for architecture dependent files.</p>
</dd>
<dd>
<p>Used only when MakeMaker is building the extensions of the Perl core
distribution (because normally $(PERL_ARCHLIB) is automatically in @INC,
and adding it would get in the way of PERL5LIB).</p>
</dd>
</li>
<dt><strong><a name="item_perl_lib">PERL_LIB</a></strong>
<dd>
<p>Directory containing the Perl library to use.</p>
</dd>
<dd>
<p>Used only when MakeMaker is building the extensions of the Perl core
distribution (because normally $(PERL_LIB) is automatically in @INC,
and adding it would get in the way of PERL5LIB).</p>
</dd>
</li>
<dt><strong><a name="item_perl_malloc_ok">PERL_MALLOC_OK</a></strong>
<dd>
<p>defaults to 0. Should be set to TRUE if the extension can work with
the memory allocation routines substituted by the Perl <code>malloc()</code> subsystem.
This should be applicable to most extensions with exceptions of those</p>
</dd>
<ul>
<li>
<p>with bugs in memory allocations which are caught by Perl's malloc();</p>
</li>
<li>
<p>which interact with the memory allocator in other ways than via
malloc(), realloc(), free(), calloc(), <code>sbrk()</code> and brk();</p>
</li>
<li>
<p>which rely on special alignment which is not provided by Perl's malloc().</p>
</li>
</ul>
<p><strong>NOTE.</strong> Negligence to set this flag in <em>any one</em> of loaded extension
nullifies many advantages of Perl's malloc(), such as better usage of
system resources, error detection, memory usage reporting, catchable failure
of memory allocations, etc.</p>
<dt><strong><a name="item_perlprefix">PERLPREFIX</a></strong>
<dd>
<p>Directory under which core modules are to be installed.</p>
</dd>
<dd>
<p>Defaults to $Config{installprefixexp} falling back to
$Config{installprefix}, $Config{prefixexp} or $Config{prefix} should
$Config{installprefixexp} not exist.</p>
</dd>
<dd>
<p>Overridden by PREFIX.</p>
</dd>
</li>
<dt><strong><a name="item_perlrun">PERLRUN</a></strong>
<dd>
<p>Use this instead of $(PERL) when you wish to run perl. It will set up
extra necessary flags for you.</p>
</dd>
</li>
<dt><strong><a name="item_perlruninst">PERLRUNINST</a></strong>
<dd>
<p>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.</p>
</dd>
</li>
<dt><strong><a name="item_perl_src">PERL_SRC</a></strong>
<dd>
<p>Directory containing the Perl source code (use of this should be
avoided, it may be undefined)</p>
</dd>
</li>
<dt><strong><a name="item_perm_rw">PERM_RW</a></strong>
<dd>
<p>Desired permission for read/writable files. Defaults to <code>644</code>.
See also <a href="../../lib/ExtUtils/MM_Unix.html#perm_rw">perm_rw in the MM_Unix manpage</a>.</p>
</dd>
</li>
<dt><strong><a name="item_perm_rwx">PERM_RWX</a></strong>
<dd>
<p>Desired permission for executable files. Defaults to <code>755</code>.
See also <a href="../../lib/ExtUtils/MM_Unix.html#perm_rwx">perm_rwx in the MM_Unix manpage</a>.</p>
</dd>
</li>
<dt><strong><a name="item_pl_files">PL_FILES</a></strong>
<dd>
<p>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...</p>
</dd>
<dd>
<pre>
perl foo.PL foo</pre>
</dd>
<dd>
<p>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.</p>
</dd>
<dd>
<pre>
<span class="string">PL_FILES</span> <span class="operator">=></span> <span class="operator">{</span><span class="string">'bin/foobar.PL'</span> <span class="operator">=></span> <span class="string">'bin/foobar'</span><span class="operator">}</span>
</pre>
</dd>
<dd>
<p>Would run bin/foobar.PL like this:</p>
</dd>
<dd>
<pre>
perl bin/foobar.PL bin/foobar</pre>
</dd>
<dd>
<p>If multiple files from one program are desired an array ref can be used.</p>
</dd>
<dd>
<pre>
<span class="string">PL_FILES</span> <span class="operator">=></span> <span class="operator">{</span><span class="string">'bin/foobar.PL'</span> <span class="operator">=></span> <span class="operator">[</span><span class="string">qw(bin/foobar1 bin/foobar2)</span><span class="operator">]}</span>
</pre>
</dd>
<dd>
<p>In this case the program will be run multiple times using each target file.</p>
</dd>
<dd>
<pre>
perl bin/foobar.PL bin/foobar1
perl bin/foobar.PL bin/foobar2</pre>
</dd>
<dd>
<p>PL files are normally run <strong>after</strong> pm_to_blib and include INST_LIB and
INST_ARCH in its <a href="../../lib/Pod/perlvar.html#item__inc"><code>@INC</code></a> 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 <strong>before</strong> pm_to_blib and does not include
INST_LIB and INST_ARCH in its <a href="../../lib/Pod/perlvar.html#item__inc"><code>@INC</code></a>. This apparently odd behavior
is there for backwards compatibility (and its somewhat DWIM).</p>
</dd>
</li>
<dt><strong><a name="item_pm">PM</a></strong>
<dd>
<p>Hashref of .pm files and *.pl files to be installed. e.g.</p>
</dd>
<dd>
<pre>
<span class="operator">{</span><span class="string">'name_of_file.pm'</span> <span class="operator">=></span> <span class="string">'$(INST_LIBDIR)/install_as.pm'</span><span class="operator">}</span>
</pre>
</dd>
<dd>
<p>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.</p>
</dd>
</li>
<dt><strong><a name="item_pmlibdirs">PMLIBDIRS</a></strong>
<dd>
<p>Ref to array of subdirectories containing library files. Defaults to
[ 'lib', $(BASEEXT) ]. The directories will be scanned and <em>any</em> files
they contain will be installed in the corresponding location in the
library. A <code>libscan()</code> method can be used to alter the behaviour.
Defining PM in the Makefile.PL will override PMLIBDIRS.</p>
</dd>
<dd>
<p>(Where BASEEXT is the last component of NAME.)</p>
</dd>
</li>
<dt><strong><a name="item_pm_filter">PM_FILTER</a></strong>
<dd>
<p>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
<code>pm_to_blib()</code> phase). It is empty by default, meaning no filtering is done.</p>
</dd>
<dd>
<p>Great care is necessary when defining the command if quoting needs to be
done. For instance, you would need to say:</p>
</dd>
<dd>
<pre>
<span class="operator">{</span><span class="string">'PM_FILTER'</span> <span class="operator">=></span> <span class="string">'grep -v \\"^\\#\\"'</span><span class="operator">}</span>
</pre>
</dd>
<dd>
<p>to remove all the leading coments on the fly during the build. The
extra \\ 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:</p>
</dd>
<dd>
<pre>
PM_FILTER = grep -v \"^\#\"</pre>
</dd>
<dd>
<p>Without the \\ before the #, we'd have the start of a Makefile comment,
and the macro would be incorrectly defined.</p>
</dd>
</li>
<dt><strong><a name="item_pollute">POLLUTE</a></strong>
<dd>
<p>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 POLLUTE flag
specifies that the old names should still be defined:</p>
</dd>
<dd>
<pre>
perl Makefile.PL POLLUTE=1</pre>
</dd>
<dd>
<p>Please inform the module author if this is necessary to successfully install
a module under 5.6 or later.</p>
</dd>
</li>
<dt><strong><a name="item_ppm_install_exec">PPM_INSTALL_EXEC</a></strong>
<dd>
<p>Name of the executable used to run <a href="#item_ppm_install_script"><code>PPM_INSTALL_SCRIPT</code></a> below. (e.g. perl)</p>
</dd>
</li>
<dt><strong><a name="item_ppm_install_script">PPM_INSTALL_SCRIPT</a></strong>
<dd>
<p>Name of the script that gets executed by the Perl Package Manager after
the installation of a package.</p>
</dd>
</li>
<dt><strong><a name="item_prefix">PREFIX</a></strong>
<dd>
<p>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.</p>
</dd>
<dd>
<p>If you specify LIB or any INSTALL* variables they will not be effected
by the PREFIX.</p>
</dd>
</li>
<dt><strong><a name="item_prereq_fatal">PREREQ_FATAL</a></strong>
<dd>
<p>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.</p>
</dd>
<dd>
<p>Note: see <a href="../../lib/Test/Harness.html">the Test::Harness manpage</a> for a shortcut for stopping tests early if
you are missing dependencies.</p>
</dd>
<dd>
<p>Do <em>not</em> use this parameter for simple requirements, which could be resolved
at a later time, e.g. after an unsuccessful <strong>make test</strong> of your module.</p>
</dd>
<dd>
<p>It is <em>extremely</em> rare to have to use <a href="#item_prereq_fatal"><code>PREREQ_FATAL</code></a> at all!</p>
</dd>
</li>
<dt><strong><a name="item_prereq_pm">PREREQ_PM</a></strong>
<dd>
<p>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.</p>
</dd>
</li>
<dt><strong><a name="item_prereq_print">PREREQ_PRINT</a></strong>
<dd>
<p>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.</p>
</dd>
<dd>
<p>$PREREQ_PM = {
'A::B' => Vers1,
'C::D' => Vers2,
...
};</p>
</dd>
</li>
<dt><strong><a name="item_print_prereq">PRINT_PREREQ</a></strong>
<dd>
<p>RedHatism for <a href="#item_prereq_print"><code>PREREQ_PRINT</code></a>. The output format is different, though:</p>
</dd>
<dd>
<pre>
perl(A::B)>=Vers1 perl(C::D)>=Vers2 ...</pre>
</dd>
</li>
<dt><strong><a name="item_siteprefix">SITEPREFIX</a></strong>
<dd>
<p>Like PERLPREFIX, but only for the site install locations.</p>
</dd>
<dd>
<p>Defaults to $Config{siteprefixexp}. Perls prior to 5.6.0 didn't have
an explicit siteprefix in the Config. In those cases
$Config{installprefix} will be used.</p>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?