Add built local::lib
[catagits/Gitalist.git] / local-lib5 / man / man3 / ExtUtils::MakeMaker.3pm
1 .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sh \" Subsection heading
6 .br
7 .if t .Sp
8 .ne 5
9 .PP
10 \fB\\$1\fR
11 .PP
12 ..
13 .de Sp \" Vertical space (when we can't use .PP)
14 .if t .sp .5v
15 .if n .sp
16 ..
17 .de Vb \" Begin verbatim text
18 .ft CW
19 .nf
20 .ne \\$1
21 ..
22 .de Ve \" End verbatim text
23 .ft R
24 .fi
25 ..
26 .\" Set up some character translations and predefined strings.  \*(-- will
27 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28 .\" double quote, and \*(R" will give a right double quote.  | will give a
29 .\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
30 .\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
31 .\" expand to `' in nroff, nothing in troff, for use with C<>.
32 .tr \(*W-|\(bv\*(Tr
33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34 .ie n \{\
35 .    ds -- \(*W-
36 .    ds PI pi
37 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
39 .    ds L" ""
40 .    ds R" ""
41 .    ds C` ""
42 .    ds C' ""
43 'br\}
44 .el\{\
45 .    ds -- \|\(em\|
46 .    ds PI \(*p
47 .    ds L" ``
48 .    ds R" ''
49 'br\}
50 .\"
51 .\" If the F register is turned on, we'll generate index entries on stderr for
52 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53 .\" entries marked with X<> in POD.  Of course, you'll have to process the
54 .\" output yourself in some meaningful fashion.
55 .if \nF \{\
56 .    de IX
57 .    tm Index:\\$1\t\\n%\t"\\$2"
58 ..
59 .    nr % 0
60 .    rr F
61 .\}
62 .\"
63 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
64 .\" way too many mistakes in technical documents.
65 .hy 0
66 .if n .na
67 .\"
68 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
70 .    \" fudge factors for nroff and troff
71 .if n \{\
72 .    ds #H 0
73 .    ds #V .8m
74 .    ds #F .3m
75 .    ds #[ \f1
76 .    ds #] \fP
77 .\}
78 .if t \{\
79 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80 .    ds #V .6m
81 .    ds #F 0
82 .    ds #[ \&
83 .    ds #] \&
84 .\}
85 .    \" simple accents for nroff and troff
86 .if n \{\
87 .    ds ' \&
88 .    ds ` \&
89 .    ds ^ \&
90 .    ds , \&
91 .    ds ~ ~
92 .    ds /
93 .\}
94 .if t \{\
95 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101 .\}
102 .    \" troff and (daisy-wheel) nroff accents
103 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110 .ds ae a\h'-(\w'a'u*4/10)'e
111 .ds Ae A\h'-(\w'A'u*4/10)'E
112 .    \" corrections for vroff
113 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115 .    \" for low resolution devices (crt and lpr)
116 .if \n(.H>23 .if \n(.V>19 \
117 \{\
118 .    ds : e
119 .    ds 8 ss
120 .    ds o a
121 .    ds d- d\h'-1'\(ga
122 .    ds D- D\h'-1'\(hy
123 .    ds th \o'bp'
124 .    ds Th \o'LP'
125 .    ds ae ae
126 .    ds Ae AE
127 .\}
128 .rm #[ #] #H #V #F C
129 .\" ========================================================================
130 .\"
131 .IX Title "ExtUtils::MakeMaker 3"
132 .TH ExtUtils::MakeMaker 3 "2009-07-07" "perl v5.8.7" "User Contributed Perl Documentation"
133 .SH "NAME"
134 ExtUtils::MakeMaker \- Create a module Makefile
135 .SH "SYNOPSIS"
136 .IX Header "SYNOPSIS"
137 .Vb 1
138 \&  use ExtUtils::MakeMaker;
139 .Ve
140 .PP
141 .Vb 1
142 \&  WriteMakefile( ATTRIBUTE => VALUE [, ...] );
143 .Ve
144 .SH "DESCRIPTION"
145 .IX Header "DESCRIPTION"
146 This utility is designed to write a Makefile for an extension module
147 from a Makefile.PL. It is based on the Makefile.SH model provided by
148 Andy Dougherty and the perl5\-porters.
149 .PP
150 It splits the task of generating the Makefile into several subroutines
151 that can be individually overridden.  Each subroutine returns the text
152 it wishes to have written to the Makefile.
153 .PP
154 MakeMaker is object oriented. Each directory below the current
155 directory that contains a Makefile.PL is treated as a separate
156 object. This makes it possible to write an unlimited number of
157 Makefiles with a single invocation of \fIWriteMakefile()\fR.
158 .Sh "How To Write A Makefile.PL"
159 .IX Subsection "How To Write A Makefile.PL"
160 See ExtUtils::MakeMaker::Tutorial.
161 .PP
162 The long answer is the rest of the manpage :\-)
163 .Sh "Default Makefile Behaviour"
164 .IX Subsection "Default Makefile Behaviour"
165 The generated Makefile enables the user of the extension to invoke
166 .PP
167 .Vb 4
168 \&  perl Makefile.PL # optionally "perl Makefile.PL verbose"
169 \&  make
170 \&  make test        # optionally set TEST_VERBOSE=1
171 \&  make install     # See below
172 .Ve
173 .PP
174 The Makefile to be produced may be altered by adding arguments of the
175 form \f(CW\*(C`KEY=VALUE\*(C'\fR. E.g.
176 .PP
177 .Vb 1
178 \&  perl Makefile.PL INSTALL_BASE=~
179 .Ve
180 .PP
181 Other interesting targets in the generated Makefile are
182 .PP
183 .Vb 5
184 \&  make config     # to check if the Makefile is up\-to\-date
185 \&  make clean      # delete local temp files (Makefile gets renamed)
186 \&  make realclean  # delete derived files (including ./blib)
187 \&  make ci         # check in all the files in the MANIFEST file
188 \&  make dist       # see below the Distribution Support section
189 .Ve
190 .Sh "make test"
191 .IX Subsection "make test"
192 MakeMaker checks for the existence of a file named \fItest.pl\fR in the
193 current directory and if it exists it execute the script with the
194 proper set of perl \f(CW\*(C`\-I\*(C'\fR options.
195 .PP
196 MakeMaker also checks for any files matching glob(\*(L"t/*.t\*(R"). It will
197 execute all matching files in alphabetical order via the
198 Test::Harness module with the \f(CW\*(C`\-I\*(C'\fR switches set correctly.
199 .PP
200 If you'd like to see the raw output of your tests, set the
201 \&\f(CW\*(C`TEST_VERBOSE\*(C'\fR variable to true.
202 .PP
203 .Vb 1
204 \&  make test TEST_VERBOSE=1
205 .Ve
206 .Sh "make testdb"
207 .IX Subsection "make testdb"
208 A useful variation of the above is the target \f(CW\*(C`testdb\*(C'\fR. It runs the
209 test under the Perl debugger (see perldebug). If the file
210 \&\fItest.pl\fR exists in the current directory, it is used for the test.
211 .PP
212 If you want to debug some other testfile, set the \f(CW\*(C`TEST_FILE\*(C'\fR variable
213 thusly:
214 .PP
215 .Vb 1
216 \&  make testdb TEST_FILE=t/mytest.t
217 .Ve
218 .PP
219 By default the debugger is called using \f(CW\*(C`\-d\*(C'\fR option to perl. If you
220 want to specify some other option, set the \f(CW\*(C`TESTDB_SW\*(C'\fR variable:
221 .PP
222 .Vb 1
223 \&  make testdb TESTDB_SW=\-Dx
224 .Ve
225 .Sh "make install"
226 .IX Subsection "make install"
227 make alone puts all relevant files into directories that are named by
228 the macros \s-1INST_LIB\s0, \s-1INST_ARCHLIB\s0, \s-1INST_SCRIPT\s0, \s-1INST_MAN1DIR\s0 and
229 \&\s-1INST_MAN3DIR\s0.  All these default to something below ./blib if you are
230 \&\fInot\fR building below the perl source directory. If you \fIare\fR
231 building below the perl source, \s-1INST_LIB\s0 and \s-1INST_ARCHLIB\s0 default to
232 \&../../lib, and \s-1INST_SCRIPT\s0 is not defined.
233 .PP
234 The \fIinstall\fR target of the generated Makefile copies the files found
235 below each of the INST_* directories to their INSTALL*
236 counterparts. Which counterparts are chosen depends on the setting of
237 \&\s-1INSTALLDIRS\s0 according to the following table:
238 .PP
239 .Vb 2
240 \&                                 INSTALLDIRS set to
241 \&                           perl        site          vendor
242 .Ve
243 .PP
244 .Vb 7
245 \&                 PERLPREFIX      SITEPREFIX          VENDORPREFIX
246 \&  INST_ARCHLIB   INSTALLARCHLIB  INSTALLSITEARCH     INSTALLVENDORARCH
247 \&  INST_LIB       INSTALLPRIVLIB  INSTALLSITELIB      INSTALLVENDORLIB
248 \&  INST_BIN       INSTALLBIN      INSTALLSITEBIN      INSTALLVENDORBIN
249 \&  INST_SCRIPT    INSTALLSCRIPT   INSTALLSITESCRIPT   INSTALLVENDORSCRIPT
250 \&  INST_MAN1DIR   INSTALLMAN1DIR  INSTALLSITEMAN1DIR  INSTALLVENDORMAN1DIR
251 \&  INST_MAN3DIR   INSTALLMAN3DIR  INSTALLSITEMAN3DIR  INSTALLVENDORMAN3DIR
252 .Ve
253 .PP
254 The \s-1INSTALL\s0... macros in turn default to their \f(CW%Config\fR
255 ($Config{installprivlib}, \f(CW$Config\fR{installarchlib}, etc.) counterparts.
256 .PP
257 You can check the values of these variables on your system with
258 .PP
259 .Vb 1
260 \&    perl '\-V:install.*'
261 .Ve
262 .PP
263 And to check the sequence in which the library directories are
264 searched by perl, run
265 .PP
266 .Vb 1
267 \&    perl \-le 'print join $/, @INC'
268 .Ve
269 .PP
270 Sometimes older versions of the module you're installing live in other
271 directories in \f(CW@INC\fR.  Because Perl loads the first version of a module it 
272 finds, not the newest, you might accidentally get one of these older
273 versions even after installing a brand new version.  To delete \fIall other
274 versions of the module you're installing\fR (not simply older ones) set the
275 \&\f(CW\*(C`UNINST\*(C'\fR variable.
276 .PP
277 .Vb 1
278 \&    make install UNINST=1
279 .Ve
280 .Sh "\s-1INSTALL_BASE\s0"
281 .IX Subsection "INSTALL_BASE"
282 \&\s-1INSTALL_BASE\s0 can be passed into Makefile.PL to change where your
283 module will be installed.  \s-1INSTALL_BASE\s0 is more like what everyone
284 else calls \*(L"prefix\*(R" than \s-1PREFIX\s0 is.
285 .PP
286 To have everything installed in your home directory, do the following.
287 .PP
288 .Vb 2
289 \&    # Unix users, INSTALL_BASE=~ works fine
290 \&    perl Makefile.PL INSTALL_BASE=/path/to/your/home/dir
291 .Ve
292 .PP
293 Like \s-1PREFIX\s0, it sets several INSTALL* attributes at once.  Unlike
294 \&\s-1PREFIX\s0 it is easy to predict where the module will end up.  The
295 installation pattern looks like this:
296 .PP
297 .Vb 6
298 \&    INSTALLARCHLIB     INSTALL_BASE/lib/perl5/$Config{archname}
299 \&    INSTALLPRIVLIB     INSTALL_BASE/lib/perl5
300 \&    INSTALLBIN         INSTALL_BASE/bin
301 \&    INSTALLSCRIPT      INSTALL_BASE/bin
302 \&    INSTALLMAN1DIR     INSTALL_BASE/man/man1
303 \&    INSTALLMAN3DIR     INSTALL_BASE/man/man3
304 .Ve
305 .PP
306 \&\s-1INSTALL_BASE\s0 in MakeMaker and \f(CW\*(C`\-\-install_base\*(C'\fR in Module::Build (as
307 of 0.28) install to the same location.  If you want MakeMaker and
308 Module::Build to install to the same location simply set \s-1INSTALL_BASE\s0
309 and \f(CW\*(C`\-\-install_base\*(C'\fR to the same location.
310 .PP
311 \&\s-1INSTALL_BASE\s0 was added in 6.31.
312 .Sh "\s-1PREFIX\s0 and \s-1LIB\s0 attribute"
313 .IX Subsection "PREFIX and LIB attribute"
314 \&\s-1PREFIX\s0 and \s-1LIB\s0 can be used to set several INSTALL* attributes in one
315 go.  Here's an example for installing into your home directory.
316 .PP
317 .Vb 2
318 \&    # Unix users, PREFIX=~ works fine
319 \&    perl Makefile.PL PREFIX=/path/to/your/home/dir
320 .Ve
321 .PP
322 This will install all files in the module under your home directory,
323 with man pages and libraries going into an appropriate place (usually
324 ~/man and ~/lib).  How the exact location is determined is complicated
325 and depends on how your Perl was configured.  \s-1INSTALL_BASE\s0 works more
326 like what other build systems call \*(L"prefix\*(R" than \s-1PREFIX\s0 and we
327 recommend you use that instead.
328 .PP
329 Another way to specify many \s-1INSTALL\s0 directories with a single
330 parameter is \s-1LIB\s0.
331 .PP
332 .Vb 1
333 \&    perl Makefile.PL LIB=~/lib
334 .Ve
335 .PP
336 This will install the module's architecture-independent files into
337 ~/lib, the architecture-dependent files into ~/lib/$archname.
338 .PP
339 Note, that in both cases the tilde expansion is done by MakeMaker, not
340 by perl by default, nor by make.
341 .PP
342 Conflicts between parameters \s-1LIB\s0, \s-1PREFIX\s0 and the various INSTALL*
343 arguments are resolved so that:
344 .IP "\(bu" 4
345 setting \s-1LIB\s0 overrides any setting of \s-1INSTALLPRIVLIB\s0, \s-1INSTALLARCHLIB\s0,
346 \&\s-1INSTALLSITELIB\s0, \s-1INSTALLSITEARCH\s0 (and they are not affected by \s-1PREFIX\s0);
347 .IP "\(bu" 4
348 without \s-1LIB\s0, setting \s-1PREFIX\s0 replaces the initial \f(CW$Config{prefix}\fR
349 part of those INSTALL* arguments, even if the latter are explicitly
350 set (but are set to still start with \f(CW$Config{prefix}\fR).
351 .PP
352 If the user has superuser privileges, and is not working on \s-1AFS\s0 or
353 relatives, then the defaults for \s-1INSTALLPRIVLIB\s0, \s-1INSTALLARCHLIB\s0,
354 \&\s-1INSTALLSCRIPT\s0, etc. will be appropriate, and this incantation will be
355 the best:
356 .PP
357 .Vb 4
358 \&    perl Makefile.PL; 
359 \&    make; 
360 \&    make test
361 \&    make install
362 .Ve
363 .PP
364 make install per default writes some documentation of what has been
365 done into the file \f(CW\*(C`$(INSTALLARCHLIB)/perllocal.pod\*(C'\fR. This feature
366 can be bypassed by calling make pure_install.
367 .Sh "\s-1AFS\s0 users"
368 .IX Subsection "AFS users"
369 will have to specify the installation directories as these most
370 probably have changed since perl itself has been installed. They will
371 have to do this by calling
372 .PP
373 .Vb 3
374 \&    perl Makefile.PL INSTALLSITELIB=/afs/here/today \e
375 \&        INSTALLSCRIPT=/afs/there/now INSTALLMAN3DIR=/afs/for/manpages
376 \&    make
377 .Ve
378 .PP
379 Be careful to repeat this procedure every time you recompile an
380 extension, unless you are sure the \s-1AFS\s0 installation directories are
381 still valid.
382 .Sh "Static Linking of a new Perl Binary"
383 .IX Subsection "Static Linking of a new Perl Binary"
384 An extension that is built with the above steps is ready to use on
385 systems supporting dynamic loading. On systems that do not support
386 dynamic loading, any newly created extension has to be linked together
387 with the available resources. MakeMaker supports the linking process
388 by creating appropriate targets in the Makefile whenever an extension
389 is built. You can invoke the corresponding section of the makefile with
390 .PP
391 .Vb 1
392 \&    make perl
393 .Ve
394 .PP
395 That produces a new perl binary in the current directory with all
396 extensions linked in that can be found in \s-1INST_ARCHLIB\s0, \s-1SITELIBEXP\s0,
397 and \s-1PERL_ARCHLIB\s0. To do that, MakeMaker writes a new Makefile, on
398 \&\s-1UNIX\s0, this is called Makefile.aperl (may be system dependent). If you
399 want to force the creation of a new perl, it is recommended, that you
400 delete this Makefile.aperl, so the directories are searched-through
401 for linkable libraries again.
402 .PP
403 The binary can be installed into the directory where perl normally
404 resides on your machine with
405 .PP
406 .Vb 1
407 \&    make inst_perl
408 .Ve
409 .PP
410 To produce a perl binary with a different name than \f(CW\*(C`perl\*(C'\fR, either say
411 .PP
412 .Vb 3
413 \&    perl Makefile.PL MAP_TARGET=myperl
414 \&    make myperl
415 \&    make inst_perl
416 .Ve
417 .PP
418 or say
419 .PP
420 .Vb 3
421 \&    perl Makefile.PL
422 \&    make myperl MAP_TARGET=myperl
423 \&    make inst_perl MAP_TARGET=myperl
424 .Ve
425 .PP
426 In any case you will be prompted with the correct invocation of the
427 \&\f(CW\*(C`inst_perl\*(C'\fR target that installs the new binary into \s-1INSTALLBIN\s0.
428 .PP
429 make inst_perl per default writes some documentation of what has been
430 done into the file \f(CW\*(C`$(INSTALLARCHLIB)/perllocal.pod\*(C'\fR. This
431 can be bypassed by calling make pure_inst_perl.
432 .PP
433 Warning: the inst_perl: target will most probably overwrite your
434 existing perl binary. Use with care!
435 .PP
436 Sometimes you might want to build a statically linked perl although
437 your system supports dynamic loading. In this case you may explicitly
438 set the linktype with the invocation of the Makefile.PL or make:
439 .PP
440 .Vb 1
441 \&    perl Makefile.PL LINKTYPE=static    # recommended
442 .Ve
443 .PP
444 or
445 .PP
446 .Vb 1
447 \&    make LINKTYPE=static                # works on most systems
448 .Ve
449 .Sh "Determination of Perl Library and Installation Locations"
450 .IX Subsection "Determination of Perl Library and Installation Locations"
451 MakeMaker needs to know, or to guess, where certain things are
452 located.  Especially \s-1INST_LIB\s0 and \s-1INST_ARCHLIB\s0 (where to put the files
453 during the \fImake\fR\|(1) run), \s-1PERL_LIB\s0 and \s-1PERL_ARCHLIB\s0 (where to read
454 existing modules from), and \s-1PERL_INC\s0 (header files and \f(CW\*(C`libperl*.*\*(C'\fR).
455 .PP
456 Extensions may be built either using the contents of the perl source
457 directory tree or from the installed perl library. The recommended way
458 is to build extensions after you have run 'make install' on perl
459 itself. You can do that in any directory on your hard disk that is not
460 below the perl source tree. The support for extensions below the ext
461 directory of the perl distribution is only good for the standard
462 extensions that come with perl.
463 .PP
464 If an extension is being built below the \f(CW\*(C`ext/\*(C'\fR directory of the perl
465 source then MakeMaker will set \s-1PERL_SRC\s0 automatically (e.g.,
466 \&\f(CW\*(C`../..\*(C'\fR).  If \s-1PERL_SRC\s0 is defined and the extension is recognized as
467 a standard extension, then other variables default to the following:
468 .PP
469 .Vb 5
470 \&  PERL_INC     = PERL_SRC
471 \&  PERL_LIB     = PERL_SRC/lib
472 \&  PERL_ARCHLIB = PERL_SRC/lib
473 \&  INST_LIB     = PERL_LIB
474 \&  INST_ARCHLIB = PERL_ARCHLIB
475 .Ve
476 .PP
477 If an extension is being built away from the perl source then MakeMaker
478 will leave \s-1PERL_SRC\s0 undefined and default to using the installed copy
479 of the perl library. The other variables default to the following:
480 .PP
481 .Vb 5
482 \&  PERL_INC     = $archlibexp/CORE
483 \&  PERL_LIB     = $privlibexp
484 \&  PERL_ARCHLIB = $archlibexp
485 \&  INST_LIB     = ./blib/lib
486 \&  INST_ARCHLIB = ./blib/arch
487 .Ve
488 .PP
489 If perl has not yet been installed then \s-1PERL_SRC\s0 can be defined on the
490 command line as shown in the previous section.
491 .Sh "Which architecture dependent directory?"
492 .IX Subsection "Which architecture dependent directory?"
493 If you don't want to keep the defaults for the INSTALL* macros,
494 MakeMaker helps you to minimize the typing needed: the usual
495 relationship between \s-1INSTALLPRIVLIB\s0 and \s-1INSTALLARCHLIB\s0 is determined
496 by Configure at perl compilation time. MakeMaker supports the user who
497 sets \s-1INSTALLPRIVLIB\s0. If \s-1INSTALLPRIVLIB\s0 is set, but \s-1INSTALLARCHLIB\s0 not,
498 then MakeMaker defaults the latter to be the same subdirectory of
499 \&\s-1INSTALLPRIVLIB\s0 as Configure decided for the counterparts in \f(CW%Config\fR ,
500 otherwise it defaults to \s-1INSTALLPRIVLIB\s0. The same relationship holds
501 for \s-1INSTALLSITELIB\s0 and \s-1INSTALLSITEARCH\s0.
502 .PP
503 MakeMaker gives you much more freedom than needed to configure
504 internal variables and get different results. It is worth to mention,
505 that \fImake\fR\|(1) also lets you configure most of the variables that are
506 used in the Makefile. But in the majority of situations this will not
507 be necessary, and should only be done if the author of a package
508 recommends it (or you know what you're doing).
509 .Sh "Using Attributes and Parameters"
510 .IX Subsection "Using Attributes and Parameters"
511 The following attributes may be specified as arguments to \fIWriteMakefile()\fR
512 or as NAME=VALUE pairs on the command line.
513 .IP "\s-1ABSTRACT\s0" 2
514 .IX Item "ABSTRACT"
515 One line description of the module. Will be included in \s-1PPD\s0 file.
516 .IP "\s-1ABSTRACT_FROM\s0" 2
517 .IX Item "ABSTRACT_FROM"
518 Name of the file that contains the package description. MakeMaker looks
519 for a line in the \s-1POD\s0 matching /^($package\es\-\es)(.*)/. This is typically
520 the first line in the \*(L"=head1 \s-1NAME\s0\*(R" section. \f(CW$2\fR becomes the abstract.
521 .IP "\s-1AUTHOR\s0" 2
522 .IX Item "AUTHOR"
523 String containing name (and email address) of package author(s). Is used
524 in \s-1PPD\s0 (Perl Package Description) files for \s-1PPM\s0 (Perl Package Manager).
525 .IP "\s-1BINARY_LOCATION\s0" 2
526 .IX Item "BINARY_LOCATION"
527 Used when creating \s-1PPD\s0 files for binary packages.  It can be set to a
528 full or relative path or \s-1URL\s0 to the binary archive for a particular
529 architecture.  For example:
530 .Sp
531 .Vb 1
532 \&        perl Makefile.PL BINARY_LOCATION=x86/Agent.tar.gz
533 .Ve
534 .Sp
535 builds a \s-1PPD\s0 package that references a binary of the \f(CW\*(C`Agent\*(C'\fR package,
536 located in the \f(CW\*(C`x86\*(C'\fR directory relative to the \s-1PPD\s0 itself.
537 .IP "C" 2
538 .IX Item "C"
539 Ref to array of *.c file names. Initialised from a directory scan
540 and the values portion of the \s-1XS\s0 attribute hash. This is not
541 currently used by MakeMaker but may be handy in Makefile.PLs.
542 .IP "\s-1CCFLAGS\s0" 2
543 .IX Item "CCFLAGS"
544 String that will be included in the compiler call command line between
545 the arguments \s-1INC\s0 and \s-1OPTIMIZE\s0.
546 .IP "\s-1CONFIG\s0" 2
547 .IX Item "CONFIG"
548 Arrayref. E.g. [qw(archname manext)] defines \s-1ARCHNAME\s0 & \s-1MANEXT\s0 from
549 config.sh. MakeMaker will add to \s-1CONFIG\s0 the following values anyway:
550 ar
551 cc
552 cccdlflags
553 ccdlflags
554 dlext
555 dlsrc
556 ld
557 lddlflags
558 ldflags
559 libc
560 lib_ext
561 obj_ext
562 ranlib
563 sitelibexp
564 sitearchexp
565 so
566 .IP "\s-1CONFIGURE\s0" 2
567 .IX Item "CONFIGURE"
568 \&\s-1CODE\s0 reference. The subroutine should return a hash reference. The
569 hash may contain further attributes, e.g. {\s-1LIBS\s0 => ...}, that have to
570 be determined by some evaluation method.
571 .IP "\s-1CONFIGURE_REQUIRES\s0" 2
572 .IX Item "CONFIGURE_REQUIRES"
573 A hash of modules that are required to run Makefile.PL itself, but not
574 to run your distribution.
575 .Sp
576 This will go into the \f(CW\*(C`configure_requires\*(C'\fR field of your \fI\s-1META\s0.yml\fR.
577 .Sp
578 Defaults to \f(CW\*(C`{ "ExtUtils::MakeMaker" =\*(C'\fR 0 }>
579 .Sp
580 The format is the same as \s-1PREREQ_PM\s0.
581 .IP "\s-1DEFINE\s0" 2
582 .IX Item "DEFINE"
583 Something like \f(CW"\-DHAVE_UNISTD_H"\fR
584 .IP "\s-1DESTDIR\s0" 2
585 .IX Item "DESTDIR"
586 This is the root directory into which the code will be installed.  It
587 \&\fIprepends itself to the normal prefix\fR.  For example, if your code
588 would normally go into \fI/usr/local/lib/perl\fR you could set DESTDIR=~/tmp/
589 and installation would go into \fI~/tmp/usr/local/lib/perl\fR.
590 .Sp
591 This is primarily of use for people who repackage Perl modules.
592 .Sp
593 \&\s-1NOTE:\s0 Due to the nature of make, it is important that you put the trailing
594 slash on your \s-1DESTDIR\s0.  \fI~/tmp/\fR not \fI~/tmp\fR.
595 .IP "\s-1DIR\s0" 2
596 .IX Item "DIR"
597 Ref to array of subdirectories containing Makefile.PLs e.g. ['sdbm']
598 in ext/SDBM_File
599 .IP "\s-1DISTNAME\s0" 2
600 .IX Item "DISTNAME"
601 A safe filename for the package. 
602 .Sp
603 Defaults to \s-1NAME\s0 above but with :: replaced with \-.
604 .Sp
605 For example, Foo::Bar becomes Foo\-Bar.
606 .IP "\s-1DISTVNAME\s0" 2
607 .IX Item "DISTVNAME"
608 Your name for distributing the package with the version number
609 included.  This is used by 'make dist' to name the resulting archive
610 file.
611 .Sp
612 Defaults to \s-1DISTNAME\-VERSION\s0.
613 .Sp
614 For example, version 1.04 of Foo::Bar becomes Foo\-Bar\-1.04.
615 .Sp
616 On some \s-1OS\s0's where . has special meaning \s-1VERSION_SYM\s0 may be used in
617 place of \s-1VERSION\s0.
618 .IP "\s-1DL_FUNCS\s0" 2
619 .IX Item "DL_FUNCS"
620 Hashref of symbol names for routines to be made available as universal
621 symbols.  Each key/value pair consists of the package name and an
622 array of routine names in that package.  Used only under \s-1AIX\s0, \s-1OS/2\s0,
623 \&\s-1VMS\s0 and Win32 at present.  The routine names supplied will be expanded
624 in the same way as \s-1XSUB\s0 names are expanded by the \s-1\fIXS\s0()\fR macro.
625 Defaults to
626 .Sp
627 .Vb 1
628 \&  {"$(NAME)" => ["boot_$(NAME)" ] }
629 .Ve
630 .Sp
631 e.g.
632 .Sp
633 .Vb 2
634 \&  {"RPC" => [qw( boot_rpcb rpcb_gettime getnetconfigent )],
635 \&   "NetconfigPtr" => [ 'DESTROY'] }
636 .Ve
637 .Sp
638 Please see the ExtUtils::Mksymlists documentation for more information
639 about the \s-1DL_FUNCS\s0, \s-1DL_VARS\s0 and \s-1FUNCLIST\s0 attributes.
640 .IP "\s-1DL_VARS\s0" 2
641 .IX Item "DL_VARS"
642 Array of symbol names for variables to be made available as universal symbols.
643 Used only under \s-1AIX\s0, \s-1OS/2\s0, \s-1VMS\s0 and Win32 at present.  Defaults to [].
644 (e.g. [ qw(Foo_version Foo_numstreams Foo_tree ) ])
645 .IP "\s-1EXCLUDE_EXT\s0" 2
646 .IX Item "EXCLUDE_EXT"
647 Array of extension names to exclude when doing a static build.  This
648 is ignored if \s-1INCLUDE_EXT\s0 is present.  Consult \s-1INCLUDE_EXT\s0 for more
649 details.  (e.g.  [ qw( Socket \s-1POSIX\s0 ) ] )
650 .Sp
651 This attribute may be most useful when specified as a string on the
652 command line:  perl Makefile.PL EXCLUDE_EXT='Socket Safe'
653 .IP "\s-1EXE_FILES\s0" 2
654 .IX Item "EXE_FILES"
655 Ref to array of executable files. The files will be copied to the
656 \&\s-1INST_SCRIPT\s0 directory. Make realclean will delete them from there
657 again.
658 .Sp
659 If your executables start with something like #!perl or
660 #!/usr/bin/perl MakeMaker will change this to the path of the perl
661 \&'Makefile.PL' was invoked with so the programs will be sure to run
662 properly even if perl is not in /usr/bin/perl.
663 .IP "\s-1FIRST_MAKEFILE\s0" 2
664 .IX Item "FIRST_MAKEFILE"
665 The name of the Makefile to be produced.  This is used for the second
666 Makefile that will be produced for the \s-1MAP_TARGET\s0.
667 .Sp
668 Defaults to 'Makefile' or 'Descrip.MMS' on \s-1VMS\s0.
669 .Sp
670 (Note: we couldn't use \s-1MAKEFILE\s0 because dmake uses this for something
671 else).
672 .IP "\s-1FULLPERL\s0" 2
673 .IX Item "FULLPERL"
674 Perl binary able to run this extension, load \s-1XS\s0 modules, etc...
675 .IP "\s-1FULLPERLRUN\s0" 2
676 .IX Item "FULLPERLRUN"
677 Like \s-1PERLRUN\s0, except it uses \s-1FULLPERL\s0.
678 .IP "\s-1FULLPERLRUNINST\s0" 2
679 .IX Item "FULLPERLRUNINST"
680 Like \s-1PERLRUNINST\s0, except it uses \s-1FULLPERL\s0.
681 .IP "\s-1FUNCLIST\s0" 2
682 .IX Item "FUNCLIST"
683 This provides an alternate means to specify function names to be
684 exported from the extension.  Its value is a reference to an
685 array of function names to be exported by the extension.  These
686 names are passed through unaltered to the linker options file.
687 .IP "H" 2
688 .IX Item "H"
689 Ref to array of *.h file names. Similar to C.
690 .IP "\s-1IMPORTS\s0" 2
691 .IX Item "IMPORTS"
692 This attribute is used to specify names to be imported into the
693 extension. Takes a hash ref.
694 .Sp
695 It is only used on \s-1OS/2\s0 and Win32.
696 .IP "\s-1INC\s0" 2
697 .IX Item "INC"
698 Include file dirs eg: \f(CW"\-I/usr/5include \-I/path/to/inc"\fR
699 .IP "\s-1INCLUDE_EXT\s0" 2
700 .IX Item "INCLUDE_EXT"
701 Array of extension names to be included when doing a static build.
702 MakeMaker will normally build with all of the installed extensions when
703 doing a static build, and that is usually the desired behavior.  If
704 \&\s-1INCLUDE_EXT\s0 is present then MakeMaker will build only with those extensions
705 which are explicitly mentioned. (e.g.  [ qw( Socket \s-1POSIX\s0 ) ])
706 .Sp
707 It is not necessary to mention DynaLoader or the current extension when
708 filling in \s-1INCLUDE_EXT\s0.  If the \s-1INCLUDE_EXT\s0 is mentioned but is empty then
709 only DynaLoader and the current extension will be included in the build.
710 .Sp
711 This attribute may be most useful when specified as a string on the
712 command line:  perl Makefile.PL INCLUDE_EXT='\s-1POSIX\s0 Socket Devel::Peek'
713 .IP "\s-1INSTALLARCHLIB\s0" 2
714 .IX Item "INSTALLARCHLIB"
715 Used by 'make install', which copies files from \s-1INST_ARCHLIB\s0 to this
716 directory if \s-1INSTALLDIRS\s0 is set to perl.
717 .IP "\s-1INSTALLBIN\s0" 2
718 .IX Item "INSTALLBIN"
719 Directory to install binary files (e.g. tkperl) into if
720 INSTALLDIRS=perl.
721 .IP "\s-1INSTALLDIRS\s0" 2
722 .IX Item "INSTALLDIRS"
723 Determines which of the sets of installation directories to choose:
724 perl, site or vendor.  Defaults to site.
725 .IP "\s-1INSTALLMAN1DIR\s0" 2
726 .IX Item "INSTALLMAN1DIR"
727 .PD 0
728 .IP "\s-1INSTALLMAN3DIR\s0" 2
729 .IX Item "INSTALLMAN3DIR"
730 .PD
731 These directories get the man pages at 'make install' time if
732 INSTALLDIRS=perl.  Defaults to \f(CW$Config\fR{installman*dir}.
733 .Sp
734 If set to 'none', no man pages will be installed.
735 .IP "\s-1INSTALLPRIVLIB\s0" 2
736 .IX Item "INSTALLPRIVLIB"
737 Used by 'make install', which copies files from \s-1INST_LIB\s0 to this
738 directory if \s-1INSTALLDIRS\s0 is set to perl.
739 .Sp
740 Defaults to \f(CW$Config\fR{installprivlib}.
741 .IP "\s-1INSTALLSCRIPT\s0" 2
742 .IX Item "INSTALLSCRIPT"
743 Used by 'make install' which copies files from \s-1INST_SCRIPT\s0 to this
744 directory if INSTALLDIRS=perl.
745 .IP "\s-1INSTALLSITEARCH\s0" 2
746 .IX Item "INSTALLSITEARCH"
747 Used by 'make install', which copies files from \s-1INST_ARCHLIB\s0 to this
748 directory if \s-1INSTALLDIRS\s0 is set to site (default).
749 .IP "\s-1INSTALLSITEBIN\s0" 2
750 .IX Item "INSTALLSITEBIN"
751 Used by 'make install', which copies files from \s-1INST_BIN\s0 to this
752 directory if \s-1INSTALLDIRS\s0 is set to site (default).
753 .IP "\s-1INSTALLSITELIB\s0" 2
754 .IX Item "INSTALLSITELIB"
755 Used by 'make install', which copies files from \s-1INST_LIB\s0 to this
756 directory if \s-1INSTALLDIRS\s0 is set to site (default).
757 .IP "\s-1INSTALLSITEMAN1DIR\s0" 2
758 .IX Item "INSTALLSITEMAN1DIR"
759 .PD 0
760 .IP "\s-1INSTALLSITEMAN3DIR\s0" 2
761 .IX Item "INSTALLSITEMAN3DIR"
762 .PD
763 These directories get the man pages at 'make install' time if
764 INSTALLDIRS=site (default).  Defaults to 
765 $(\s-1SITEPREFIX\s0)/man/man$(MAN*EXT).
766 .Sp
767 If set to 'none', no man pages will be installed.
768 .IP "\s-1INSTALLSITESCRIPT\s0" 2
769 .IX Item "INSTALLSITESCRIPT"
770 Used by 'make install' which copies files from \s-1INST_SCRIPT\s0 to this
771 directory if \s-1INSTALLDIRS\s0 is set to site (default).
772 .IP "\s-1INSTALLVENDORARCH\s0" 2
773 .IX Item "INSTALLVENDORARCH"
774 Used by 'make install', which copies files from \s-1INST_ARCHLIB\s0 to this
775 directory if \s-1INSTALLDIRS\s0 is set to vendor.
776 .IP "\s-1INSTALLVENDORBIN\s0" 2
777 .IX Item "INSTALLVENDORBIN"
778 Used by 'make install', which copies files from \s-1INST_BIN\s0 to this
779 directory if \s-1INSTALLDIRS\s0 is set to vendor.
780 .IP "\s-1INSTALLVENDORLIB\s0" 2
781 .IX Item "INSTALLVENDORLIB"
782 Used by 'make install', which copies files from \s-1INST_LIB\s0 to this
783 directory if \s-1INSTALLDIRS\s0 is set to vendor.
784 .IP "\s-1INSTALLVENDORMAN1DIR\s0" 2
785 .IX Item "INSTALLVENDORMAN1DIR"
786 .PD 0
787 .IP "\s-1INSTALLVENDORMAN3DIR\s0" 2
788 .IX Item "INSTALLVENDORMAN3DIR"
789 .PD
790 These directories get the man pages at 'make install' time if
791 INSTALLDIRS=vendor.  Defaults to $(\s-1VENDORPREFIX\s0)/man/man$(MAN*EXT).
792 .Sp
793 If set to 'none', no man pages will be installed.
794 .IP "\s-1INSTALLVENDORSCRIPT\s0" 2
795 .IX Item "INSTALLVENDORSCRIPT"
796 Used by 'make install' which copies files from \s-1INST_SCRIPT\s0 to this
797 directory if \s-1INSTALLDIRS\s0 is set to is set to vendor.
798 .IP "\s-1INST_ARCHLIB\s0" 2
799 .IX Item "INST_ARCHLIB"
800 Same as \s-1INST_LIB\s0 for architecture dependent files.
801 .IP "\s-1INST_BIN\s0" 2
802 .IX Item "INST_BIN"
803 Directory to put real binary files during 'make'. These will be copied
804 to \s-1INSTALLBIN\s0 during 'make install'
805 .IP "\s-1INST_LIB\s0" 2
806 .IX Item "INST_LIB"
807 Directory where we put library files of this extension while building
808 it.
809 .IP "\s-1INST_MAN1DIR\s0" 2
810 .IX Item "INST_MAN1DIR"
811 Directory to hold the man pages at 'make' time
812 .IP "\s-1INST_MAN3DIR\s0" 2
813 .IX Item "INST_MAN3DIR"
814 Directory to hold the man pages at 'make' time
815 .IP "\s-1INST_SCRIPT\s0" 2
816 .IX Item "INST_SCRIPT"
817 Directory, where executable files should be installed during
818 \&'make'. Defaults to \*(L"./blib/script\*(R", just to have a dummy location during
819 testing. make install will copy the files in \s-1INST_SCRIPT\s0 to
820 \&\s-1INSTALLSCRIPT\s0.
821 .IP "\s-1LD\s0" 2
822 .IX Item "LD"
823 Program to be used to link libraries for dynamic loading.
824 .Sp
825 Defaults to \f(CW$Config\fR{ld}.
826 .IP "\s-1LDDLFLAGS\s0" 2
827 .IX Item "LDDLFLAGS"
828 Any special flags that might need to be passed to ld to create a
829 shared library suitable for dynamic loading.  It is up to the makefile
830 to use it.  (See \*(L"lddlflags\*(R" in Config)
831 .Sp
832 Defaults to \f(CW$Config\fR{lddlflags}.
833 .IP "\s-1LDFROM\s0" 2
834 .IX Item "LDFROM"
835 Defaults to \*(L"$(\s-1OBJECT\s0)\*(R" and is used in the ld command to specify
836 what files to link/load from (also see dynamic_lib below for how to
837 specify ld flags)
838 .IP "\s-1LIB\s0" 2
839 .IX Item "LIB"
840 \&\s-1LIB\s0 should only be set at \f(CW\*(C`perl Makefile.PL\*(C'\fR time but is allowed as a
841 MakeMaker argument. It has the effect of setting both \s-1INSTALLPRIVLIB\s0
842 and \s-1INSTALLSITELIB\s0 to that value regardless any explicit setting of
843 those arguments (or of \s-1PREFIX\s0).  \s-1INSTALLARCHLIB\s0 and \s-1INSTALLSITEARCH\s0
844 are set to the corresponding architecture subdirectory.
845 .IP "\s-1LIBPERL_A\s0" 2
846 .IX Item "LIBPERL_A"
847 The filename of the perllibrary that will be used together with this
848 extension. Defaults to libperl.a.
849 .IP "\s-1LIBS\s0" 2
850 .IX Item "LIBS"
851 An anonymous array of alternative library
852 specifications to be searched for (in order) until
853 at least one library is found. E.g.
854 .Sp
855 .Vb 1
856 \&  'LIBS' => ["\-lgdbm", "\-ldbm \-lfoo", "\-L/path \-ldbm.nfs"]
857 .Ve
858 .Sp
859 Mind, that any element of the array
860 contains a complete set of arguments for the ld
861 command. So do not specify
862 .Sp
863 .Vb 1
864 \&  'LIBS' => ["\-ltcl", "\-ltk", "\-lX11"]
865 .Ve
866 .Sp
867 See ODBM_File/Makefile.PL for an example, where an array is needed. If
868 you specify a scalar as in
869 .Sp
870 .Vb 1
871 \&  'LIBS' => "\-ltcl \-ltk \-lX11"
872 .Ve
873 .Sp
874 MakeMaker will turn it into an array with one element.
875 .IP "\s-1LICENSE\s0" 2
876 .IX Item "LICENSE"
877 The licensing terms of your distribution.  Generally its \*(L"perl\*(R" for the
878 same license as Perl itself.
879 .Sp
880 See Module::Build::API for the list of options.
881 .Sp
882 Defaults to \*(L"unknown\*(R".
883 .IP "\s-1LINKTYPE\s0" 2
884 .IX Item "LINKTYPE"
885 \&'static' or 'dynamic' (default unless usedl=undef in
886 config.sh). Should only be used to force static linking (also see
887 linkext below).
888 .IP "\s-1MAKE\s0" 2
889 .IX Item "MAKE"
890 Variant of make you intend to run the generated Makefile with.  This
891 parameter lets Makefile.PL know what make quirks to account for when
892 generating the Makefile.
893 .Sp
894 MakeMaker also honors the \s-1MAKE\s0 environment variable.  This parameter
895 takes precedent.
896 .Sp
897 Currently the only significant values are 'dmake' and 'nmake' for Windows
898 users.
899 .Sp
900 Defaults to \f(CW$Config\fR{make}.
901 .IP "\s-1MAKEAPERL\s0" 2
902 .IX Item "MAKEAPERL"
903 Boolean which tells MakeMaker, that it should include the rules to
904 make a perl. This is handled automatically as a switch by
905 MakeMaker. The user normally does not need it.
906 .IP "\s-1MAKEFILE_OLD\s0" 2
907 .IX Item "MAKEFILE_OLD"
908 When 'make clean' or similar is run, the $(\s-1FIRST_MAKEFILE\s0) will be
909 backed up at this location.
910 .Sp
911 Defaults to $(\s-1FIRST_MAKEFILE\s0).old or $(\s-1FIRST_MAKEFILE\s0)_old on \s-1VMS\s0.
912 .IP "\s-1MAN1PODS\s0" 2
913 .IX Item "MAN1PODS"
914 Hashref of pod-containing files. MakeMaker will default this to all
915 \&\s-1EXE_FILES\s0 files that include \s-1POD\s0 directives. The files listed
916 here will be converted to man pages and installed as was requested
917 at Configure time.
918 .Sp
919 This hash should map \s-1POD\s0 files (or scripts containing \s-1POD\s0) to the
920 man file names under the \f(CW\*(C`blib/man1/\*(C'\fR directory, as in the following
921 example:
922 .Sp
923 .Vb 4
924 \&  MAN1PODS            => {
925 \&    'doc/command.pod'    => 'blib/man1/command.1',
926 \&    'scripts/script.pl'  => 'blib/man1/script.1',
927 \&  }
928 .Ve
929 .IP "\s-1MAN3PODS\s0" 2
930 .IX Item "MAN3PODS"
931 Hashref that assigns to *.pm and *.pod files the files into which the
932 manpages are to be written. MakeMaker parses all *.pod and *.pm files
933 for \s-1POD\s0 directives. Files that contain \s-1POD\s0 will be the default keys of
934 the \s-1MAN3PODS\s0 hashref. These will then be converted to man pages during
935 \&\f(CW\*(C`make\*(C'\fR and will be installed during \f(CW\*(C`make install\*(C'\fR.
936 .Sp
937 Example similar to \s-1MAN1PODS\s0.
938 .IP "\s-1MAP_TARGET\s0" 2
939 .IX Item "MAP_TARGET"
940 If it is intended, that a new perl binary be produced, this variable
941 may hold a name for that binary. Defaults to perl
942 .IP "\s-1META_ADD\s0" 2
943 .IX Item "META_ADD"
944 .PD 0
945 .IP "\s-1META_MERGE\s0" 2
946 .IX Item "META_MERGE"
947 .PD
948 A hashrefs of items to add to the \fI\s-1META\s0.yml\fR.
949 .Sp
950 They differ in how they behave if they have the same key as the
951 default metadata.  \s-1META_ADD\s0 will override the default value with it's
952 own.  \s-1META_MERGE\s0 will merge its value with the default.
953 .Sp
954 Unless you want to override the defaults, prefer \s-1META_MERGE\s0 so as to
955 get the advantage of any future defaults.
956 .IP "\s-1MIN_PERL_VERSION\s0" 2
957 .IX Item "MIN_PERL_VERSION"
958 The minimum required version of Perl for this distribution.
959 .Sp
960 Either 5.006001 or 5.6.1 format is acceptable.
961 .IP "\s-1MYEXTLIB\s0" 2
962 .IX Item "MYEXTLIB"
963 If the extension links to a library that it builds set this to the
964 name of the library (see SDBM_File)
965 .IP "\s-1NAME\s0" 2
966 .IX Item "NAME"
967 Perl module name for this extension (DBD::Oracle). This will default
968 to the directory name but should be explicitly defined in the
969 Makefile.PL.
970 .IP "\s-1NEEDS_LINKING\s0" 2
971 .IX Item "NEEDS_LINKING"
972 MakeMaker will figure out if an extension contains linkable code
973 anywhere down the directory tree, and will set this variable
974 accordingly, but you can speed it up a very little bit if you define
975 this boolean variable yourself.
976 .IP "\s-1NOECHO\s0" 2
977 .IX Item "NOECHO"
978 Command so make does not print the literal commands its running.
979 .Sp
980 By setting it to an empty string you can generate a Makefile that
981 prints all commands. Mainly used in debugging MakeMaker itself.
982 .Sp
983 Defaults to \f(CW\*(C`@\*(C'\fR.
984 .IP "\s-1NORECURS\s0" 2
985 .IX Item "NORECURS"
986 Boolean.  Attribute to inhibit descending into subdirectories.
987 .IP "\s-1NO_META\s0" 2
988 .IX Item "NO_META"
989 When true, suppresses the generation and addition to the \s-1MANIFEST\s0 of
990 the \s-1META\s0.yml module meta-data file during 'make distdir'.
991 .Sp
992 Defaults to false.
993 .IP "\s-1NO_VC\s0" 2
994 .IX Item "NO_VC"
995 In general, any generated Makefile checks for the current version of
996 MakeMaker and the version the Makefile was built under. If \s-1NO_VC\s0 is
997 set, the version check is neglected. Do not write this into your
998 Makefile.PL, use it interactively instead.
999 .IP "\s-1OBJECT\s0" 2
1000 .IX Item "OBJECT"
1001 List of object files, defaults to '$(\s-1BASEEXT\s0)$(\s-1OBJ_EXT\s0)', but can be a long
1002 string containing all object files, e.g. \*(L"tkpBind.o
1003 tkpButton.o tkpCanvas.o\*(R"
1004 .Sp
1005 (Where \s-1BASEEXT\s0 is the last component of \s-1NAME\s0, and \s-1OBJ_EXT\s0 is \f(CW$Config\fR{obj_ext}.)
1006 .IP "\s-1OPTIMIZE\s0" 2
1007 .IX Item "OPTIMIZE"
1008 Defaults to \f(CW\*(C`\-O\*(C'\fR. Set it to \f(CW\*(C`\-g\*(C'\fR to turn debugging on. The flag is
1009 passed to subdirectory makes.
1010 .IP "\s-1PERL\s0" 2
1011 .IX Item "PERL"
1012 Perl binary for tasks that can be done by miniperl
1013 .IP "\s-1PERL_CORE\s0" 2
1014 .IX Item "PERL_CORE"
1015 Set only when MakeMaker is building the extensions of the Perl core
1016 distribution.
1017 .IP "\s-1PERLMAINCC\s0" 2
1018 .IX Item "PERLMAINCC"
1019 The call to the program that is able to compile perlmain.c. Defaults
1020 to $(\s-1CC\s0).
1021 .IP "\s-1PERL_ARCHLIB\s0" 2
1022 .IX Item "PERL_ARCHLIB"
1023 Same as for \s-1PERL_LIB\s0, but for architecture dependent files.
1024 .Sp
1025 Used only when MakeMaker is building the extensions of the Perl core
1026 distribution (because normally $(\s-1PERL_ARCHLIB\s0) is automatically in \f(CW@INC\fR,
1027 and adding it would get in the way of \s-1PERL5LIB\s0).
1028 .IP "\s-1PERL_LIB\s0" 2
1029 .IX Item "PERL_LIB"
1030 Directory containing the Perl library to use.
1031 .Sp
1032 Used only when MakeMaker is building the extensions of the Perl core
1033 distribution (because normally $(\s-1PERL_LIB\s0) is automatically in \f(CW@INC\fR,
1034 and adding it would get in the way of \s-1PERL5LIB\s0).
1035 .IP "\s-1PERL_MALLOC_OK\s0" 2
1036 .IX Item "PERL_MALLOC_OK"
1037 defaults to 0.  Should be set to \s-1TRUE\s0 if the extension can work with
1038 the memory allocation routines substituted by the Perl \fImalloc()\fR subsystem.
1039 This should be applicable to most extensions with exceptions of those
1040 .RS 2
1041 .IP "*" 4
1042 with bugs in memory allocations which are caught by Perl's \fImalloc()\fR;
1043 .IP "*" 4
1044 which interact with the memory allocator in other ways than via
1045 \&\fImalloc()\fR, \fIrealloc()\fR, \fIfree()\fR, \fIcalloc()\fR, \fIsbrk()\fR and \fIbrk()\fR;
1046 .IP "*" 4
1047 which rely on special alignment which is not provided by Perl's \fImalloc()\fR.
1048 .RE
1049 .RS 2
1050 .Sp
1051 \&\fB\s-1NOTE\s0.\fR  Negligence to set this flag in \fIany one\fR of loaded extension
1052 nullifies many advantages of Perl's \fImalloc()\fR, such as better usage of
1053 system resources, error detection, memory usage reporting, catchable failure
1054 of memory allocations, etc.
1055 .RE
1056 .IP "\s-1PERLPREFIX\s0" 2
1057 .IX Item "PERLPREFIX"
1058 Directory under which core modules are to be installed.
1059 .Sp
1060 Defaults to \f(CW$Config\fR{installprefixexp} falling back to
1061 \&\f(CW$Config\fR{installprefix}, \f(CW$Config\fR{prefixexp} or \f(CW$Config\fR{prefix} should
1062 \&\f(CW$Config\fR{installprefixexp} not exist.
1063 .Sp
1064 Overridden by \s-1PREFIX\s0.
1065 .IP "\s-1PERLRUN\s0" 2
1066 .IX Item "PERLRUN"
1067 Use this instead of $(\s-1PERL\s0) when you wish to run perl.  It will set up
1068 extra necessary flags for you.
1069 .IP "\s-1PERLRUNINST\s0" 2
1070 .IX Item "PERLRUNINST"
1071 Use this instead of $(\s-1PERL\s0) when you wish to run perl to work with
1072 modules.  It will add things like \-I$(\s-1INST_ARCH\s0) and other necessary
1073 flags so perl can see the modules you're about to install.
1074 .IP "\s-1PERL_SRC\s0" 2
1075 .IX Item "PERL_SRC"
1076 Directory containing the Perl source code (use of this should be
1077 avoided, it may be undefined)
1078 .IP "\s-1PERM_DIR\s0" 2
1079 .IX Item "PERM_DIR"
1080 Desired permission for directories. Defaults to \f(CW755\fR.
1081 .IP "\s-1PERM_RW\s0" 2
1082 .IX Item "PERM_RW"
1083 Desired permission for read/writable files. Defaults to \f(CW644\fR.
1084 .IP "\s-1PERM_RWX\s0" 2
1085 .IX Item "PERM_RWX"
1086 Desired permission for executable files. Defaults to \f(CW755\fR.
1087 .IP "\s-1PL_FILES\s0" 2
1088 .IX Item "PL_FILES"
1089 MakeMaker can run programs to generate files for you at build time.
1090 By default any file named *.PL (except Makefile.PL and Build.PL) in
1091 the top level directory will be assumed to be a Perl program and run
1092 passing its own basename in as an argument.  For example...
1093 .Sp
1094 .Vb 1
1095 \&    perl foo.PL foo
1096 .Ve
1097 .Sp
1098 This behavior can be overridden by supplying your own set of files to
1099 search.  \s-1PL_FILES\s0 accepts a hash ref, the key being the file to run
1100 and the value is passed in as the first argument when the \s-1PL\s0 file is run.
1101 .Sp
1102 .Vb 1
1103 \&    PL_FILES => {'bin/foobar.PL' => 'bin/foobar'}
1104 .Ve
1105 .Sp
1106 Would run bin/foobar.PL like this:
1107 .Sp
1108 .Vb 1
1109 \&    perl bin/foobar.PL bin/foobar
1110 .Ve
1111 .Sp
1112 If multiple files from one program are desired an array ref can be used.
1113 .Sp
1114 .Vb 1
1115 \&    PL_FILES => {'bin/foobar.PL' => [qw(bin/foobar1 bin/foobar2)]}
1116 .Ve
1117 .Sp
1118 In this case the program will be run multiple times using each target file.
1119 .Sp
1120 .Vb 2
1121 \&    perl bin/foobar.PL bin/foobar1
1122 \&    perl bin/foobar.PL bin/foobar2
1123 .Ve
1124 .Sp
1125 \&\s-1PL\s0 files are normally run \fBafter\fR pm_to_blib and include \s-1INST_LIB\s0 and
1126 \&\s-1INST_ARCH\s0 in its \f(CW@INC\fR so the just built modules can be
1127 accessed... unless the \s-1PL\s0 file is making a module (or anything else in
1128 \&\s-1PM\s0) in which case it is run \fBbefore\fR pm_to_blib and does not include
1129 \&\s-1INST_LIB\s0 and \s-1INST_ARCH\s0 in its \f(CW@INC\fR.  This apparently odd behavior
1130 is there for backwards compatibility (and its somewhat \s-1DWIM\s0).
1131 .IP "\s-1PM\s0" 2
1132 .IX Item "PM"
1133 Hashref of .pm files and *.pl files to be installed.  e.g.
1134 .Sp
1135 .Vb 1
1136 \&  {'name_of_file.pm' => '$(INST_LIBDIR)/install_as.pm'}
1137 .Ve
1138 .Sp
1139 By default this will include *.pm and *.pl and the files found in
1140 the \s-1PMLIBDIRS\s0 directories.  Defining \s-1PM\s0 in the
1141 Makefile.PL will override \s-1PMLIBDIRS\s0.
1142 .IP "\s-1PMLIBDIRS\s0" 2
1143 .IX Item "PMLIBDIRS"
1144 Ref to array of subdirectories containing library files.  Defaults to
1145 [ 'lib', $(\s-1BASEEXT\s0) ]. The directories will be scanned and \fIany\fR files
1146 they contain will be installed in the corresponding location in the
1147 library.  A \fIlibscan()\fR method can be used to alter the behaviour.
1148 Defining \s-1PM\s0 in the Makefile.PL will override \s-1PMLIBDIRS\s0.
1149 .Sp
1150 (Where \s-1BASEEXT\s0 is the last component of \s-1NAME\s0.)
1151 .IP "\s-1PM_FILTER\s0" 2
1152 .IX Item "PM_FILTER"
1153 A filter program, in the traditional Unix sense (input from stdin, output
1154 to stdout) that is passed on each .pm file during the build (in the
1155 \&\fIpm_to_blib()\fR phase).  It is empty by default, meaning no filtering is done.
1156 .Sp
1157 Great care is necessary when defining the command if quoting needs to be
1158 done.  For instance, you would need to say:
1159 .Sp
1160 .Vb 1
1161 \&  {'PM_FILTER' => 'grep \-v \e\e"^\e\e#\e\e"'}
1162 .Ve
1163 .Sp
1164 to remove all the leading comments on the fly during the build.  The
1165 extra \e\e are necessary, unfortunately, because this variable is interpolated
1166 within the context of a Perl program built on the command line, and double
1167 quotes are what is used with the \-e switch to build that command line.  The
1168 # is escaped for the Makefile, since what is going to be generated will then
1169 be:
1170 .Sp
1171 .Vb 1
1172 \&  PM_FILTER = grep \-v \e"^\e#\e"
1173 .Ve
1174 .Sp
1175 Without the \e\e before the #, we'd have the start of a Makefile comment,
1176 and the macro would be incorrectly defined.
1177 .IP "\s-1POLLUTE\s0" 2
1178 .IX Item "POLLUTE"
1179 Release 5.005 grandfathered old global symbol names by providing preprocessor
1180 macros for extension source compatibility.  As of release 5.6, these
1181 preprocessor definitions are not available by default.  The \s-1POLLUTE\s0 flag
1182 specifies that the old names should still be defined:
1183 .Sp
1184 .Vb 1
1185 \&  perl Makefile.PL POLLUTE=1
1186 .Ve
1187 .Sp
1188 Please inform the module author if this is necessary to successfully install
1189 a module under 5.6 or later.
1190 .IP "\s-1PPM_INSTALL_EXEC\s0" 2
1191 .IX Item "PPM_INSTALL_EXEC"
1192 Name of the executable used to run \f(CW\*(C`PPM_INSTALL_SCRIPT\*(C'\fR below. (e.g. perl)
1193 .IP "\s-1PPM_INSTALL_SCRIPT\s0" 2
1194 .IX Item "PPM_INSTALL_SCRIPT"
1195 Name of the script that gets executed by the Perl Package Manager after
1196 the installation of a package.
1197 .IP "\s-1PREFIX\s0" 2
1198 .IX Item "PREFIX"
1199 This overrides all the default install locations.  Man pages,
1200 libraries, scripts, etc...  MakeMaker will try to make an educated
1201 guess about where to place things under the new \s-1PREFIX\s0 based on your
1202 Config defaults.  Failing that, it will fall back to a structure
1203 which should be sensible for your platform.
1204 .Sp
1205 If you specify \s-1LIB\s0 or any INSTALL* variables they will not be effected
1206 by the \s-1PREFIX\s0.
1207 .IP "\s-1PREREQ_FATAL\s0" 2
1208 .IX Item "PREREQ_FATAL"
1209 Bool. If this parameter is true, failing to have the required modules
1210 (or the right versions thereof) will be fatal. \f(CW\*(C`perl Makefile.PL\*(C'\fR
1211 will \f(CW\*(C`die\*(C'\fR instead of simply informing the user of the missing dependencies.
1212 .Sp
1213 It is \fIextremely\fR rare to have to use \f(CW\*(C`PREREQ_FATAL\*(C'\fR. Its use by module
1214 authors is \fIstrongly discouraged\fR and should never be used lightly.
1215 Module installation tools have ways of resolving umet dependencies but
1216 to do that they need a \fIMakefile\fR.  Using \f(CW\*(C`PREREQ_FATAL\*(C'\fR breaks this.
1217 That's bad.
1218 .Sp
1219 The only situation where it is appropriate is when you have
1220 dependencies that are indispensible to actually \fIwrite\fR a
1221 \&\fIMakefile\fR. For example, MakeMaker's \fIMakefile.PL\fR needs File::Spec.
1222 If its not available it cannot write the \fIMakefile\fR.
1223 .Sp
1224 Note: see Test::Harness for a shortcut for stopping tests early
1225 if you are missing dependencies and are afraid that users might
1226 use your module with an incomplete environment.
1227 .IP "\s-1PREREQ_PM\s0" 2
1228 .IX Item "PREREQ_PM"
1229 A hash of modules that are needed to run your module.  The keys are
1230 the module names ie. Test::More, and the minimum version is the
1231 value. If the required version number is 0 any version will do.
1232 .Sp
1233 This will go into the \f(CW\*(C`requires\*(C'\fR field of your \fI\s-1META\s0.yml\fR.
1234 .Sp
1235 .Vb 3
1236 \&    PREREQ_PM => {
1237 \&        # Require Test::More at least 0.47
1238 \&        "Test::More" => "0.47",
1239 .Ve
1240 .Sp
1241 .Vb 3
1242 \&        # Require any version of Acme::Buffy
1243 \&        "Acme::Buffy" => 0,
1244 \&    }
1245 .Ve
1246 .IP "\s-1PREREQ_PRINT\s0" 2
1247 .IX Item "PREREQ_PRINT"
1248 Bool.  If this parameter is true, the prerequisites will be printed to
1249 stdout and MakeMaker will exit.  The output format is an evalable hash
1250 ref.
1251 .Sp
1252 .Vb 5
1253 \&  $PREREQ_PM = {
1254 \&                 'A::B' => Vers1,
1255 \&                 'C::D' => Vers2,
1256 \&                 ...
1257 \&               };
1258 .Ve
1259 .Sp
1260 If a distribution defines a minimal required perl version, this is
1261 added to the output as an additional line of the form:
1262 .Sp
1263 .Vb 1
1264 \&  $MIN_PERL_VERSION = '5.008001';
1265 .Ve
1266 .IP "\s-1PRINT_PREREQ\s0" 2
1267 .IX Item "PRINT_PREREQ"
1268 RedHatism for \f(CW\*(C`PREREQ_PRINT\*(C'\fR.  The output format is different, though:
1269 .Sp
1270 .Vb 1
1271 \&    perl(A::B)>=Vers1 perl(C::D)>=Vers2 ...
1272 .Ve
1273 .Sp
1274 A minimal required perl version, if present, will look like this:
1275 .Sp
1276 .Vb 1
1277 \&    perl(perl)>=5.008001
1278 .Ve
1279 .IP "\s-1SITEPREFIX\s0" 2
1280 .IX Item "SITEPREFIX"
1281 Like \s-1PERLPREFIX\s0, but only for the site install locations.
1282 .Sp
1283 Defaults to \f(CW$Config\fR{siteprefixexp}.  Perls prior to 5.6.0 didn't have
1284 an explicit siteprefix in the Config.  In those cases
1285 \&\f(CW$Config\fR{installprefix} will be used.
1286 .Sp
1287 Overridable by \s-1PREFIX\s0
1288 .IP "\s-1SIGN\s0" 2
1289 .IX Item "SIGN"
1290 When true, perform the generation and addition to the \s-1MANIFEST\s0 of the
1291 \&\s-1SIGNATURE\s0 file in the distdir during 'make distdir', via 'cpansign
1292 \&\-s'.
1293 .Sp
1294 Note that you need to install the Module::Signature module to
1295 perform this operation.
1296 .Sp
1297 Defaults to false.
1298 .IP "\s-1SKIP\s0" 2
1299 .IX Item "SKIP"
1300 Arrayref. E.g. [qw(name1 name2)] skip (do not write) sections of the
1301 Makefile. Caution! Do not use the \s-1SKIP\s0 attribute for the negligible
1302 speedup. It may seriously damage the resulting Makefile. Only use it
1303 if you really need it.
1304 .IP "\s-1TYPEMAPS\s0" 2
1305 .IX Item "TYPEMAPS"
1306 Ref to array of typemap file names.  Use this when the typemaps are
1307 in some directory other than the current directory or when they are
1308 not named \fBtypemap\fR.  The last typemap in the list takes
1309 precedence.  A typemap in the current directory has highest
1310 precedence, even if it isn't listed in \s-1TYPEMAPS\s0.  The default system
1311 typemap has lowest precedence.
1312 .IP "\s-1VENDORPREFIX\s0" 2
1313 .IX Item "VENDORPREFIX"
1314 Like \s-1PERLPREFIX\s0, but only for the vendor install locations.
1315 .Sp
1316 Defaults to \f(CW$Config\fR{vendorprefixexp}.
1317 .Sp
1318 Overridable by \s-1PREFIX\s0
1319 .IP "\s-1VERBINST\s0" 2
1320 .IX Item "VERBINST"
1321 If true, make install will be verbose
1322 .IP "\s-1VERSION\s0" 2
1323 .IX Item "VERSION"
1324 Your version number for distributing the package.  This defaults to
1325 0.1.
1326 .IP "\s-1VERSION_FROM\s0" 2
1327 .IX Item "VERSION_FROM"
1328 Instead of specifying the \s-1VERSION\s0 in the Makefile.PL you can let
1329 MakeMaker parse a file to determine the version number. The parsing
1330 routine requires that the file named by \s-1VERSION_FROM\s0 contains one
1331 single line to compute the version number. The first line in the file
1332 that contains the regular expression
1333 .Sp
1334 .Vb 1
1335 \&    /([\e$*])(([\ew\e:\e']*)\ebVERSION)\eb.*\e=/
1336 .Ve
1337 .Sp
1338 will be evaluated with \fIeval()\fR and the value of the named variable
1339 \&\fBafter\fR the \fIeval()\fR will be assigned to the \s-1VERSION\s0 attribute of the
1340 MakeMaker object. The following lines will be parsed o.k.:
1341 .Sp
1342 .Vb 5
1343 \&    $VERSION   = '1.00';
1344 \&    *VERSION   = \e'1.01';
1345 \&    ($VERSION) = q$Revision$ =~ /(\ed+)/g;
1346 \&    $FOO::VERSION = '1.10';
1347 \&    *FOO::VERSION = \e'1.11';
1348 .Ve
1349 .Sp
1350 but these will fail:
1351 .Sp
1352 .Vb 4
1353 \&    # Bad
1354 \&    my $VERSION         = '1.01';
1355 \&    local $VERSION      = '1.02';
1356 \&    local $FOO::VERSION = '1.30';
1357 .Ve
1358 .Sp
1359 \&\*(L"Version strings\*(R" are incompatible should not be used.
1360 .Sp
1361 .Vb 3
1362 \&    # Bad
1363 \&    $VERSION = 1.2.3;
1364 \&    $VERSION = v1.2.3;
1365 .Ve
1366 .Sp
1367 version objects are fine.  As of MakeMaker 6.35 version.pm will be
1368 automatically loaded, but you must declare the dependency on version.pm.
1369 For compatibility with older MakeMaker you should load on the same line 
1370 as \f(CW$VERSION\fR is declared.
1371 .Sp
1372 .Vb 2
1373 \&    # All on one line
1374 \&    use version; our $VERSION = qv(1.2.3);
1375 .Ve
1376 .Sp
1377 (Putting \f(CW\*(C`my\*(C'\fR or \f(CW\*(C`local\*(C'\fR on the preceding line will work o.k.)
1378 .Sp
1379 The file named in \s-1VERSION_FROM\s0 is not added as a dependency to
1380 Makefile. This is not really correct, but it would be a major pain
1381 during development to have to rewrite the Makefile for any smallish
1382 change in that file. If you want to make sure that the Makefile
1383 contains the correct \s-1VERSION\s0 macro after any change of the file, you
1384 would have to do something like
1385 .Sp
1386 .Vb 1
1387 \&    depend => { Makefile => '$(VERSION_FROM)' }
1388 .Ve
1389 .Sp
1390 See attribute \f(CW\*(C`depend\*(C'\fR below.
1391 .IP "\s-1VERSION_SYM\s0" 2
1392 .IX Item "VERSION_SYM"
1393 A sanitized \s-1VERSION\s0 with . replaced by _.  For places where . has
1394 special meaning (some filesystems, \s-1RCS\s0 labels, etc...)
1395 .IP "\s-1XS\s0" 2
1396 .IX Item "XS"
1397 Hashref of .xs files. MakeMaker will default this.  e.g.
1398 .Sp
1399 .Vb 1
1400 \&  {'name_of_file.xs' => 'name_of_file.c'}
1401 .Ve
1402 .Sp
1403 The .c files will automatically be included in the list of files
1404 deleted by a make clean.
1405 .IP "\s-1XSOPT\s0" 2
1406 .IX Item "XSOPT"
1407 String of options to pass to xsubpp.  This might include \f(CW\*(C`\-C++\*(C'\fR or
1408 \&\f(CW\*(C`\-extern\*(C'\fR.  Do not include typemaps here; the \s-1TYPEMAP\s0 parameter exists for
1409 that purpose.
1410 .IP "\s-1XSPROTOARG\s0" 2
1411 .IX Item "XSPROTOARG"
1412 May be set to an empty string, which is identical to \f(CW\*(C`\-prototypes\*(C'\fR, or
1413 \&\f(CW\*(C`\-noprototypes\*(C'\fR. See the xsubpp documentation for details. MakeMaker
1414 defaults to the empty string.
1415 .IP "\s-1XS_VERSION\s0" 2
1416 .IX Item "XS_VERSION"
1417 Your version number for the .xs file of this package.  This defaults
1418 to the value of the \s-1VERSION\s0 attribute.
1419 .Sh "Additional lowercase attributes"
1420 .IX Subsection "Additional lowercase attributes"
1421 can be used to pass parameters to the methods which implement that
1422 part of the Makefile.  Parameters are specified as a hash ref but are
1423 passed to the method as a hash.
1424 .IP "clean" 2
1425 .IX Item "clean"
1426 .Vb 1
1427 \&  {FILES => "*.xyz foo"}
1428 .Ve
1429 .IP "depend" 2
1430 .IX Item "depend"
1431 .Vb 1
1432 \&  {ANY_TARGET => ANY_DEPENDENCY, ...}
1433 .Ve
1434 .Sp
1435 (\s-1ANY_TARGET\s0 must not be given a double-colon rule by MakeMaker.)
1436 .IP "dist" 2
1437 .IX Item "dist"
1438 .Vb 3
1439 \&  {TARFLAGS => 'cvfF', COMPRESS => 'gzip', SUFFIX => '.gz',
1440 \&  SHAR => 'shar \-m', DIST_CP => 'ln', ZIP => '/bin/zip',
1441 \&  ZIPFLAGS => '\-rl', DIST_DEFAULT => 'private tardist' }
1442 .Ve
1443 .Sp
1444 If you specify \s-1COMPRESS\s0, then \s-1SUFFIX\s0 should also be altered, as it is
1445 needed to tell make the target file of the compression. Setting
1446 \&\s-1DIST_CP\s0 to ln can be useful, if you need to preserve the timestamps on
1447 your files. \s-1DIST_CP\s0 can take the values 'cp', which copies the file,
1448 \&'ln', which links the file, and 'best' which copies symbolic links and
1449 links the rest. Default is 'best'.
1450 .IP "dynamic_lib" 2
1451 .IX Item "dynamic_lib"
1452 .Vb 1
1453 \&  {ARMAYBE => 'ar', OTHERLDFLAGS => '...', INST_DYNAMIC_DEP => '...'}
1454 .Ve
1455 .IP "linkext" 2
1456 .IX Item "linkext"
1457 .Vb 1
1458 \&  {LINKTYPE => 'static', 'dynamic' or ''}
1459 .Ve
1460 .Sp
1461 \&\s-1NB:\s0 Extensions that have nothing but *.pm files had to say
1462 .Sp
1463 .Vb 1
1464 \&  {LINKTYPE => ''}
1465 .Ve
1466 .Sp
1467 with Pre\-5.0 MakeMakers. Since version 5.00 of MakeMaker such a line
1468 can be deleted safely. MakeMaker recognizes when there's nothing to
1469 be linked.
1470 .IP "macro" 2
1471 .IX Item "macro"
1472 .Vb 1
1473 \&  {ANY_MACRO => ANY_VALUE, ...}
1474 .Ve
1475 .IP "postamble" 2
1476 .IX Item "postamble"
1477 Anything put here will be passed to \fIMY::postamble()\fR if you have one.
1478 .IP "realclean" 2
1479 .IX Item "realclean"
1480 .Vb 1
1481 \&  {FILES => '$(INST_ARCHAUTODIR)/*.xyz'}
1482 .Ve
1483 .IP "test" 2
1484 .IX Item "test"
1485 .Vb 1
1486 \&  {TESTS => 't/*.t'}
1487 .Ve
1488 .IP "tool_autosplit" 2
1489 .IX Item "tool_autosplit"
1490 .Vb 1
1491 \&  {MAXLEN => 8}
1492 .Ve
1493 .Sh "Overriding MakeMaker Methods"
1494 .IX Subsection "Overriding MakeMaker Methods"
1495 If you cannot achieve the desired Makefile behaviour by specifying
1496 attributes you may define private subroutines in the Makefile.PL.
1497 Each subroutine returns the text it wishes to have written to
1498 the Makefile. To override a section of the Makefile you can
1499 either say:
1500 .PP
1501 .Vb 1
1502 \&        sub MY::c_o { "new literal text" }
1503 .Ve
1504 .PP
1505 or you can edit the default by saying something like:
1506 .PP
1507 .Vb 6
1508 \&        package MY; # so that "SUPER" works right
1509 \&        sub c_o {
1510 \&            my $inherited = shift\->SUPER::c_o(@_);
1511 \&            $inherited =~ s/old text/new text/;
1512 \&            $inherited;
1513 \&        }
1514 .Ve
1515 .PP
1516 If you are running experiments with embedding perl as a library into
1517 other applications, you might find MakeMaker is not sufficient. You'd
1518 better have a look at ExtUtils::Embed which is a collection of utilities
1519 for embedding.
1520 .PP
1521 If you still need a different solution, try to develop another
1522 subroutine that fits your needs and submit the diffs to
1523 \&\f(CW\*(C`makemaker@perl.org\*(C'\fR
1524 .PP
1525 For a complete description of all MakeMaker methods see
1526 ExtUtils::MM_Unix.
1527 .PP
1528 Here is a simple example of how to add a new target to the generated
1529 Makefile:
1530 .PP
1531 .Vb 4
1532 \&    sub MY::postamble {
1533 \&        return <<'MAKE_FRAG';
1534 \&    $(MYEXTLIB): sdbm/Makefile
1535 \&            cd sdbm && $(MAKE) all
1536 .Ve
1537 .PP
1538 .Vb 2
1539 \&    MAKE_FRAG
1540 \&    }
1541 .Ve
1542 .Sh "The End Of Cargo Cult Programming"
1543 .IX Subsection "The End Of Cargo Cult Programming"
1544 \&\fIWriteMakefile()\fR now does some basic sanity checks on its parameters to
1545 protect against typos and malformatted values.  This means some things
1546 which happened to work in the past will now throw warnings and
1547 possibly produce internal errors.
1548 .PP
1549 Some of the most common mistakes:
1550 .ie n .IP """MAN3PODS => ' '""" 2
1551 .el .IP "\f(CWMAN3PODS => ' '\fR" 2
1552 .IX Item "MAN3PODS => ' '"
1553 This is commonly used to suppress the creation of man pages.  \s-1MAN3PODS\s0
1554 takes a hash ref not a string, but the above worked by accident in old
1555 versions of MakeMaker.
1556 .Sp
1557 The correct code is \f(CW\*(C`MAN3PODS => { }\*(C'\fR.
1558 .Sh "Hintsfile support"
1559 .IX Subsection "Hintsfile support"
1560 MakeMaker.pm uses the architecture specific information from
1561 Config.pm. In addition it evaluates architecture specific hints files
1562 in a \f(CW\*(C`hints/\*(C'\fR directory. The hints files are expected to be named
1563 like their counterparts in \f(CW\*(C`PERL_SRC/hints\*(C'\fR, but with an \f(CW\*(C`.pl\*(C'\fR file
1564 name extension (eg. \f(CW\*(C`next_3_2.pl\*(C'\fR). They are simply \f(CW\*(C`eval\*(C'\fRed by
1565 MakeMaker within the \fIWriteMakefile()\fR subroutine, and can be used to
1566 execute commands as well as to include special variables. The rules
1567 which hintsfile is chosen are the same as in Configure.
1568 .PP
1569 The hintsfile is \fIeval()\fRed immediately after the arguments given to
1570 WriteMakefile are stuffed into a hash reference \f(CW$self\fR but before this
1571 reference becomes blessed. So if you want to do the equivalent to
1572 override or create an attribute you would say something like
1573 .PP
1574 .Vb 1
1575 \&    $self\->{LIBS} = ['\-ldbm \-lucb \-lc'];
1576 .Ve
1577 .Sh "Distribution Support"
1578 .IX Subsection "Distribution Support"
1579 For authors of extensions MakeMaker provides several Makefile
1580 targets. Most of the support comes from the ExtUtils::Manifest module,
1581 where additional documentation can be found.
1582 .IP "make distcheck" 4
1583 .IX Item "make distcheck"
1584 reports which files are below the build directory but not in the
1585 \&\s-1MANIFEST\s0 file and vice versa. (See \fIExtUtils::Manifest::fullcheck()\fR for
1586 details)
1587 .IP "make skipcheck" 4
1588 .IX Item "make skipcheck"
1589 reports which files are skipped due to the entries in the
1590 \&\f(CW\*(C`MANIFEST.SKIP\*(C'\fR file (See \fIExtUtils::Manifest::skipcheck()\fR for
1591 details)
1592 .IP "make distclean" 4
1593 .IX Item "make distclean"
1594 does a realclean first and then the distcheck. Note that this is not
1595 needed to build a new distribution as long as you are sure that the
1596 \&\s-1MANIFEST\s0 file is ok.
1597 .IP "make manifest" 4
1598 .IX Item "make manifest"
1599 rewrites the \s-1MANIFEST\s0 file, adding all remaining files found (See
1600 \&\fIExtUtils::Manifest::mkmanifest()\fR for details)
1601 .IP "make distdir" 4
1602 .IX Item "make distdir"
1603 Copies all the files that are in the \s-1MANIFEST\s0 file to a newly created
1604 directory with the name \f(CW\*(C`$(DISTNAME)\-$(VERSION)\*(C'\fR. If that directory
1605 exists, it will be removed first.
1606 .Sp
1607 Additionally, it will create a \s-1META\s0.yml module meta-data file in the
1608 distdir and add this to the distdir's \s-1MANIFEST\s0.  You can shut this
1609 behavior off with the \s-1NO_META\s0 flag.
1610 .IP "make disttest" 4
1611 .IX Item "make disttest"
1612 Makes a distdir first, and runs a \f(CW\*(C`perl Makefile.PL\*(C'\fR, a make, and
1613 a make test in that directory.
1614 .IP "make tardist" 4
1615 .IX Item "make tardist"
1616 First does a distdir. Then a command $(\s-1PREOP\s0) which defaults to a null
1617 command, followed by $(\s-1TO_UNIX\s0), which defaults to a null command under
1618 \&\s-1UNIX\s0, and will convert files in distribution directory to \s-1UNIX\s0 format
1619 otherwise. Next it runs \f(CW\*(C`tar\*(C'\fR on that directory into a tarfile and
1620 deletes the directory. Finishes with a command $(\s-1POSTOP\s0) which
1621 defaults to a null command.
1622 .IP "make dist" 4
1623 .IX Item "make dist"
1624 Defaults to $(\s-1DIST_DEFAULT\s0) which in turn defaults to tardist.
1625 .IP "make uutardist" 4
1626 .IX Item "make uutardist"
1627 Runs a tardist first and uuencodes the tarfile.
1628 .IP "make shdist" 4
1629 .IX Item "make shdist"
1630 First does a distdir. Then a command $(\s-1PREOP\s0) which defaults to a null
1631 command. Next it runs \f(CW\*(C`shar\*(C'\fR on that directory into a sharfile and
1632 deletes the intermediate directory again. Finishes with a command
1633 $(\s-1POSTOP\s0) which defaults to a null command.  Note: For shdist to work
1634 properly a \f(CW\*(C`shar\*(C'\fR program that can handle directories is mandatory.
1635 .IP "make zipdist" 4
1636 .IX Item "make zipdist"
1637 First does a distdir. Then a command $(\s-1PREOP\s0) which defaults to a null
1638 command. Runs \f(CW\*(C`$(ZIP) $(ZIPFLAGS)\*(C'\fR on that directory into a
1639 zipfile. Then deletes that directory. Finishes with a command
1640 $(\s-1POSTOP\s0) which defaults to a null command.
1641 .IP "make ci" 4
1642 .IX Item "make ci"
1643 Does a $(\s-1CI\s0) and a $(\s-1RCS_LABEL\s0) on all files in the \s-1MANIFEST\s0 file.
1644 .PP
1645 Customization of the dist targets can be done by specifying a hash
1646 reference to the dist attribute of the WriteMakefile call. The
1647 following parameters are recognized:
1648 .PP
1649 .Vb 12
1650 \&    CI           ('ci \-u')
1651 \&    COMPRESS     ('gzip \-\-best')
1652 \&    POSTOP       ('@ :')
1653 \&    PREOP        ('@ :')
1654 \&    TO_UNIX      (depends on the system)
1655 \&    RCS_LABEL    ('rcs \-q \-Nv$(VERSION_SYM):')
1656 \&    SHAR         ('shar')
1657 \&    SUFFIX       ('.gz')
1658 \&    TAR          ('tar')
1659 \&    TARFLAGS     ('cvf')
1660 \&    ZIP          ('zip')
1661 \&    ZIPFLAGS     ('\-r')
1662 .Ve
1663 .PP
1664 An example:
1665 .PP
1666 .Vb 7
1667 \&    WriteMakefile(
1668 \&        ...other options...
1669 \&        dist => {
1670 \&            COMPRESS => "bzip2",
1671 \&            SUFFIX   => ".bz2"
1672 \&        }
1673 \&    );
1674 .Ve
1675 .Sh "Module Meta-Data"
1676 .IX Subsection "Module Meta-Data"
1677 Long plaguing users of MakeMaker based modules has been the problem of
1678 getting basic information about the module out of the sources
1679 \&\fIwithout\fR running the \fIMakefile.PL\fR and doing a bunch of messy
1680 heuristics on the resulting \fIMakefile\fR.  To this end a simple module
1681 meta-data file has been introduced, \fI\s-1META\s0.yml\fR.
1682 .PP
1683 \&\fI\s-1META\s0.yml\fR is a \s-1YAML\s0 document (see http://www.yaml.org) containing
1684 basic information about the module (name, version, prerequisites...)
1685 in an easy to read format.  The format is developed and defined by the
1686 Module::Build developers (see 
1687 http://module\-build.sourceforge.net/META\-spec.html)
1688 .PP
1689 MakeMaker will automatically generate a \fI\s-1META\s0.yml\fR file for you and
1690 add it to your \fI\s-1MANIFEST\s0\fR as part of the 'distdir' target (and thus
1691 the 'dist' target).  This is intended to seamlessly and rapidly
1692 populate \s-1CPAN\s0 with module meta\-data.  If you wish to shut this feature
1693 off, set the \f(CW\*(C`NO_META\*(C'\fR \f(CW\*(C`WriteMakefile()\*(C'\fR flag to true.
1694 .Sh "Disabling an extension"
1695 .IX Subsection "Disabling an extension"
1696 If some events detected in \fIMakefile.PL\fR imply that there is no way
1697 to create the Module, but this is a normal state of things, then you
1698 can create a \fIMakefile\fR which does nothing, but succeeds on all the
1699 \&\*(L"usual\*(R" build targets.  To do so, use
1700 .PP
1701 .Vb 2
1702 \&    use ExtUtils::MakeMaker qw(WriteEmptyMakefile);
1703 \&    WriteEmptyMakefile();
1704 .Ve
1705 .PP
1706 instead of \fIWriteMakefile()\fR.
1707 .PP
1708 This may be useful if other modules expect this module to be \fIbuilt\fR
1709 \&\s-1OK\s0, as opposed to \fIwork\fR \s-1OK\s0 (say, this system-dependent module builds
1710 in a subdirectory of some other distribution, or is listed as a
1711 dependency in a CPAN::Bundle, but the functionality is supported by
1712 different means on the current architecture).
1713 .Sh "Other Handy Functions"
1714 .IX Subsection "Other Handy Functions"
1715 .IP "prompt" 4
1716 .IX Item "prompt"
1717 .Vb 2
1718 \&    my $value = prompt($message);
1719 \&    my $value = prompt($message, $default);
1720 .Ve
1721 .Sp
1722 The \f(CW\*(C`prompt()\*(C'\fR function provides an easy way to request user input
1723 used to write a makefile.  It displays the \f(CW$message\fR as a prompt for
1724 input.  If a \f(CW$default\fR is provided it will be used as a default.  The
1725 function returns the \f(CW$value\fR selected by the user.
1726 .Sp
1727 If \f(CW\*(C`prompt()\*(C'\fR detects that it is not running interactively and there
1728 is nothing on \s-1STDIN\s0 or if the \s-1PERL_MM_USE_DEFAULT\s0 environment variable
1729 is set to true, the \f(CW$default\fR will be used without prompting.  This
1730 prevents automated processes from blocking on user input. 
1731 .Sp
1732 If no \f(CW$default\fR is provided an empty string will be used instead.
1733 .SH "ENVIRONMENT"
1734 .IX Header "ENVIRONMENT"
1735 .IP "\s-1PERL_MM_OPT\s0" 4
1736 .IX Item "PERL_MM_OPT"
1737 Command line options used by \f(CW\*(C`MakeMaker\->new()\*(C'\fR, and thus by
1738 \&\f(CW\*(C`WriteMakefile()\*(C'\fR.  The string is split on whitespace, and the result
1739 is processed before any actual command line arguments are processed.
1740 .IP "\s-1PERL_MM_USE_DEFAULT\s0" 4
1741 .IX Item "PERL_MM_USE_DEFAULT"
1742 If set to a true value then MakeMaker's prompt function will
1743 always return the default without waiting for user input.
1744 .IP "\s-1PERL_CORE\s0" 4
1745 .IX Item "PERL_CORE"
1746 Same as the \s-1PERL_CORE\s0 parameter.  The parameter overrides this.
1747 .SH "SEE ALSO"
1748 .IX Header "SEE ALSO"
1749 Module::Build is a pure-Perl alternative to MakeMaker which does
1750 not rely on make or any other external utility.  It is easier to
1751 extend to suit your needs.
1752 .PP
1753 Module::Install is a wrapper around MakeMaker which adds features
1754 not normally available.
1755 .PP
1756 ExtUtils::ModuleMaker and Module::Starter are both modules to
1757 help you setup your distribution.
1758 .SH "AUTHORS"
1759 .IX Header "AUTHORS"
1760 Andy Dougherty \f(CW\*(C`doughera@lafayette.edu\*(C'\fR, Andreas Ko\*:nig
1761 \&\f(CW\*(C`andreas.koenig@mind.de\*(C'\fR, Tim Bunce \f(CW\*(C`timb@cpan.org\*(C'\fR.  \s-1VMS\s0
1762 support by Charles Bailey \f(CW\*(C`bailey@newman.upenn.edu\*(C'\fR.  \s-1OS/2\s0 support
1763 by Ilya Zakharevich \f(CW\*(C`ilya@math.ohio\-state.edu\*(C'\fR.
1764 .PP
1765 Currently maintained by Michael G Schwern \f(CW\*(C`schwern@pobox.com\*(C'\fR
1766 .PP
1767 Send patches and ideas to \f(CW\*(C`makemaker@perl.org\*(C'\fR.
1768 .PP
1769 Send bug reports via http://rt.cpan.org/.  Please send your
1770 generated Makefile along with your report.
1771 .PP
1772 For more up-to-date information, see <http://www.makemaker.org>.
1773 .SH "LICENSE"
1774 .IX Header "LICENSE"
1775 This program is free software; you can redistribute it and/or 
1776 modify it under the same terms as Perl itself.
1777 .PP
1778 See <http://www.perl.com/perl/misc/Artistic.html>