1*0Sstevel@tonic-gatepackage ExtUtils::MakeMaker;
2*0Sstevel@tonic-gate
3*0Sstevel@tonic-gateBEGIN {require 5.005_03;}
4*0Sstevel@tonic-gate
5*0Sstevel@tonic-gate$VERSION = '6.17';
6*0Sstevel@tonic-gate($Revision) = q$Revision: 1.133 $ =~ /Revision:\s+(\S+)/;
7*0Sstevel@tonic-gate
8*0Sstevel@tonic-gaterequire Exporter;
9*0Sstevel@tonic-gateuse Config;
10*0Sstevel@tonic-gateuse Carp ();
11*0Sstevel@tonic-gateuse File::Path;
12*0Sstevel@tonic-gate
13*0Sstevel@tonic-gateuse vars qw(
14*0Sstevel@tonic-gate            @ISA @EXPORT @EXPORT_OK
15*0Sstevel@tonic-gate            $Revision $VERSION $Verbose %Config
16*0Sstevel@tonic-gate            @Prepend_parent @Parent
17*0Sstevel@tonic-gate            %Recognized_Att_Keys @Get_from_Config @MM_Sections @Overridable
18*0Sstevel@tonic-gate            $Filename
19*0Sstevel@tonic-gate           );
20*0Sstevel@tonic-gateuse strict;
21*0Sstevel@tonic-gate
22*0Sstevel@tonic-gate@ISA = qw(Exporter);
23*0Sstevel@tonic-gate@EXPORT = qw(&WriteMakefile &writeMakefile $Verbose &prompt);
24*0Sstevel@tonic-gate@EXPORT_OK = qw($VERSION &neatvalue &mkbootstrap &mksymlists);
25*0Sstevel@tonic-gate
26*0Sstevel@tonic-gate# These will go away once the last of the Win32 & VMS specific code is
27*0Sstevel@tonic-gate# purged.
28*0Sstevel@tonic-gatemy $Is_VMS     = $^O eq 'VMS';
29*0Sstevel@tonic-gatemy $Is_Win32   = $^O eq 'MSWin32';
30*0Sstevel@tonic-gate
31*0Sstevel@tonic-gate# Our filename for diagnostic and debugging purposes.  More reliable
32*0Sstevel@tonic-gate# than %INC (think caseless filesystems)
33*0Sstevel@tonic-gate$Filename = __FILE__;
34*0Sstevel@tonic-gate
35*0Sstevel@tonic-gatefull_setup();
36*0Sstevel@tonic-gate
37*0Sstevel@tonic-gaterequire ExtUtils::MM;  # Things like CPAN assume loading ExtUtils::MakeMaker
38*0Sstevel@tonic-gate                       # will give them MM.
39*0Sstevel@tonic-gate
40*0Sstevel@tonic-gaterequire ExtUtils::MY;  # XXX pre-5.8 versions of ExtUtils::Embed expect
41*0Sstevel@tonic-gate                       # loading ExtUtils::MakeMaker will give them MY.
42*0Sstevel@tonic-gate                       # This will go when Embed is it's own CPAN module.
43*0Sstevel@tonic-gate
44*0Sstevel@tonic-gate
45*0Sstevel@tonic-gatesub WriteMakefile {
46*0Sstevel@tonic-gate    Carp::croak "WriteMakefile: Need even number of args" if @_ % 2;
47*0Sstevel@tonic-gate
48*0Sstevel@tonic-gate    require ExtUtils::MY;
49*0Sstevel@tonic-gate    my %att = @_;
50*0Sstevel@tonic-gate
51*0Sstevel@tonic-gate    _verify_att(\%att);
52*0Sstevel@tonic-gate
53*0Sstevel@tonic-gate    my $mm = MM->new(\%att);
54*0Sstevel@tonic-gate    $mm->flush;
55*0Sstevel@tonic-gate
56*0Sstevel@tonic-gate    return $mm;
57*0Sstevel@tonic-gate}
58*0Sstevel@tonic-gate
59*0Sstevel@tonic-gate
60*0Sstevel@tonic-gate# Basic signatures of the attributes WriteMakefile takes.  Each is the
61*0Sstevel@tonic-gate# reference type.  Empty value indicate it takes a non-reference
62*0Sstevel@tonic-gate# scalar.
63*0Sstevel@tonic-gatemy %Att_Sigs;
64*0Sstevel@tonic-gatemy %Special_Sigs = (
65*0Sstevel@tonic-gate C                  => 'array',
66*0Sstevel@tonic-gate CONFIG             => 'array',
67*0Sstevel@tonic-gate CONFIGURE          => 'code',
68*0Sstevel@tonic-gate DIR                => 'array',
69*0Sstevel@tonic-gate DL_FUNCS           => 'hash',
70*0Sstevel@tonic-gate DL_VARS            => 'array',
71*0Sstevel@tonic-gate EXCLUDE_EXT        => 'array',
72*0Sstevel@tonic-gate EXE_FILES          => 'array',
73*0Sstevel@tonic-gate FUNCLIST           => 'array',
74*0Sstevel@tonic-gate H                  => 'array',
75*0Sstevel@tonic-gate IMPORTS            => 'hash',
76*0Sstevel@tonic-gate INCLUDE_EXT        => 'array',
77*0Sstevel@tonic-gate LIBS               => ['array',''],
78*0Sstevel@tonic-gate MAN1PODS           => 'hash',
79*0Sstevel@tonic-gate MAN3PODS           => 'hash',
80*0Sstevel@tonic-gate PL_FILES           => 'hash',
81*0Sstevel@tonic-gate PM                 => 'hash',
82*0Sstevel@tonic-gate PMLIBDIRS          => 'array',
83*0Sstevel@tonic-gate PREREQ_PM          => 'hash',
84*0Sstevel@tonic-gate SKIP               => 'array',
85*0Sstevel@tonic-gate TYPEMAPS           => 'array',
86*0Sstevel@tonic-gate XS                 => 'hash',
87*0Sstevel@tonic-gate _KEEP_AFTER_FLUSH  => '',
88*0Sstevel@tonic-gate
89*0Sstevel@tonic-gate clean      => 'hash',
90*0Sstevel@tonic-gate depend     => 'hash',
91*0Sstevel@tonic-gate dist       => 'hash',
92*0Sstevel@tonic-gate dynamic_lib=> 'hash',
93*0Sstevel@tonic-gate linkext    => 'hash',
94*0Sstevel@tonic-gate macro      => 'hash',
95*0Sstevel@tonic-gate postamble  => 'hash',
96*0Sstevel@tonic-gate realclean  => 'hash',
97*0Sstevel@tonic-gate test       => 'hash',
98*0Sstevel@tonic-gate tool_autosplit => 'hash',
99*0Sstevel@tonic-gate);
100*0Sstevel@tonic-gate
101*0Sstevel@tonic-gate@Att_Sigs{keys %Recognized_Att_Keys} = ('') x keys %Recognized_Att_Keys;
102*0Sstevel@tonic-gate@Att_Sigs{keys %Special_Sigs} = values %Special_Sigs;
103*0Sstevel@tonic-gate
104*0Sstevel@tonic-gate
105*0Sstevel@tonic-gatesub _verify_att {
106*0Sstevel@tonic-gate    my($att) = @_;
107*0Sstevel@tonic-gate
108*0Sstevel@tonic-gate    while( my($key, $val) = each %$att ) {
109*0Sstevel@tonic-gate        my $sig = $Att_Sigs{$key};
110*0Sstevel@tonic-gate        unless( defined $sig ) {
111*0Sstevel@tonic-gate            warn "WARNING: $key is not a known parameter.\n";
112*0Sstevel@tonic-gate            next;
113*0Sstevel@tonic-gate        }
114*0Sstevel@tonic-gate
115*0Sstevel@tonic-gate        my @sigs   = ref $sig ? @$sig : $sig;
116*0Sstevel@tonic-gate        my $given = lc ref $val;
117*0Sstevel@tonic-gate        unless( grep $given eq $_, @sigs ) {
118*0Sstevel@tonic-gate            my $takes = join " or ", map { $_ ne '' ? "$_ reference"
119*0Sstevel@tonic-gate                                                    : "string/number"
120*0Sstevel@tonic-gate                                         } @sigs;
121*0Sstevel@tonic-gate            my $has   = $given ne '' ? "$given reference"
122*0Sstevel@tonic-gate                                     : "string/number";
123*0Sstevel@tonic-gate            warn "WARNING: $key takes a $takes not a $has.\n".
124*0Sstevel@tonic-gate                 "         Please inform the author.\n";
125*0Sstevel@tonic-gate        }
126*0Sstevel@tonic-gate    }
127*0Sstevel@tonic-gate}
128*0Sstevel@tonic-gate
129*0Sstevel@tonic-gatesub prompt ($;$) {
130*0Sstevel@tonic-gate    my($mess, $def) = @_;
131*0Sstevel@tonic-gate    Carp::confess("prompt function called without an argument")
132*0Sstevel@tonic-gate        unless defined $mess;
133*0Sstevel@tonic-gate
134*0Sstevel@tonic-gate    my $isa_tty = -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)) ;
135*0Sstevel@tonic-gate
136*0Sstevel@tonic-gate    my $dispdef = defined $def ? "[$def] " : " ";
137*0Sstevel@tonic-gate    $def = defined $def ? $def : "";
138*0Sstevel@tonic-gate
139*0Sstevel@tonic-gate    local $|=1;
140*0Sstevel@tonic-gate    local $\;
141*0Sstevel@tonic-gate    print "$mess $dispdef";
142*0Sstevel@tonic-gate
143*0Sstevel@tonic-gate    my $ans;
144*0Sstevel@tonic-gate    if ($ENV{PERL_MM_USE_DEFAULT} || (!$isa_tty && eof STDIN)) {
145*0Sstevel@tonic-gate        print "$def\n";
146*0Sstevel@tonic-gate    }
147*0Sstevel@tonic-gate    else {
148*0Sstevel@tonic-gate        $ans = <STDIN>;
149*0Sstevel@tonic-gate        if( defined $ans ) {
150*0Sstevel@tonic-gate            chomp $ans;
151*0Sstevel@tonic-gate        }
152*0Sstevel@tonic-gate        else { # user hit ctrl-D
153*0Sstevel@tonic-gate            print "\n";
154*0Sstevel@tonic-gate        }
155*0Sstevel@tonic-gate    }
156*0Sstevel@tonic-gate
157*0Sstevel@tonic-gate    return (!defined $ans || $ans eq '') ? $def : $ans;
158*0Sstevel@tonic-gate}
159*0Sstevel@tonic-gate
160*0Sstevel@tonic-gatesub eval_in_subdirs {
161*0Sstevel@tonic-gate    my($self) = @_;
162*0Sstevel@tonic-gate    use Cwd qw(cwd abs_path);
163*0Sstevel@tonic-gate    my $pwd = cwd() || die "Can't figure out your cwd!";
164*0Sstevel@tonic-gate
165*0Sstevel@tonic-gate    local @INC = map eval {abs_path($_) if -e} || $_, @INC;
166*0Sstevel@tonic-gate    push @INC, '.';     # '.' has to always be at the end of @INC
167*0Sstevel@tonic-gate
168*0Sstevel@tonic-gate    foreach my $dir (@{$self->{DIR}}){
169*0Sstevel@tonic-gate        my($abs) = $self->catdir($pwd,$dir);
170*0Sstevel@tonic-gate        $self->eval_in_x($abs);
171*0Sstevel@tonic-gate    }
172*0Sstevel@tonic-gate    chdir $pwd;
173*0Sstevel@tonic-gate}
174*0Sstevel@tonic-gate
175*0Sstevel@tonic-gatesub eval_in_x {
176*0Sstevel@tonic-gate    my($self,$dir) = @_;
177*0Sstevel@tonic-gate    chdir $dir or Carp::carp("Couldn't change to directory $dir: $!");
178*0Sstevel@tonic-gate
179*0Sstevel@tonic-gate    {
180*0Sstevel@tonic-gate        package main;
181*0Sstevel@tonic-gate        do './Makefile.PL';
182*0Sstevel@tonic-gate    };
183*0Sstevel@tonic-gate    if ($@) {
184*0Sstevel@tonic-gate#         if ($@ =~ /prerequisites/) {
185*0Sstevel@tonic-gate#             die "MakeMaker WARNING: $@";
186*0Sstevel@tonic-gate#         } else {
187*0Sstevel@tonic-gate#             warn "WARNING from evaluation of $dir/Makefile.PL: $@";
188*0Sstevel@tonic-gate#         }
189*0Sstevel@tonic-gate        die "ERROR from evaluation of $dir/Makefile.PL: $@";
190*0Sstevel@tonic-gate    }
191*0Sstevel@tonic-gate}
192*0Sstevel@tonic-gate
193*0Sstevel@tonic-gate
194*0Sstevel@tonic-gate# package name for the classes into which the first object will be blessed
195*0Sstevel@tonic-gatemy $PACKNAME = 'PACK000';
196*0Sstevel@tonic-gate
197*0Sstevel@tonic-gatesub full_setup {
198*0Sstevel@tonic-gate    $Verbose ||= 0;
199*0Sstevel@tonic-gate
200*0Sstevel@tonic-gate    my @attrib_help = qw/
201*0Sstevel@tonic-gate
202*0Sstevel@tonic-gate    AUTHOR ABSTRACT ABSTRACT_FROM BINARY_LOCATION
203*0Sstevel@tonic-gate    C CAPI CCFLAGS CONFIG CONFIGURE DEFINE DIR DISTNAME DL_FUNCS DL_VARS
204*0Sstevel@tonic-gate    EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE
205*0Sstevel@tonic-gate    FULLPERL FULLPERLRUN FULLPERLRUNINST
206*0Sstevel@tonic-gate    FUNCLIST H IMPORTS
207*0Sstevel@tonic-gate
208*0Sstevel@tonic-gate    INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB INST_MAN1DIR INST_MAN3DIR
209*0Sstevel@tonic-gate    INSTALLDIRS
210*0Sstevel@tonic-gate    DESTDIR PREFIX
211*0Sstevel@tonic-gate    PERLPREFIX      SITEPREFIX      VENDORPREFIX
212*0Sstevel@tonic-gate    INSTALLPRIVLIB  INSTALLSITELIB  INSTALLVENDORLIB
213*0Sstevel@tonic-gate    INSTALLARCHLIB  INSTALLSITEARCH INSTALLVENDORARCH
214*0Sstevel@tonic-gate    INSTALLBIN      INSTALLSITEBIN  INSTALLVENDORBIN
215*0Sstevel@tonic-gate    INSTALLMAN1DIR          INSTALLMAN3DIR
216*0Sstevel@tonic-gate    INSTALLSITEMAN1DIR      INSTALLSITEMAN3DIR
217*0Sstevel@tonic-gate    INSTALLVENDORMAN1DIR    INSTALLVENDORMAN3DIR
218*0Sstevel@tonic-gate    INSTALLSCRIPT
219*0Sstevel@tonic-gate    PERL_LIB        PERL_ARCHLIB
220*0Sstevel@tonic-gate    SITELIBEXP      SITEARCHEXP
221*0Sstevel@tonic-gate
222*0Sstevel@tonic-gate    INC INCLUDE_EXT LDFROM LIB LIBPERL_A LIBS
223*0Sstevel@tonic-gate    LINKTYPE MAKEAPERL MAKEFILE MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET
224*0Sstevel@tonic-gate    MYEXTLIB NAME NEEDS_LINKING NOECHO NO_META NORECURS NO_VC OBJECT OPTIMIZE
225*0Sstevel@tonic-gate    PERL_MALLOC_OK PERL PERLMAINCC PERLRUN PERLRUNINST PERL_CORE
226*0Sstevel@tonic-gate    PERL_SRC PERM_RW PERM_RWX
227*0Sstevel@tonic-gate    PL_FILES PM PM_FILTER PMLIBDIRS POLLUTE PPM_INSTALL_EXEC
228*0Sstevel@tonic-gate    PPM_INSTALL_SCRIPT PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ
229*0Sstevel@tonic-gate    SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG
230*0Sstevel@tonic-gate    XS_VERSION clean depend dist dynamic_lib linkext macro realclean
231*0Sstevel@tonic-gate    tool_autosplit
232*0Sstevel@tonic-gate
233*0Sstevel@tonic-gate    MACPERL_SRC MACPERL_LIB MACLIBS_68K MACLIBS_PPC MACLIBS_SC MACLIBS_MRC
234*0Sstevel@tonic-gate    MACLIBS_ALL_68K MACLIBS_ALL_PPC MACLIBS_SHARED
235*0Sstevel@tonic-gate        /;
236*0Sstevel@tonic-gate
237*0Sstevel@tonic-gate    # IMPORTS is used under OS/2 and Win32
238*0Sstevel@tonic-gate
239*0Sstevel@tonic-gate    # @Overridable is close to @MM_Sections but not identical.  The
240*0Sstevel@tonic-gate    # order is important. Many subroutines declare macros. These
241*0Sstevel@tonic-gate    # depend on each other. Let's try to collect the macros up front,
242*0Sstevel@tonic-gate    # then pasthru, then the rules.
243*0Sstevel@tonic-gate
244*0Sstevel@tonic-gate    # MM_Sections are the sections we have to call explicitly
245*0Sstevel@tonic-gate    # in Overridable we have subroutines that are used indirectly
246*0Sstevel@tonic-gate
247*0Sstevel@tonic-gate
248*0Sstevel@tonic-gate    @MM_Sections =
249*0Sstevel@tonic-gate        qw(
250*0Sstevel@tonic-gate
251*0Sstevel@tonic-gate post_initialize const_config constants platform_constants
252*0Sstevel@tonic-gate tool_autosplit tool_xsubpp tools_other
253*0Sstevel@tonic-gate
254*0Sstevel@tonic-gate makemakerdflt
255*0Sstevel@tonic-gate
256*0Sstevel@tonic-gate dist macro depend cflags const_loadlibs const_cccmd
257*0Sstevel@tonic-gate post_constants
258*0Sstevel@tonic-gate
259*0Sstevel@tonic-gate pasthru
260*0Sstevel@tonic-gate
261*0Sstevel@tonic-gate special_targets
262*0Sstevel@tonic-gate c_o xs_c xs_o
263*0Sstevel@tonic-gate top_targets linkext dlsyms dynamic dynamic_bs
264*0Sstevel@tonic-gate dynamic_lib static static_lib manifypods processPL
265*0Sstevel@tonic-gate installbin subdirs
266*0Sstevel@tonic-gate clean_subdirs clean realclean_subdirs realclean
267*0Sstevel@tonic-gate metafile metafile_addtomanifest
268*0Sstevel@tonic-gate dist_basics dist_core distdir dist_test dist_ci
269*0Sstevel@tonic-gate install force perldepend makefile staticmake test ppd
270*0Sstevel@tonic-gate
271*0Sstevel@tonic-gate          ); # loses section ordering
272*0Sstevel@tonic-gate
273*0Sstevel@tonic-gate    @Overridable = @MM_Sections;
274*0Sstevel@tonic-gate    push @Overridable, qw[
275*0Sstevel@tonic-gate
276*0Sstevel@tonic-gate dir_target libscan makeaperl needs_linking perm_rw perm_rwx
277*0Sstevel@tonic-gate subdir_x test_via_harness test_via_script init_PERL
278*0Sstevel@tonic-gate                         ];
279*0Sstevel@tonic-gate
280*0Sstevel@tonic-gate    push @MM_Sections, qw[
281*0Sstevel@tonic-gate
282*0Sstevel@tonic-gate pm_to_blib selfdocument
283*0Sstevel@tonic-gate
284*0Sstevel@tonic-gate                         ];
285*0Sstevel@tonic-gate
286*0Sstevel@tonic-gate    # Postamble needs to be the last that was always the case
287*0Sstevel@tonic-gate    push @MM_Sections, "postamble";
288*0Sstevel@tonic-gate    push @Overridable, "postamble";
289*0Sstevel@tonic-gate
290*0Sstevel@tonic-gate    # All sections are valid keys.
291*0Sstevel@tonic-gate    @Recognized_Att_Keys{@MM_Sections} = (1) x @MM_Sections;
292*0Sstevel@tonic-gate
293*0Sstevel@tonic-gate    # we will use all these variables in the Makefile
294*0Sstevel@tonic-gate    @Get_from_Config =
295*0Sstevel@tonic-gate        qw(
296*0Sstevel@tonic-gate           ar cc cccdlflags ccdlflags dlext dlsrc ld lddlflags ldflags libc
297*0Sstevel@tonic-gate           lib_ext obj_ext osname osvers ranlib sitelibexp sitearchexp so
298*0Sstevel@tonic-gate           exe_ext full_ar
299*0Sstevel@tonic-gate          );
300*0Sstevel@tonic-gate
301*0Sstevel@tonic-gate    # 5.5.3 doesn't have any concept of vendor libs
302*0Sstevel@tonic-gate    push @Get_from_Config, qw( vendorarchexp vendorlibexp ) if $] >= 5.006;
303*0Sstevel@tonic-gate
304*0Sstevel@tonic-gate    foreach my $item (@attrib_help){
305*0Sstevel@tonic-gate        $Recognized_Att_Keys{$item} = 1;
306*0Sstevel@tonic-gate    }
307*0Sstevel@tonic-gate    foreach my $item (@Get_from_Config) {
308*0Sstevel@tonic-gate        $Recognized_Att_Keys{uc $item} = $Config{$item};
309*0Sstevel@tonic-gate        print "Attribute '\U$item\E' => '$Config{$item}'\n"
310*0Sstevel@tonic-gate            if ($Verbose >= 2);
311*0Sstevel@tonic-gate    }
312*0Sstevel@tonic-gate
313*0Sstevel@tonic-gate    #
314*0Sstevel@tonic-gate    # When we eval a Makefile.PL in a subdirectory, that one will ask
315*0Sstevel@tonic-gate    # us (the parent) for the values and will prepend "..", so that
316*0Sstevel@tonic-gate    # all files to be installed end up below OUR ./blib
317*0Sstevel@tonic-gate    #
318*0Sstevel@tonic-gate    @Prepend_parent = qw(
319*0Sstevel@tonic-gate           INST_BIN INST_LIB INST_ARCHLIB INST_SCRIPT
320*0Sstevel@tonic-gate           MAP_TARGET INST_MAN1DIR INST_MAN3DIR PERL_SRC
321*0Sstevel@tonic-gate           PERL FULLPERL
322*0Sstevel@tonic-gate    );
323*0Sstevel@tonic-gate}
324*0Sstevel@tonic-gate
325*0Sstevel@tonic-gatesub writeMakefile {
326*0Sstevel@tonic-gate    die <<END;
327*0Sstevel@tonic-gate
328*0Sstevel@tonic-gateThe extension you are trying to build apparently is rather old and
329*0Sstevel@tonic-gatemost probably outdated. We detect that from the fact, that a
330*0Sstevel@tonic-gatesubroutine "writeMakefile" is called, and this subroutine is not
331*0Sstevel@tonic-gatesupported anymore since about October 1994.
332*0Sstevel@tonic-gate
333*0Sstevel@tonic-gatePlease contact the author or look into CPAN (details about CPAN can be
334*0Sstevel@tonic-gatefound in the FAQ and at http:/www.perl.com) for a more recent version
335*0Sstevel@tonic-gateof the extension. If you're really desperate, you can try to change
336*0Sstevel@tonic-gatethe subroutine name from writeMakefile to WriteMakefile and rerun
337*0Sstevel@tonic-gate'perl Makefile.PL', but you're most probably left alone, when you do
338*0Sstevel@tonic-gateso.
339*0Sstevel@tonic-gate
340*0Sstevel@tonic-gateThe MakeMaker team
341*0Sstevel@tonic-gate
342*0Sstevel@tonic-gateEND
343*0Sstevel@tonic-gate}
344*0Sstevel@tonic-gate
345*0Sstevel@tonic-gatesub new {
346*0Sstevel@tonic-gate    my($class,$self) = @_;
347*0Sstevel@tonic-gate    my($key);
348*0Sstevel@tonic-gate
349*0Sstevel@tonic-gate    # Store the original args passed to WriteMakefile()
350*0Sstevel@tonic-gate    foreach my $k (keys %$self) {
351*0Sstevel@tonic-gate        $self->{ARGS}{$k} = $self->{$k};
352*0Sstevel@tonic-gate    }
353*0Sstevel@tonic-gate
354*0Sstevel@tonic-gate    if ("@ARGV" =~ /\bPREREQ_PRINT\b/) {
355*0Sstevel@tonic-gate        require Data::Dumper;
356*0Sstevel@tonic-gate        print Data::Dumper->Dump([$self->{PREREQ_PM}], [qw(PREREQ_PM)]);
357*0Sstevel@tonic-gate        exit 0;
358*0Sstevel@tonic-gate    }
359*0Sstevel@tonic-gate
360*0Sstevel@tonic-gate    # PRINT_PREREQ is RedHatism.
361*0Sstevel@tonic-gate    if ("@ARGV" =~ /\bPRINT_PREREQ\b/) {
362*0Sstevel@tonic-gate        print join(" ", map { "perl($_)>=$self->{PREREQ_PM}->{$_} " }
363*0Sstevel@tonic-gate                        sort keys %{$self->{PREREQ_PM}}), "\n";
364*0Sstevel@tonic-gate        exit 0;
365*0Sstevel@tonic-gate   }
366*0Sstevel@tonic-gate
367*0Sstevel@tonic-gate    print STDOUT "MakeMaker (v$VERSION)\n" if $Verbose;
368*0Sstevel@tonic-gate    if (-f "MANIFEST" && ! -f "Makefile"){
369*0Sstevel@tonic-gate        check_manifest();
370*0Sstevel@tonic-gate    }
371*0Sstevel@tonic-gate
372*0Sstevel@tonic-gate    $self = {} unless (defined $self);
373*0Sstevel@tonic-gate
374*0Sstevel@tonic-gate    check_hints($self);
375*0Sstevel@tonic-gate
376*0Sstevel@tonic-gate    my %configure_att;         # record &{$self->{CONFIGURE}} attributes
377*0Sstevel@tonic-gate    my(%initial_att) = %$self; # record initial attributes
378*0Sstevel@tonic-gate
379*0Sstevel@tonic-gate    my(%unsatisfied) = ();
380*0Sstevel@tonic-gate    foreach my $prereq (sort keys %{$self->{PREREQ_PM}}) {
381*0Sstevel@tonic-gate        # 5.8.0 has a bug with require Foo::Bar alone in an eval, so an
382*0Sstevel@tonic-gate        # extra statement is a workaround.
383*0Sstevel@tonic-gate        eval "require $prereq; 0";
384*0Sstevel@tonic-gate
385*0Sstevel@tonic-gate        my $pr_version = $prereq->VERSION || 0;
386*0Sstevel@tonic-gate
387*0Sstevel@tonic-gate        # convert X.Y_Z alpha version #s to X.YZ for easier comparisons
388*0Sstevel@tonic-gate        $pr_version =~ s/(\d+)\.(\d+)_(\d+)/$1.$2$3/;
389*0Sstevel@tonic-gate
390*0Sstevel@tonic-gate        if ($@) {
391*0Sstevel@tonic-gate            warn sprintf "Warning: prerequisite %s %s not found.\n",
392*0Sstevel@tonic-gate              $prereq, $self->{PREREQ_PM}{$prereq}
393*0Sstevel@tonic-gate                   unless $self->{PREREQ_FATAL};
394*0Sstevel@tonic-gate            $unsatisfied{$prereq} = 'not installed';
395*0Sstevel@tonic-gate        } elsif ($pr_version < $self->{PREREQ_PM}->{$prereq} ){
396*0Sstevel@tonic-gate            warn sprintf "Warning: prerequisite %s %s not found. We have %s.\n",
397*0Sstevel@tonic-gate              $prereq, $self->{PREREQ_PM}{$prereq},
398*0Sstevel@tonic-gate                ($pr_version || 'unknown version')
399*0Sstevel@tonic-gate                  unless $self->{PREREQ_FATAL};
400*0Sstevel@tonic-gate            $unsatisfied{$prereq} = $self->{PREREQ_PM}->{$prereq} ?
401*0Sstevel@tonic-gate              $self->{PREREQ_PM}->{$prereq} : 'unknown version' ;
402*0Sstevel@tonic-gate        }
403*0Sstevel@tonic-gate    }
404*0Sstevel@tonic-gate    if (%unsatisfied && $self->{PREREQ_FATAL}){
405*0Sstevel@tonic-gate        my $failedprereqs = join ', ', map {"$_ $unsatisfied{$_}"}
406*0Sstevel@tonic-gate                            keys %unsatisfied;
407*0Sstevel@tonic-gate        die qq{MakeMaker FATAL: prerequisites not found ($failedprereqs)\n
408*0Sstevel@tonic-gate               Please install these modules first and rerun 'perl Makefile.PL'.\n};
409*0Sstevel@tonic-gate    }
410*0Sstevel@tonic-gate
411*0Sstevel@tonic-gate    if (defined $self->{CONFIGURE}) {
412*0Sstevel@tonic-gate        if (ref $self->{CONFIGURE} eq 'CODE') {
413*0Sstevel@tonic-gate            %configure_att = %{&{$self->{CONFIGURE}}};
414*0Sstevel@tonic-gate            $self = { %$self, %configure_att };
415*0Sstevel@tonic-gate        } else {
416*0Sstevel@tonic-gate            Carp::croak "Attribute 'CONFIGURE' to WriteMakefile() not a code reference\n";
417*0Sstevel@tonic-gate        }
418*0Sstevel@tonic-gate    }
419*0Sstevel@tonic-gate
420*0Sstevel@tonic-gate    # This is for old Makefiles written pre 5.00, will go away
421*0Sstevel@tonic-gate    if ( Carp::longmess("") =~ /runsubdirpl/s ){
422*0Sstevel@tonic-gate        Carp::carp("WARNING: Please rerun 'perl Makefile.PL' to regenerate your Makefiles\n");
423*0Sstevel@tonic-gate    }
424*0Sstevel@tonic-gate
425*0Sstevel@tonic-gate    my $newclass = ++$PACKNAME;
426*0Sstevel@tonic-gate    local @Parent = @Parent;    # Protect against non-local exits
427*0Sstevel@tonic-gate    {
428*0Sstevel@tonic-gate        no strict 'refs';
429*0Sstevel@tonic-gate        print "Blessing Object into class [$newclass]\n" if $Verbose>=2;
430*0Sstevel@tonic-gate        mv_all_methods("MY",$newclass);
431*0Sstevel@tonic-gate        bless $self, $newclass;
432*0Sstevel@tonic-gate        push @Parent, $self;
433*0Sstevel@tonic-gate        require ExtUtils::MY;
434*0Sstevel@tonic-gate        @{"$newclass\:\:ISA"} = 'MM';
435*0Sstevel@tonic-gate    }
436*0Sstevel@tonic-gate
437*0Sstevel@tonic-gate    if (defined $Parent[-2]){
438*0Sstevel@tonic-gate        $self->{PARENT} = $Parent[-2];
439*0Sstevel@tonic-gate        my $key;
440*0Sstevel@tonic-gate        for $key (@Prepend_parent) {
441*0Sstevel@tonic-gate            next unless defined $self->{PARENT}{$key};
442*0Sstevel@tonic-gate
443*0Sstevel@tonic-gate            # Don't stomp on WriteMakefile() args.
444*0Sstevel@tonic-gate            next if defined $self->{ARGS}{$key} and
445*0Sstevel@tonic-gate                    $self->{ARGS}{$key} eq $self->{$key};
446*0Sstevel@tonic-gate
447*0Sstevel@tonic-gate            $self->{$key} = $self->{PARENT}{$key};
448*0Sstevel@tonic-gate
449*0Sstevel@tonic-gate            unless ($Is_VMS && $key =~ /PERL$/) {
450*0Sstevel@tonic-gate                $self->{$key} = $self->catdir("..",$self->{$key})
451*0Sstevel@tonic-gate                  unless $self->file_name_is_absolute($self->{$key});
452*0Sstevel@tonic-gate            } else {
453*0Sstevel@tonic-gate                # PERL or FULLPERL will be a command verb or even a
454*0Sstevel@tonic-gate                # command with an argument instead of a full file
455*0Sstevel@tonic-gate                # specification under VMS.  So, don't turn the command
456*0Sstevel@tonic-gate                # into a filespec, but do add a level to the path of
457*0Sstevel@tonic-gate                # the argument if not already absolute.
458*0Sstevel@tonic-gate                my @cmd = split /\s+/, $self->{$key};
459*0Sstevel@tonic-gate                $cmd[1] = $self->catfile('[-]',$cmd[1])
460*0Sstevel@tonic-gate                  unless (@cmd < 2) || $self->file_name_is_absolute($cmd[1]);
461*0Sstevel@tonic-gate                $self->{$key} = join(' ', @cmd);
462*0Sstevel@tonic-gate            }
463*0Sstevel@tonic-gate        }
464*0Sstevel@tonic-gate        if ($self->{PARENT}) {
465*0Sstevel@tonic-gate            $self->{PARENT}->{CHILDREN}->{$newclass} = $self;
466*0Sstevel@tonic-gate            foreach my $opt (qw(POLLUTE PERL_CORE)) {
467*0Sstevel@tonic-gate                if (exists $self->{PARENT}->{$opt}
468*0Sstevel@tonic-gate                    and not exists $self->{$opt})
469*0Sstevel@tonic-gate                    {
470*0Sstevel@tonic-gate                        # inherit, but only if already unspecified
471*0Sstevel@tonic-gate                        $self->{$opt} = $self->{PARENT}->{$opt};
472*0Sstevel@tonic-gate                    }
473*0Sstevel@tonic-gate            }
474*0Sstevel@tonic-gate        }
475*0Sstevel@tonic-gate        my @fm = grep /^FIRST_MAKEFILE=/, @ARGV;
476*0Sstevel@tonic-gate        parse_args($self,@fm) if @fm;
477*0Sstevel@tonic-gate    } else {
478*0Sstevel@tonic-gate        parse_args($self,split(' ', $ENV{PERL_MM_OPT} || ''),@ARGV);
479*0Sstevel@tonic-gate    }
480*0Sstevel@tonic-gate
481*0Sstevel@tonic-gate    $self->{NAME} ||= $self->guess_name;
482*0Sstevel@tonic-gate
483*0Sstevel@tonic-gate    ($self->{NAME_SYM} = $self->{NAME}) =~ s/\W+/_/g;
484*0Sstevel@tonic-gate
485*0Sstevel@tonic-gate    $self->init_main;
486*0Sstevel@tonic-gate    $self->init_VERSION;
487*0Sstevel@tonic-gate    $self->init_dist;
488*0Sstevel@tonic-gate    $self->init_INST;
489*0Sstevel@tonic-gate    $self->init_INSTALL;
490*0Sstevel@tonic-gate    $self->init_DEST;
491*0Sstevel@tonic-gate    $self->init_dirscan;
492*0Sstevel@tonic-gate    $self->init_xs;
493*0Sstevel@tonic-gate    $self->init_PERL;
494*0Sstevel@tonic-gate    $self->init_DIRFILESEP;
495*0Sstevel@tonic-gate    $self->init_linker;
496*0Sstevel@tonic-gate
497*0Sstevel@tonic-gate    # PERL5_OVERRIDE_CONFIG added for perlgcc support
498*0Sstevel@tonic-gate    if (! $self->{PERL_SRC} && ! exists($ENV{PERL5_OVERRIDE_CONFIG})) {
499*0Sstevel@tonic-gate        require VMS::Filespec if $Is_VMS;
500*0Sstevel@tonic-gate        my($pthinks) = $self->canonpath($INC{'Config.pm'});
501*0Sstevel@tonic-gate        my($cthinks) = $self->catfile($Config{'archlibexp'},'Config.pm');
502*0Sstevel@tonic-gate        $pthinks = VMS::Filespec::vmsify($pthinks) if $Is_VMS;
503*0Sstevel@tonic-gate        if ($pthinks ne $cthinks &&
504*0Sstevel@tonic-gate            !($Is_Win32 and lc($pthinks) eq lc($cthinks))) {
505*0Sstevel@tonic-gate            print "Have $pthinks expected $cthinks\n";
506*0Sstevel@tonic-gate            if ($Is_Win32) {
507*0Sstevel@tonic-gate                $pthinks =~ s![/\\]Config\.pm$!!i; $pthinks =~ s!.*[/\\]!!;
508*0Sstevel@tonic-gate            }
509*0Sstevel@tonic-gate            else {
510*0Sstevel@tonic-gate                $pthinks =~ s!/Config\.pm$!!; $pthinks =~ s!.*/!!;
511*0Sstevel@tonic-gate            }
512*0Sstevel@tonic-gate            print STDOUT <<END unless $self->{UNINSTALLED_PERL};
513*0Sstevel@tonic-gateYour perl and your Config.pm seem to have different ideas about the
514*0Sstevel@tonic-gatearchitecture they are running on.
515*0Sstevel@tonic-gatePerl thinks: [$pthinks]
516*0Sstevel@tonic-gateConfig says: [$Config{archname}]
517*0Sstevel@tonic-gateThis may or may not cause problems. Please check your installation of perl
518*0Sstevel@tonic-gateif you have problems building this extension.
519*0Sstevel@tonic-gateEND
520*0Sstevel@tonic-gate        }
521*0Sstevel@tonic-gate    }
522*0Sstevel@tonic-gate
523*0Sstevel@tonic-gate    $self->init_others();
524*0Sstevel@tonic-gate    $self->init_platform();
525*0Sstevel@tonic-gate    $self->init_PERM();
526*0Sstevel@tonic-gate    my($argv) = neatvalue(\@ARGV);
527*0Sstevel@tonic-gate    $argv =~ s/^\[/(/;
528*0Sstevel@tonic-gate    $argv =~ s/\]$/)/;
529*0Sstevel@tonic-gate
530*0Sstevel@tonic-gate    push @{$self->{RESULT}}, <<END;
531*0Sstevel@tonic-gate# This Makefile is for the $self->{NAME} extension to perl.
532*0Sstevel@tonic-gate#
533*0Sstevel@tonic-gate# It was generated automatically by MakeMaker version
534*0Sstevel@tonic-gate# $VERSION (Revision: $Revision) from the contents of
535*0Sstevel@tonic-gate# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
536*0Sstevel@tonic-gate#
537*0Sstevel@tonic-gate#       ANY CHANGES MADE HERE WILL BE LOST!
538*0Sstevel@tonic-gate#
539*0Sstevel@tonic-gate#   MakeMaker ARGV: $argv
540*0Sstevel@tonic-gate#
541*0Sstevel@tonic-gate#   MakeMaker Parameters:
542*0Sstevel@tonic-gateEND
543*0Sstevel@tonic-gate
544*0Sstevel@tonic-gate    foreach my $key (sort keys %initial_att){
545*0Sstevel@tonic-gate        next if $key eq 'ARGS';
546*0Sstevel@tonic-gate
547*0Sstevel@tonic-gate        my($v) = neatvalue($initial_att{$key});
548*0Sstevel@tonic-gate        $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
549*0Sstevel@tonic-gate        $v =~ tr/\n/ /s;
550*0Sstevel@tonic-gate        push @{$self->{RESULT}}, "#     $key => $v";
551*0Sstevel@tonic-gate    }
552*0Sstevel@tonic-gate    undef %initial_att;        # free memory
553*0Sstevel@tonic-gate
554*0Sstevel@tonic-gate    if (defined $self->{CONFIGURE}) {
555*0Sstevel@tonic-gate       push @{$self->{RESULT}}, <<END;
556*0Sstevel@tonic-gate
557*0Sstevel@tonic-gate#   MakeMaker 'CONFIGURE' Parameters:
558*0Sstevel@tonic-gateEND
559*0Sstevel@tonic-gate        if (scalar(keys %configure_att) > 0) {
560*0Sstevel@tonic-gate            foreach my $key (sort keys %configure_att){
561*0Sstevel@tonic-gate               next if $key eq 'ARGS';
562*0Sstevel@tonic-gate               my($v) = neatvalue($configure_att{$key});
563*0Sstevel@tonic-gate               $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
564*0Sstevel@tonic-gate               $v =~ tr/\n/ /s;
565*0Sstevel@tonic-gate               push @{$self->{RESULT}}, "#     $key => $v";
566*0Sstevel@tonic-gate            }
567*0Sstevel@tonic-gate        }
568*0Sstevel@tonic-gate        else
569*0Sstevel@tonic-gate        {
570*0Sstevel@tonic-gate           push @{$self->{RESULT}}, "# no values returned";
571*0Sstevel@tonic-gate        }
572*0Sstevel@tonic-gate        undef %configure_att;  # free memory
573*0Sstevel@tonic-gate    }
574*0Sstevel@tonic-gate
575*0Sstevel@tonic-gate    # turn the SKIP array into a SKIPHASH hash
576*0Sstevel@tonic-gate    my (%skip,$skip);
577*0Sstevel@tonic-gate    for $skip (@{$self->{SKIP} || []}) {
578*0Sstevel@tonic-gate        $self->{SKIPHASH}{$skip} = 1;
579*0Sstevel@tonic-gate    }
580*0Sstevel@tonic-gate    delete $self->{SKIP}; # free memory
581*0Sstevel@tonic-gate
582*0Sstevel@tonic-gate    if ($self->{PARENT}) {
583*0Sstevel@tonic-gate        for (qw/install dist dist_basics dist_core distdir dist_test dist_ci/) {
584*0Sstevel@tonic-gate            $self->{SKIPHASH}{$_} = 1;
585*0Sstevel@tonic-gate        }
586*0Sstevel@tonic-gate    }
587*0Sstevel@tonic-gate
588*0Sstevel@tonic-gate    # We run all the subdirectories now. They don't have much to query
589*0Sstevel@tonic-gate    # from the parent, but the parent has to query them: if they need linking!
590*0Sstevel@tonic-gate    unless ($self->{NORECURS}) {
591*0Sstevel@tonic-gate        $self->eval_in_subdirs if @{$self->{DIR}};
592*0Sstevel@tonic-gate    }
593*0Sstevel@tonic-gate
594*0Sstevel@tonic-gate    foreach my $section ( @MM_Sections ){
595*0Sstevel@tonic-gate        # Support for new foo_target() methods.
596*0Sstevel@tonic-gate        my $method = $section;
597*0Sstevel@tonic-gate        $method .= '_target' unless $self->can($method);
598*0Sstevel@tonic-gate
599*0Sstevel@tonic-gate        print "Processing Makefile '$section' section\n" if ($Verbose >= 2);
600*0Sstevel@tonic-gate        my($skipit) = $self->skipcheck($section);
601*0Sstevel@tonic-gate        if ($skipit){
602*0Sstevel@tonic-gate            push @{$self->{RESULT}}, "\n# --- MakeMaker $section section $skipit.";
603*0Sstevel@tonic-gate        } else {
604*0Sstevel@tonic-gate            my(%a) = %{$self->{$section} || {}};
605*0Sstevel@tonic-gate            push @{$self->{RESULT}}, "\n# --- MakeMaker $section section:";
606*0Sstevel@tonic-gate            push @{$self->{RESULT}}, "# " . join ", ", %a if $Verbose && %a;
607*0Sstevel@tonic-gate            push @{$self->{RESULT}}, $self->nicetext($self->$method( %a ));
608*0Sstevel@tonic-gate        }
609*0Sstevel@tonic-gate    }
610*0Sstevel@tonic-gate
611*0Sstevel@tonic-gate    push @{$self->{RESULT}}, "\n# End.";
612*0Sstevel@tonic-gate
613*0Sstevel@tonic-gate    $self;
614*0Sstevel@tonic-gate}
615*0Sstevel@tonic-gate
616*0Sstevel@tonic-gatesub WriteEmptyMakefile {
617*0Sstevel@tonic-gate    Carp::croak "WriteEmptyMakefile: Need even number of args" if @_ % 2;
618*0Sstevel@tonic-gate
619*0Sstevel@tonic-gate    my %att = @_;
620*0Sstevel@tonic-gate    my $self = MM->new(\%att);
621*0Sstevel@tonic-gate    if (-f $self->{MAKEFILE_OLD}) {
622*0Sstevel@tonic-gate      _unlink($self->{MAKEFILE_OLD}) or
623*0Sstevel@tonic-gate        warn "unlink $self->{MAKEFILE_OLD}: $!";
624*0Sstevel@tonic-gate    }
625*0Sstevel@tonic-gate    if ( -f $self->{MAKEFILE} ) {
626*0Sstevel@tonic-gate        _rename($self->{MAKEFILE}, $self->{MAKEFILE_OLD}) or
627*0Sstevel@tonic-gate          warn "rename $self->{MAKEFILE} => $self->{MAKEFILE_OLD}: $!"
628*0Sstevel@tonic-gate    }
629*0Sstevel@tonic-gate    open MF, '>'.$self->{MAKEFILE} or die "open $self->{MAKEFILE} for write: $!";
630*0Sstevel@tonic-gate    print MF <<'EOP';
631*0Sstevel@tonic-gateall:
632*0Sstevel@tonic-gate
633*0Sstevel@tonic-gateclean:
634*0Sstevel@tonic-gate
635*0Sstevel@tonic-gateinstall:
636*0Sstevel@tonic-gate
637*0Sstevel@tonic-gatemakemakerdflt:
638*0Sstevel@tonic-gate
639*0Sstevel@tonic-gatetest:
640*0Sstevel@tonic-gate
641*0Sstevel@tonic-gateEOP
642*0Sstevel@tonic-gate    close MF or die "close $self->{MAKEFILE} for write: $!";
643*0Sstevel@tonic-gate}
644*0Sstevel@tonic-gate
645*0Sstevel@tonic-gatesub check_manifest {
646*0Sstevel@tonic-gate    print STDOUT "Checking if your kit is complete...\n";
647*0Sstevel@tonic-gate    require ExtUtils::Manifest;
648*0Sstevel@tonic-gate    # avoid warning
649*0Sstevel@tonic-gate    $ExtUtils::Manifest::Quiet = $ExtUtils::Manifest::Quiet = 1;
650*0Sstevel@tonic-gate    my(@missed) = ExtUtils::Manifest::manicheck();
651*0Sstevel@tonic-gate    if (@missed) {
652*0Sstevel@tonic-gate        print STDOUT "Warning: the following files are missing in your kit:\n";
653*0Sstevel@tonic-gate        print "\t", join "\n\t", @missed;
654*0Sstevel@tonic-gate        print STDOUT "\n";
655*0Sstevel@tonic-gate        print STDOUT "Please inform the author.\n";
656*0Sstevel@tonic-gate    } else {
657*0Sstevel@tonic-gate        print STDOUT "Looks good\n";
658*0Sstevel@tonic-gate    }
659*0Sstevel@tonic-gate}
660*0Sstevel@tonic-gate
661*0Sstevel@tonic-gatesub parse_args{
662*0Sstevel@tonic-gate    my($self, @args) = @_;
663*0Sstevel@tonic-gate    foreach (@args) {
664*0Sstevel@tonic-gate        unless (m/(.*?)=(.*)/) {
665*0Sstevel@tonic-gate            ++$Verbose if m/^verb/;
666*0Sstevel@tonic-gate            next;
667*0Sstevel@tonic-gate        }
668*0Sstevel@tonic-gate        my($name, $value) = ($1, $2);
669*0Sstevel@tonic-gate        if ($value =~ m/^~(\w+)?/) { # tilde with optional username
670*0Sstevel@tonic-gate            $value =~ s [^~(\w*)]
671*0Sstevel@tonic-gate                [$1 ?
672*0Sstevel@tonic-gate                 ((getpwnam($1))[7] || "~$1") :
673*0Sstevel@tonic-gate                 (getpwuid($>))[7]
674*0Sstevel@tonic-gate                 ]ex;
675*0Sstevel@tonic-gate        }
676*0Sstevel@tonic-gate
677*0Sstevel@tonic-gate        # Remember the original args passed it.  It will be useful later.
678*0Sstevel@tonic-gate        $self->{ARGS}{uc $name} = $self->{uc $name} = $value;
679*0Sstevel@tonic-gate    }
680*0Sstevel@tonic-gate
681*0Sstevel@tonic-gate    # catch old-style 'potential_libs' and inform user how to 'upgrade'
682*0Sstevel@tonic-gate    if (defined $self->{potential_libs}){
683*0Sstevel@tonic-gate        my($msg)="'potential_libs' => '$self->{potential_libs}' should be";
684*0Sstevel@tonic-gate        if ($self->{potential_libs}){
685*0Sstevel@tonic-gate            print STDOUT "$msg changed to:\n\t'LIBS' => ['$self->{potential_libs}']\n";
686*0Sstevel@tonic-gate        } else {
687*0Sstevel@tonic-gate            print STDOUT "$msg deleted.\n";
688*0Sstevel@tonic-gate        }
689*0Sstevel@tonic-gate        $self->{LIBS} = [$self->{potential_libs}];
690*0Sstevel@tonic-gate        delete $self->{potential_libs};
691*0Sstevel@tonic-gate    }
692*0Sstevel@tonic-gate    # catch old-style 'ARMAYBE' and inform user how to 'upgrade'
693*0Sstevel@tonic-gate    if (defined $self->{ARMAYBE}){
694*0Sstevel@tonic-gate        my($armaybe) = $self->{ARMAYBE};
695*0Sstevel@tonic-gate        print STDOUT "ARMAYBE => '$armaybe' should be changed to:\n",
696*0Sstevel@tonic-gate                        "\t'dynamic_lib' => {ARMAYBE => '$armaybe'}\n";
697*0Sstevel@tonic-gate        my(%dl) = %{$self->{dynamic_lib} || {}};
698*0Sstevel@tonic-gate        $self->{dynamic_lib} = { %dl, ARMAYBE => $armaybe};
699*0Sstevel@tonic-gate        delete $self->{ARMAYBE};
700*0Sstevel@tonic-gate    }
701*0Sstevel@tonic-gate    if (defined $self->{LDTARGET}){
702*0Sstevel@tonic-gate        print STDOUT "LDTARGET should be changed to LDFROM\n";
703*0Sstevel@tonic-gate        $self->{LDFROM} = $self->{LDTARGET};
704*0Sstevel@tonic-gate        delete $self->{LDTARGET};
705*0Sstevel@tonic-gate    }
706*0Sstevel@tonic-gate    # Turn a DIR argument on the command line into an array
707*0Sstevel@tonic-gate    if (defined $self->{DIR} && ref \$self->{DIR} eq 'SCALAR') {
708*0Sstevel@tonic-gate        # So they can choose from the command line, which extensions they want
709*0Sstevel@tonic-gate        # the grep enables them to have some colons too much in case they
710*0Sstevel@tonic-gate        # have to build a list with the shell
711*0Sstevel@tonic-gate        $self->{DIR} = [grep $_, split ":", $self->{DIR}];
712*0Sstevel@tonic-gate    }
713*0Sstevel@tonic-gate    # Turn a INCLUDE_EXT argument on the command line into an array
714*0Sstevel@tonic-gate    if (defined $self->{INCLUDE_EXT} && ref \$self->{INCLUDE_EXT} eq 'SCALAR') {
715*0Sstevel@tonic-gate        $self->{INCLUDE_EXT} = [grep $_, split '\s+', $self->{INCLUDE_EXT}];
716*0Sstevel@tonic-gate    }
717*0Sstevel@tonic-gate    # Turn a EXCLUDE_EXT argument on the command line into an array
718*0Sstevel@tonic-gate    if (defined $self->{EXCLUDE_EXT} && ref \$self->{EXCLUDE_EXT} eq 'SCALAR') {
719*0Sstevel@tonic-gate        $self->{EXCLUDE_EXT} = [grep $_, split '\s+', $self->{EXCLUDE_EXT}];
720*0Sstevel@tonic-gate    }
721*0Sstevel@tonic-gate
722*0Sstevel@tonic-gate    foreach my $mmkey (sort keys %$self){
723*0Sstevel@tonic-gate        next if $mmkey eq 'ARGS';
724*0Sstevel@tonic-gate        print STDOUT "  $mmkey => ", neatvalue($self->{$mmkey}), "\n" if $Verbose;
725*0Sstevel@tonic-gate        print STDOUT "'$mmkey' is not a known MakeMaker parameter name.\n"
726*0Sstevel@tonic-gate            unless exists $Recognized_Att_Keys{$mmkey};
727*0Sstevel@tonic-gate    }
728*0Sstevel@tonic-gate    $| = 1 if $Verbose;
729*0Sstevel@tonic-gate}
730*0Sstevel@tonic-gate
731*0Sstevel@tonic-gatesub check_hints {
732*0Sstevel@tonic-gate    my($self) = @_;
733*0Sstevel@tonic-gate    # We allow extension-specific hints files.
734*0Sstevel@tonic-gate
735*0Sstevel@tonic-gate    require File::Spec;
736*0Sstevel@tonic-gate    my $curdir = File::Spec->curdir;
737*0Sstevel@tonic-gate
738*0Sstevel@tonic-gate    my $hint_dir = File::Spec->catdir($curdir, "hints");
739*0Sstevel@tonic-gate    return unless -d $hint_dir;
740*0Sstevel@tonic-gate
741*0Sstevel@tonic-gate    # First we look for the best hintsfile we have
742*0Sstevel@tonic-gate    my($hint)="${^O}_$Config{osvers}";
743*0Sstevel@tonic-gate    $hint =~ s/\./_/g;
744*0Sstevel@tonic-gate    $hint =~ s/_$//;
745*0Sstevel@tonic-gate    return unless $hint;
746*0Sstevel@tonic-gate
747*0Sstevel@tonic-gate    # Also try without trailing minor version numbers.
748*0Sstevel@tonic-gate    while (1) {
749*0Sstevel@tonic-gate        last if -f File::Spec->catfile($hint_dir, "$hint.pl");  # found
750*0Sstevel@tonic-gate    } continue {
751*0Sstevel@tonic-gate        last unless $hint =~ s/_[^_]*$//; # nothing to cut off
752*0Sstevel@tonic-gate    }
753*0Sstevel@tonic-gate    my $hint_file = File::Spec->catfile($hint_dir, "$hint.pl");
754*0Sstevel@tonic-gate
755*0Sstevel@tonic-gate    return unless -f $hint_file;    # really there
756*0Sstevel@tonic-gate
757*0Sstevel@tonic-gate    _run_hintfile($self, $hint_file);
758*0Sstevel@tonic-gate}
759*0Sstevel@tonic-gate
760*0Sstevel@tonic-gatesub _run_hintfile {
761*0Sstevel@tonic-gate    no strict 'vars';
762*0Sstevel@tonic-gate    local($self) = shift;       # make $self available to the hint file.
763*0Sstevel@tonic-gate    my($hint_file) = shift;
764*0Sstevel@tonic-gate
765*0Sstevel@tonic-gate    local($@, $!);
766*0Sstevel@tonic-gate    print STDERR "Processing hints file $hint_file\n";
767*0Sstevel@tonic-gate
768*0Sstevel@tonic-gate    # Just in case the ./ isn't on the hint file, which File::Spec can
769*0Sstevel@tonic-gate    # often strip off, we bung the curdir into @INC
770*0Sstevel@tonic-gate    local @INC = (File::Spec->curdir, @INC);
771*0Sstevel@tonic-gate    my $ret = do $hint_file;
772*0Sstevel@tonic-gate    if( !defined $ret ) {
773*0Sstevel@tonic-gate        my $error = $@ || $!;
774*0Sstevel@tonic-gate        print STDERR $error;
775*0Sstevel@tonic-gate    }
776*0Sstevel@tonic-gate}
777*0Sstevel@tonic-gate
778*0Sstevel@tonic-gatesub mv_all_methods {
779*0Sstevel@tonic-gate    my($from,$to) = @_;
780*0Sstevel@tonic-gate    no strict 'refs';
781*0Sstevel@tonic-gate    my($symtab) = \%{"${from}::"};
782*0Sstevel@tonic-gate
783*0Sstevel@tonic-gate    # Here you see the *current* list of methods that are overridable
784*0Sstevel@tonic-gate    # from Makefile.PL via MY:: subroutines. As of VERSION 5.07 I'm
785*0Sstevel@tonic-gate    # still trying to reduce the list to some reasonable minimum --
786*0Sstevel@tonic-gate    # because I want to make it easier for the user. A.K.
787*0Sstevel@tonic-gate
788*0Sstevel@tonic-gate    local $SIG{__WARN__} = sub {
789*0Sstevel@tonic-gate        # can't use 'no warnings redefined', 5.6 only
790*0Sstevel@tonic-gate        warn @_ unless $_[0] =~ /^Subroutine .* redefined/
791*0Sstevel@tonic-gate    };
792*0Sstevel@tonic-gate    foreach my $method (@Overridable) {
793*0Sstevel@tonic-gate
794*0Sstevel@tonic-gate        # We cannot say "next" here. Nick might call MY->makeaperl
795*0Sstevel@tonic-gate        # which isn't defined right now
796*0Sstevel@tonic-gate
797*0Sstevel@tonic-gate        # Above statement was written at 4.23 time when Tk-b8 was
798*0Sstevel@tonic-gate        # around. As Tk-b9 only builds with 5.002something and MM 5 is
799*0Sstevel@tonic-gate        # standard, we try to enable the next line again. It was
800*0Sstevel@tonic-gate        # commented out until MM 5.23
801*0Sstevel@tonic-gate
802*0Sstevel@tonic-gate        next unless defined &{"${from}::$method"};
803*0Sstevel@tonic-gate
804*0Sstevel@tonic-gate        *{"${to}::$method"} = \&{"${from}::$method"};
805*0Sstevel@tonic-gate
806*0Sstevel@tonic-gate        # delete would do, if we were sure, nobody ever called
807*0Sstevel@tonic-gate        # MY->makeaperl directly
808*0Sstevel@tonic-gate
809*0Sstevel@tonic-gate        # delete $symtab->{$method};
810*0Sstevel@tonic-gate
811*0Sstevel@tonic-gate        # If we delete a method, then it will be undefined and cannot
812*0Sstevel@tonic-gate        # be called.  But as long as we have Makefile.PLs that rely on
813*0Sstevel@tonic-gate        # %MY:: being intact, we have to fill the hole with an
814*0Sstevel@tonic-gate        # inheriting method:
815*0Sstevel@tonic-gate
816*0Sstevel@tonic-gate        eval "package MY; sub $method { shift->SUPER::$method(\@_); }";
817*0Sstevel@tonic-gate    }
818*0Sstevel@tonic-gate
819*0Sstevel@tonic-gate    # We have to clean out %INC also, because the current directory is
820*0Sstevel@tonic-gate    # changed frequently and Graham Barr prefers to get his version
821*0Sstevel@tonic-gate    # out of a History.pl file which is "required" so woudn't get
822*0Sstevel@tonic-gate    # loaded again in another extension requiring a History.pl
823*0Sstevel@tonic-gate
824*0Sstevel@tonic-gate    # With perl5.002_01 the deletion of entries in %INC caused Tk-b11
825*0Sstevel@tonic-gate    # to core dump in the middle of a require statement. The required
826*0Sstevel@tonic-gate    # file was Tk/MMutil.pm.  The consequence is, we have to be
827*0Sstevel@tonic-gate    # extremely careful when we try to give perl a reason to reload a
828*0Sstevel@tonic-gate    # library with same name.  The workaround prefers to drop nothing
829*0Sstevel@tonic-gate    # from %INC and teach the writers not to use such libraries.
830*0Sstevel@tonic-gate
831*0Sstevel@tonic-gate#    my $inc;
832*0Sstevel@tonic-gate#    foreach $inc (keys %INC) {
833*0Sstevel@tonic-gate#       #warn "***$inc*** deleted";
834*0Sstevel@tonic-gate#       delete $INC{$inc};
835*0Sstevel@tonic-gate#    }
836*0Sstevel@tonic-gate}
837*0Sstevel@tonic-gate
838*0Sstevel@tonic-gatesub skipcheck {
839*0Sstevel@tonic-gate    my($self) = shift;
840*0Sstevel@tonic-gate    my($section) = @_;
841*0Sstevel@tonic-gate    if ($section eq 'dynamic') {
842*0Sstevel@tonic-gate        print STDOUT "Warning (non-fatal): Target 'dynamic' depends on targets ",
843*0Sstevel@tonic-gate        "in skipped section 'dynamic_bs'\n"
844*0Sstevel@tonic-gate            if $self->{SKIPHASH}{dynamic_bs} && $Verbose;
845*0Sstevel@tonic-gate        print STDOUT "Warning (non-fatal): Target 'dynamic' depends on targets ",
846*0Sstevel@tonic-gate        "in skipped section 'dynamic_lib'\n"
847*0Sstevel@tonic-gate            if $self->{SKIPHASH}{dynamic_lib} && $Verbose;
848*0Sstevel@tonic-gate    }
849*0Sstevel@tonic-gate    if ($section eq 'dynamic_lib') {
850*0Sstevel@tonic-gate        print STDOUT "Warning (non-fatal): Target '\$(INST_DYNAMIC)' depends on ",
851*0Sstevel@tonic-gate        "targets in skipped section 'dynamic_bs'\n"
852*0Sstevel@tonic-gate            if $self->{SKIPHASH}{dynamic_bs} && $Verbose;
853*0Sstevel@tonic-gate    }
854*0Sstevel@tonic-gate    if ($section eq 'static') {
855*0Sstevel@tonic-gate        print STDOUT "Warning (non-fatal): Target 'static' depends on targets ",
856*0Sstevel@tonic-gate        "in skipped section 'static_lib'\n"
857*0Sstevel@tonic-gate            if $self->{SKIPHASH}{static_lib} && $Verbose;
858*0Sstevel@tonic-gate    }
859*0Sstevel@tonic-gate    return 'skipped' if $self->{SKIPHASH}{$section};
860*0Sstevel@tonic-gate    return '';
861*0Sstevel@tonic-gate}
862*0Sstevel@tonic-gate
863*0Sstevel@tonic-gatesub flush {
864*0Sstevel@tonic-gate    my $self = shift;
865*0Sstevel@tonic-gate    my($chunk);
866*0Sstevel@tonic-gate    local *FH;
867*0Sstevel@tonic-gate    print STDOUT "Writing $self->{MAKEFILE} for $self->{NAME}\n";
868*0Sstevel@tonic-gate
869*0Sstevel@tonic-gate    unlink($self->{MAKEFILE}, "MakeMaker.tmp", $Is_VMS ? 'Descrip.MMS' : '');
870*0Sstevel@tonic-gate    open(FH,">MakeMaker.tmp") or die "Unable to open MakeMaker.tmp: $!";
871*0Sstevel@tonic-gate
872*0Sstevel@tonic-gate    for $chunk (@{$self->{RESULT}}) {
873*0Sstevel@tonic-gate        print FH "$chunk\n";
874*0Sstevel@tonic-gate    }
875*0Sstevel@tonic-gate
876*0Sstevel@tonic-gate    close FH;
877*0Sstevel@tonic-gate    my($finalname) = $self->{MAKEFILE};
878*0Sstevel@tonic-gate    _rename("MakeMaker.tmp", $finalname) or
879*0Sstevel@tonic-gate      warn "rename MakeMaker.tmp => $finalname: $!";
880*0Sstevel@tonic-gate    chmod 0644, $finalname unless $Is_VMS;
881*0Sstevel@tonic-gate
882*0Sstevel@tonic-gate    my %keep = map { ($_ => 1) } qw(NEEDS_LINKING HAS_LINK_CODE);
883*0Sstevel@tonic-gate
884*0Sstevel@tonic-gate    if ($self->{PARENT} && !$self->{_KEEP_AFTER_FLUSH}) {
885*0Sstevel@tonic-gate        foreach (keys %$self) { # safe memory
886*0Sstevel@tonic-gate            delete $self->{$_} unless $keep{$_};
887*0Sstevel@tonic-gate        }
888*0Sstevel@tonic-gate    }
889*0Sstevel@tonic-gate
890*0Sstevel@tonic-gate    system("$Config::Config{eunicefix} $finalname") unless $Config::Config{eunicefix} eq ":";
891*0Sstevel@tonic-gate}
892*0Sstevel@tonic-gate
893*0Sstevel@tonic-gate
894*0Sstevel@tonic-gate# This is a rename for OS's where the target must be unlinked first.
895*0Sstevel@tonic-gatesub _rename {
896*0Sstevel@tonic-gate    my($src, $dest) = @_;
897*0Sstevel@tonic-gate    chmod 0666, $dest;
898*0Sstevel@tonic-gate    unlink $dest;
899*0Sstevel@tonic-gate    return rename $src, $dest;
900*0Sstevel@tonic-gate}
901*0Sstevel@tonic-gate
902*0Sstevel@tonic-gate# This is an unlink for OS's where the target must be writable first.
903*0Sstevel@tonic-gatesub _unlink {
904*0Sstevel@tonic-gate    my @files = @_;
905*0Sstevel@tonic-gate    chmod 0666, @files;
906*0Sstevel@tonic-gate    return unlink @files;
907*0Sstevel@tonic-gate}
908*0Sstevel@tonic-gate
909*0Sstevel@tonic-gate
910*0Sstevel@tonic-gate# The following mkbootstrap() is only for installations that are calling
911*0Sstevel@tonic-gate# the pre-4.1 mkbootstrap() from their old Makefiles. This MakeMaker
912*0Sstevel@tonic-gate# writes Makefiles, that use ExtUtils::Mkbootstrap directly.
913*0Sstevel@tonic-gatesub mkbootstrap {
914*0Sstevel@tonic-gate    die <<END;
915*0Sstevel@tonic-gate!!! Your Makefile has been built such a long time ago, !!!
916*0Sstevel@tonic-gate!!! that is unlikely to work with current MakeMaker.   !!!
917*0Sstevel@tonic-gate!!! Please rebuild your Makefile                       !!!
918*0Sstevel@tonic-gateEND
919*0Sstevel@tonic-gate}
920*0Sstevel@tonic-gate
921*0Sstevel@tonic-gate# Ditto for mksymlists() as of MakeMaker 5.17
922*0Sstevel@tonic-gatesub mksymlists {
923*0Sstevel@tonic-gate    die <<END;
924*0Sstevel@tonic-gate!!! Your Makefile has been built such a long time ago, !!!
925*0Sstevel@tonic-gate!!! that is unlikely to work with current MakeMaker.   !!!
926*0Sstevel@tonic-gate!!! Please rebuild your Makefile                       !!!
927*0Sstevel@tonic-gateEND
928*0Sstevel@tonic-gate}
929*0Sstevel@tonic-gate
930*0Sstevel@tonic-gatesub neatvalue {
931*0Sstevel@tonic-gate    my($v) = @_;
932*0Sstevel@tonic-gate    return "undef" unless defined $v;
933*0Sstevel@tonic-gate    my($t) = ref $v;
934*0Sstevel@tonic-gate    return "q[$v]" unless $t;
935*0Sstevel@tonic-gate    if ($t eq 'ARRAY') {
936*0Sstevel@tonic-gate        my(@m, @neat);
937*0Sstevel@tonic-gate        push @m, "[";
938*0Sstevel@tonic-gate        foreach my $elem (@$v) {
939*0Sstevel@tonic-gate            push @neat, "q[$elem]";
940*0Sstevel@tonic-gate        }
941*0Sstevel@tonic-gate        push @m, join ", ", @neat;
942*0Sstevel@tonic-gate        push @m, "]";
943*0Sstevel@tonic-gate        return join "", @m;
944*0Sstevel@tonic-gate    }
945*0Sstevel@tonic-gate    return "$v" unless $t eq 'HASH';
946*0Sstevel@tonic-gate    my(@m, $key, $val);
947*0Sstevel@tonic-gate    while (($key,$val) = each %$v){
948*0Sstevel@tonic-gate        last unless defined $key; # cautious programming in case (undef,undef) is true
949*0Sstevel@tonic-gate        push(@m,"$key=>".neatvalue($val)) ;
950*0Sstevel@tonic-gate    }
951*0Sstevel@tonic-gate    return "{ ".join(', ',@m)." }";
952*0Sstevel@tonic-gate}
953*0Sstevel@tonic-gate
954*0Sstevel@tonic-gatesub selfdocument {
955*0Sstevel@tonic-gate    my($self) = @_;
956*0Sstevel@tonic-gate    my(@m);
957*0Sstevel@tonic-gate    if ($Verbose){
958*0Sstevel@tonic-gate        push @m, "\n# Full list of MakeMaker attribute values:";
959*0Sstevel@tonic-gate        foreach my $key (sort keys %$self){
960*0Sstevel@tonic-gate            next if $key eq 'RESULT' || $key =~ /^[A-Z][a-z]/;
961*0Sstevel@tonic-gate            my($v) = neatvalue($self->{$key});
962*0Sstevel@tonic-gate            $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
963*0Sstevel@tonic-gate            $v =~ tr/\n/ /s;
964*0Sstevel@tonic-gate            push @m, "# $key => $v";
965*0Sstevel@tonic-gate        }
966*0Sstevel@tonic-gate    }
967*0Sstevel@tonic-gate    join "\n", @m;
968*0Sstevel@tonic-gate}
969*0Sstevel@tonic-gate
970*0Sstevel@tonic-gate1;
971*0Sstevel@tonic-gate
972*0Sstevel@tonic-gate__END__
973*0Sstevel@tonic-gate
974*0Sstevel@tonic-gate=head1 NAME
975*0Sstevel@tonic-gate
976*0Sstevel@tonic-gateExtUtils::MakeMaker - Create a module Makefile
977*0Sstevel@tonic-gate
978*0Sstevel@tonic-gate=head1 SYNOPSIS
979*0Sstevel@tonic-gate
980*0Sstevel@tonic-gate  use ExtUtils::MakeMaker;
981*0Sstevel@tonic-gate
982*0Sstevel@tonic-gate  WriteMakefile( ATTRIBUTE => VALUE [, ...] );
983*0Sstevel@tonic-gate
984*0Sstevel@tonic-gate=head1 DESCRIPTION
985*0Sstevel@tonic-gate
986*0Sstevel@tonic-gateThis utility is designed to write a Makefile for an extension module
987*0Sstevel@tonic-gatefrom a Makefile.PL. It is based on the Makefile.SH model provided by
988*0Sstevel@tonic-gateAndy Dougherty and the perl5-porters.
989*0Sstevel@tonic-gate
990*0Sstevel@tonic-gateIt splits the task of generating the Makefile into several subroutines
991*0Sstevel@tonic-gatethat can be individually overridden.  Each subroutine returns the text
992*0Sstevel@tonic-gateit wishes to have written to the Makefile.
993*0Sstevel@tonic-gate
994*0Sstevel@tonic-gateMakeMaker is object oriented. Each directory below the current
995*0Sstevel@tonic-gatedirectory that contains a Makefile.PL is treated as a separate
996*0Sstevel@tonic-gateobject. This makes it possible to write an unlimited number of
997*0Sstevel@tonic-gateMakefiles with a single invocation of WriteMakefile().
998*0Sstevel@tonic-gate
999*0Sstevel@tonic-gate=head2 How To Write A Makefile.PL
1000*0Sstevel@tonic-gate
1001*0Sstevel@tonic-gateSee ExtUtils::MakeMaker::Tutorial.
1002*0Sstevel@tonic-gate
1003*0Sstevel@tonic-gateThe long answer is the rest of the manpage :-)
1004*0Sstevel@tonic-gate
1005*0Sstevel@tonic-gate=head2 Default Makefile Behaviour
1006*0Sstevel@tonic-gate
1007*0Sstevel@tonic-gateThe generated Makefile enables the user of the extension to invoke
1008*0Sstevel@tonic-gate
1009*0Sstevel@tonic-gate  perl Makefile.PL # optionally "perl Makefile.PL verbose"
1010*0Sstevel@tonic-gate  make
1011*0Sstevel@tonic-gate  make test        # optionally set TEST_VERBOSE=1
1012*0Sstevel@tonic-gate  make install     # See below
1013*0Sstevel@tonic-gate
1014*0Sstevel@tonic-gateThe Makefile to be produced may be altered by adding arguments of the
1015*0Sstevel@tonic-gateform C<KEY=VALUE>. E.g.
1016*0Sstevel@tonic-gate
1017*0Sstevel@tonic-gate  perl Makefile.PL PREFIX=/tmp/myperl5
1018*0Sstevel@tonic-gate
1019*0Sstevel@tonic-gateOther interesting targets in the generated Makefile are
1020*0Sstevel@tonic-gate
1021*0Sstevel@tonic-gate  make config     # to check if the Makefile is up-to-date
1022*0Sstevel@tonic-gate  make clean      # delete local temp files (Makefile gets renamed)
1023*0Sstevel@tonic-gate  make realclean  # delete derived files (including ./blib)
1024*0Sstevel@tonic-gate  make ci         # check in all the files in the MANIFEST file
1025*0Sstevel@tonic-gate  make dist       # see below the Distribution Support section
1026*0Sstevel@tonic-gate
1027*0Sstevel@tonic-gate=head2 make test
1028*0Sstevel@tonic-gate
1029*0Sstevel@tonic-gateMakeMaker checks for the existence of a file named F<test.pl> in the
1030*0Sstevel@tonic-gatecurrent directory and if it exists it execute the script with the
1031*0Sstevel@tonic-gateproper set of perl C<-I> options.
1032*0Sstevel@tonic-gate
1033*0Sstevel@tonic-gateMakeMaker also checks for any files matching glob("t/*.t"). It will
1034*0Sstevel@tonic-gateexecute all matching files in alphabetical order via the
1035*0Sstevel@tonic-gateL<Test::Harness> module with the C<-I> switches set correctly.
1036*0Sstevel@tonic-gate
1037*0Sstevel@tonic-gateIf you'd like to see the raw output of your tests, set the
1038*0Sstevel@tonic-gateC<TEST_VERBOSE> variable to true.
1039*0Sstevel@tonic-gate
1040*0Sstevel@tonic-gate  make test TEST_VERBOSE=1
1041*0Sstevel@tonic-gate
1042*0Sstevel@tonic-gate=head2 make testdb
1043*0Sstevel@tonic-gate
1044*0Sstevel@tonic-gateA useful variation of the above is the target C<testdb>. It runs the
1045*0Sstevel@tonic-gatetest under the Perl debugger (see L<perldebug>). If the file
1046*0Sstevel@tonic-gateF<test.pl> exists in the current directory, it is used for the test.
1047*0Sstevel@tonic-gate
1048*0Sstevel@tonic-gateIf you want to debug some other testfile, set the C<TEST_FILE> variable
1049*0Sstevel@tonic-gatethusly:
1050*0Sstevel@tonic-gate
1051*0Sstevel@tonic-gate  make testdb TEST_FILE=t/mytest.t
1052*0Sstevel@tonic-gate
1053*0Sstevel@tonic-gateBy default the debugger is called using C<-d> option to perl. If you
1054*0Sstevel@tonic-gatewant to specify some other option, set the C<TESTDB_SW> variable:
1055*0Sstevel@tonic-gate
1056*0Sstevel@tonic-gate  make testdb TESTDB_SW=-Dx
1057*0Sstevel@tonic-gate
1058*0Sstevel@tonic-gate=head2 make install
1059*0Sstevel@tonic-gate
1060*0Sstevel@tonic-gatemake alone puts all relevant files into directories that are named by
1061*0Sstevel@tonic-gatethe macros INST_LIB, INST_ARCHLIB, INST_SCRIPT, INST_MAN1DIR and
1062*0Sstevel@tonic-gateINST_MAN3DIR.  All these default to something below ./blib if you are
1063*0Sstevel@tonic-gateI<not> building below the perl source directory. If you I<are>
1064*0Sstevel@tonic-gatebuilding below the perl source, INST_LIB and INST_ARCHLIB default to
1065*0Sstevel@tonic-gate../../lib, and INST_SCRIPT is not defined.
1066*0Sstevel@tonic-gate
1067*0Sstevel@tonic-gateThe I<install> target of the generated Makefile copies the files found
1068*0Sstevel@tonic-gatebelow each of the INST_* directories to their INSTALL*
1069*0Sstevel@tonic-gatecounterparts. Which counterparts are chosen depends on the setting of
1070*0Sstevel@tonic-gateINSTALLDIRS according to the following table:
1071*0Sstevel@tonic-gate
1072*0Sstevel@tonic-gate                                 INSTALLDIRS set to
1073*0Sstevel@tonic-gate                           perl        site          vendor
1074*0Sstevel@tonic-gate
1075*0Sstevel@tonic-gate                 PERLPREFIX      SITEPREFIX          VENDORPREFIX
1076*0Sstevel@tonic-gate  INST_ARCHLIB   INSTALLARCHLIB  INSTALLSITEARCH     INSTALLVENDORARCH
1077*0Sstevel@tonic-gate  INST_LIB       INSTALLPRIVLIB  INSTALLSITELIB      INSTALLVENDORLIB
1078*0Sstevel@tonic-gate  INST_BIN       INSTALLBIN      INSTALLSITEBIN      INSTALLVENDORBIN
1079*0Sstevel@tonic-gate  INST_SCRIPT    INSTALLSCRIPT   INSTALLSCRIPT       INSTALLSCRIPT
1080*0Sstevel@tonic-gate  INST_MAN1DIR   INSTALLMAN1DIR  INSTALLSITEMAN1DIR  INSTALLVENDORMAN1DIR
1081*0Sstevel@tonic-gate  INST_MAN3DIR   INSTALLMAN3DIR  INSTALLSITEMAN3DIR  INSTALLVENDORMAN3DIR
1082*0Sstevel@tonic-gate
1083*0Sstevel@tonic-gateThe INSTALL... macros in turn default to their %Config
1084*0Sstevel@tonic-gate($Config{installprivlib}, $Config{installarchlib}, etc.) counterparts.
1085*0Sstevel@tonic-gate
1086*0Sstevel@tonic-gateYou can check the values of these variables on your system with
1087*0Sstevel@tonic-gate
1088*0Sstevel@tonic-gate    perl '-V:install.*'
1089*0Sstevel@tonic-gate
1090*0Sstevel@tonic-gateAnd to check the sequence in which the library directories are
1091*0Sstevel@tonic-gatesearched by perl, run
1092*0Sstevel@tonic-gate
1093*0Sstevel@tonic-gate    perl -le 'print join $/, @INC'
1094*0Sstevel@tonic-gate
1095*0Sstevel@tonic-gate
1096*0Sstevel@tonic-gate=head2 PREFIX and LIB attribute
1097*0Sstevel@tonic-gate
1098*0Sstevel@tonic-gatePREFIX and LIB can be used to set several INSTALL* attributes in one
1099*0Sstevel@tonic-gatego. The quickest way to install a module in a non-standard place might
1100*0Sstevel@tonic-gatebe
1101*0Sstevel@tonic-gate
1102*0Sstevel@tonic-gate    perl Makefile.PL PREFIX=~
1103*0Sstevel@tonic-gate
1104*0Sstevel@tonic-gateThis will install all files in the module under your home directory,
1105*0Sstevel@tonic-gatewith man pages and libraries going into an appropriate place (usually
1106*0Sstevel@tonic-gate~/man and ~/lib).
1107*0Sstevel@tonic-gate
1108*0Sstevel@tonic-gateAnother way to specify many INSTALL directories with a single
1109*0Sstevel@tonic-gateparameter is LIB.
1110*0Sstevel@tonic-gate
1111*0Sstevel@tonic-gate    perl Makefile.PL LIB=~/lib
1112*0Sstevel@tonic-gate
1113*0Sstevel@tonic-gateThis will install the module's architecture-independent files into
1114*0Sstevel@tonic-gate~/lib, the architecture-dependent files into ~/lib/$archname.
1115*0Sstevel@tonic-gate
1116*0Sstevel@tonic-gateNote, that in both cases the tilde expansion is done by MakeMaker, not
1117*0Sstevel@tonic-gateby perl by default, nor by make.
1118*0Sstevel@tonic-gate
1119*0Sstevel@tonic-gateConflicts between parameters LIB, PREFIX and the various INSTALL*
1120*0Sstevel@tonic-gatearguments are resolved so that:
1121*0Sstevel@tonic-gate
1122*0Sstevel@tonic-gate=over 4
1123*0Sstevel@tonic-gate
1124*0Sstevel@tonic-gate=item *
1125*0Sstevel@tonic-gate
1126*0Sstevel@tonic-gatesetting LIB overrides any setting of INSTALLPRIVLIB, INSTALLARCHLIB,
1127*0Sstevel@tonic-gateINSTALLSITELIB, INSTALLSITEARCH (and they are not affected by PREFIX);
1128*0Sstevel@tonic-gate
1129*0Sstevel@tonic-gate=item *
1130*0Sstevel@tonic-gate
1131*0Sstevel@tonic-gatewithout LIB, setting PREFIX replaces the initial C<$Config{prefix}>
1132*0Sstevel@tonic-gatepart of those INSTALL* arguments, even if the latter are explicitly
1133*0Sstevel@tonic-gateset (but are set to still start with C<$Config{prefix}>).
1134*0Sstevel@tonic-gate
1135*0Sstevel@tonic-gate=back
1136*0Sstevel@tonic-gate
1137*0Sstevel@tonic-gateIf the user has superuser privileges, and is not working on AFS or
1138*0Sstevel@tonic-gaterelatives, then the defaults for INSTALLPRIVLIB, INSTALLARCHLIB,
1139*0Sstevel@tonic-gateINSTALLSCRIPT, etc. will be appropriate, and this incantation will be
1140*0Sstevel@tonic-gatethe best:
1141*0Sstevel@tonic-gate
1142*0Sstevel@tonic-gate    perl Makefile.PL;
1143*0Sstevel@tonic-gate    make;
1144*0Sstevel@tonic-gate    make test
1145*0Sstevel@tonic-gate    make install
1146*0Sstevel@tonic-gate
1147*0Sstevel@tonic-gatemake install per default writes some documentation of what has been
1148*0Sstevel@tonic-gatedone into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This feature
1149*0Sstevel@tonic-gatecan be bypassed by calling make pure_install.
1150*0Sstevel@tonic-gate
1151*0Sstevel@tonic-gate=head2 AFS users
1152*0Sstevel@tonic-gate
1153*0Sstevel@tonic-gatewill have to specify the installation directories as these most
1154*0Sstevel@tonic-gateprobably have changed since perl itself has been installed. They will
1155*0Sstevel@tonic-gatehave to do this by calling
1156*0Sstevel@tonic-gate
1157*0Sstevel@tonic-gate    perl Makefile.PL INSTALLSITELIB=/afs/here/today \
1158*0Sstevel@tonic-gate        INSTALLSCRIPT=/afs/there/now INSTALLMAN3DIR=/afs/for/manpages
1159*0Sstevel@tonic-gate    make
1160*0Sstevel@tonic-gate
1161*0Sstevel@tonic-gateBe careful to repeat this procedure every time you recompile an
1162*0Sstevel@tonic-gateextension, unless you are sure the AFS installation directories are
1163*0Sstevel@tonic-gatestill valid.
1164*0Sstevel@tonic-gate
1165*0Sstevel@tonic-gate=head2 Static Linking of a new Perl Binary
1166*0Sstevel@tonic-gate
1167*0Sstevel@tonic-gateAn extension that is built with the above steps is ready to use on
1168*0Sstevel@tonic-gatesystems supporting dynamic loading. On systems that do not support
1169*0Sstevel@tonic-gatedynamic loading, any newly created extension has to be linked together
1170*0Sstevel@tonic-gatewith the available resources. MakeMaker supports the linking process
1171*0Sstevel@tonic-gateby creating appropriate targets in the Makefile whenever an extension
1172*0Sstevel@tonic-gateis built. You can invoke the corresponding section of the makefile with
1173*0Sstevel@tonic-gate
1174*0Sstevel@tonic-gate    make perl
1175*0Sstevel@tonic-gate
1176*0Sstevel@tonic-gateThat produces a new perl binary in the current directory with all
1177*0Sstevel@tonic-gateextensions linked in that can be found in INST_ARCHLIB, SITELIBEXP,
1178*0Sstevel@tonic-gateand PERL_ARCHLIB. To do that, MakeMaker writes a new Makefile, on
1179*0Sstevel@tonic-gateUNIX, this is called Makefile.aperl (may be system dependent). If you
1180*0Sstevel@tonic-gatewant to force the creation of a new perl, it is recommended, that you
1181*0Sstevel@tonic-gatedelete this Makefile.aperl, so the directories are searched-through
1182*0Sstevel@tonic-gatefor linkable libraries again.
1183*0Sstevel@tonic-gate
1184*0Sstevel@tonic-gateThe binary can be installed into the directory where perl normally
1185*0Sstevel@tonic-gateresides on your machine with
1186*0Sstevel@tonic-gate
1187*0Sstevel@tonic-gate    make inst_perl
1188*0Sstevel@tonic-gate
1189*0Sstevel@tonic-gateTo produce a perl binary with a different name than C<perl>, either say
1190*0Sstevel@tonic-gate
1191*0Sstevel@tonic-gate    perl Makefile.PL MAP_TARGET=myperl
1192*0Sstevel@tonic-gate    make myperl
1193*0Sstevel@tonic-gate    make inst_perl
1194*0Sstevel@tonic-gate
1195*0Sstevel@tonic-gateor say
1196*0Sstevel@tonic-gate
1197*0Sstevel@tonic-gate    perl Makefile.PL
1198*0Sstevel@tonic-gate    make myperl MAP_TARGET=myperl
1199*0Sstevel@tonic-gate    make inst_perl MAP_TARGET=myperl
1200*0Sstevel@tonic-gate
1201*0Sstevel@tonic-gateIn any case you will be prompted with the correct invocation of the
1202*0Sstevel@tonic-gateC<inst_perl> target that installs the new binary into INSTALLBIN.
1203*0Sstevel@tonic-gate
1204*0Sstevel@tonic-gatemake inst_perl per default writes some documentation of what has been
1205*0Sstevel@tonic-gatedone into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This
1206*0Sstevel@tonic-gatecan be bypassed by calling make pure_inst_perl.
1207*0Sstevel@tonic-gate
1208*0Sstevel@tonic-gateWarning: the inst_perl: target will most probably overwrite your
1209*0Sstevel@tonic-gateexisting perl binary. Use with care!
1210*0Sstevel@tonic-gate
1211*0Sstevel@tonic-gateSometimes you might want to build a statically linked perl although
1212*0Sstevel@tonic-gateyour system supports dynamic loading. In this case you may explicitly
1213*0Sstevel@tonic-gateset the linktype with the invocation of the Makefile.PL or make:
1214*0Sstevel@tonic-gate
1215*0Sstevel@tonic-gate    perl Makefile.PL LINKTYPE=static    # recommended
1216*0Sstevel@tonic-gate
1217*0Sstevel@tonic-gateor
1218*0Sstevel@tonic-gate
1219*0Sstevel@tonic-gate    make LINKTYPE=static                # works on most systems
1220*0Sstevel@tonic-gate
1221*0Sstevel@tonic-gate=head2 Determination of Perl Library and Installation Locations
1222*0Sstevel@tonic-gate
1223*0Sstevel@tonic-gateMakeMaker needs to know, or to guess, where certain things are
1224*0Sstevel@tonic-gatelocated.  Especially INST_LIB and INST_ARCHLIB (where to put the files
1225*0Sstevel@tonic-gateduring the make(1) run), PERL_LIB and PERL_ARCHLIB (where to read
1226*0Sstevel@tonic-gateexisting modules from), and PERL_INC (header files and C<libperl*.*>).
1227*0Sstevel@tonic-gate
1228*0Sstevel@tonic-gateExtensions may be built either using the contents of the perl source
1229*0Sstevel@tonic-gatedirectory tree or from the installed perl library. The recommended way
1230*0Sstevel@tonic-gateis to build extensions after you have run 'make install' on perl
1231*0Sstevel@tonic-gateitself. You can do that in any directory on your hard disk that is not
1232*0Sstevel@tonic-gatebelow the perl source tree. The support for extensions below the ext
1233*0Sstevel@tonic-gatedirectory of the perl distribution is only good for the standard
1234*0Sstevel@tonic-gateextensions that come with perl.
1235*0Sstevel@tonic-gate
1236*0Sstevel@tonic-gateIf an extension is being built below the C<ext/> directory of the perl
1237*0Sstevel@tonic-gatesource then MakeMaker will set PERL_SRC automatically (e.g.,
1238*0Sstevel@tonic-gateC<../..>).  If PERL_SRC is defined and the extension is recognized as
1239*0Sstevel@tonic-gatea standard extension, then other variables default to the following:
1240*0Sstevel@tonic-gate
1241*0Sstevel@tonic-gate  PERL_INC     = PERL_SRC
1242*0Sstevel@tonic-gate  PERL_LIB     = PERL_SRC/lib
1243*0Sstevel@tonic-gate  PERL_ARCHLIB = PERL_SRC/lib
1244*0Sstevel@tonic-gate  INST_LIB     = PERL_LIB
1245*0Sstevel@tonic-gate  INST_ARCHLIB = PERL_ARCHLIB
1246*0Sstevel@tonic-gate
1247*0Sstevel@tonic-gateIf an extension is being built away from the perl source then MakeMaker
1248*0Sstevel@tonic-gatewill leave PERL_SRC undefined and default to using the installed copy
1249*0Sstevel@tonic-gateof the perl library. The other variables default to the following:
1250*0Sstevel@tonic-gate
1251*0Sstevel@tonic-gate  PERL_INC     = $archlibexp/CORE
1252*0Sstevel@tonic-gate  PERL_LIB     = $privlibexp
1253*0Sstevel@tonic-gate  PERL_ARCHLIB = $archlibexp
1254*0Sstevel@tonic-gate  INST_LIB     = ./blib/lib
1255*0Sstevel@tonic-gate  INST_ARCHLIB = ./blib/arch
1256*0Sstevel@tonic-gate
1257*0Sstevel@tonic-gateIf perl has not yet been installed then PERL_SRC can be defined on the
1258*0Sstevel@tonic-gatecommand line as shown in the previous section.
1259*0Sstevel@tonic-gate
1260*0Sstevel@tonic-gate
1261*0Sstevel@tonic-gate=head2 Which architecture dependent directory?
1262*0Sstevel@tonic-gate
1263*0Sstevel@tonic-gateIf you don't want to keep the defaults for the INSTALL* macros,
1264*0Sstevel@tonic-gateMakeMaker helps you to minimize the typing needed: the usual
1265*0Sstevel@tonic-gaterelationship between INSTALLPRIVLIB and INSTALLARCHLIB is determined
1266*0Sstevel@tonic-gateby Configure at perl compilation time. MakeMaker supports the user who
1267*0Sstevel@tonic-gatesets INSTALLPRIVLIB. If INSTALLPRIVLIB is set, but INSTALLARCHLIB not,
1268*0Sstevel@tonic-gatethen MakeMaker defaults the latter to be the same subdirectory of
1269*0Sstevel@tonic-gateINSTALLPRIVLIB as Configure decided for the counterparts in %Config ,
1270*0Sstevel@tonic-gateotherwise it defaults to INSTALLPRIVLIB. The same relationship holds
1271*0Sstevel@tonic-gatefor INSTALLSITELIB and INSTALLSITEARCH.
1272*0Sstevel@tonic-gate
1273*0Sstevel@tonic-gateMakeMaker gives you much more freedom than needed to configure
1274*0Sstevel@tonic-gateinternal variables and get different results. It is worth to mention,
1275*0Sstevel@tonic-gatethat make(1) also lets you configure most of the variables that are
1276*0Sstevel@tonic-gateused in the Makefile. But in the majority of situations this will not
1277*0Sstevel@tonic-gatebe necessary, and should only be done if the author of a package
1278*0Sstevel@tonic-gaterecommends it (or you know what you're doing).
1279*0Sstevel@tonic-gate
1280*0Sstevel@tonic-gate=head2 Using Attributes and Parameters
1281*0Sstevel@tonic-gate
1282*0Sstevel@tonic-gateThe following attributes may be specified as arguments to WriteMakefile()
1283*0Sstevel@tonic-gateor as NAME=VALUE pairs on the command line.
1284*0Sstevel@tonic-gate
1285*0Sstevel@tonic-gate=over 2
1286*0Sstevel@tonic-gate
1287*0Sstevel@tonic-gate=item ABSTRACT
1288*0Sstevel@tonic-gate
1289*0Sstevel@tonic-gateOne line description of the module. Will be included in PPD file.
1290*0Sstevel@tonic-gate
1291*0Sstevel@tonic-gate=item ABSTRACT_FROM
1292*0Sstevel@tonic-gate
1293*0Sstevel@tonic-gateName of the file that contains the package description. MakeMaker looks
1294*0Sstevel@tonic-gatefor a line in the POD matching /^($package\s-\s)(.*)/. This is typically
1295*0Sstevel@tonic-gatethe first line in the "=head1 NAME" section. $2 becomes the abstract.
1296*0Sstevel@tonic-gate
1297*0Sstevel@tonic-gate=item AUTHOR
1298*0Sstevel@tonic-gate
1299*0Sstevel@tonic-gateString containing name (and email address) of package author(s). Is used
1300*0Sstevel@tonic-gatein PPD (Perl Package Description) files for PPM (Perl Package Manager).
1301*0Sstevel@tonic-gate
1302*0Sstevel@tonic-gate=item BINARY_LOCATION
1303*0Sstevel@tonic-gate
1304*0Sstevel@tonic-gateUsed when creating PPD files for binary packages.  It can be set to a
1305*0Sstevel@tonic-gatefull or relative path or URL to the binary archive for a particular
1306*0Sstevel@tonic-gatearchitecture.  For example:
1307*0Sstevel@tonic-gate
1308*0Sstevel@tonic-gate        perl Makefile.PL BINARY_LOCATION=x86/Agent.tar.gz
1309*0Sstevel@tonic-gate
1310*0Sstevel@tonic-gatebuilds a PPD package that references a binary of the C<Agent> package,
1311*0Sstevel@tonic-gatelocated in the C<x86> directory relative to the PPD itself.
1312*0Sstevel@tonic-gate
1313*0Sstevel@tonic-gate=item C
1314*0Sstevel@tonic-gate
1315*0Sstevel@tonic-gateRef to array of *.c file names. Initialised from a directory scan
1316*0Sstevel@tonic-gateand the values portion of the XS attribute hash. This is not
1317*0Sstevel@tonic-gatecurrently used by MakeMaker but may be handy in Makefile.PLs.
1318*0Sstevel@tonic-gate
1319*0Sstevel@tonic-gate=item CCFLAGS
1320*0Sstevel@tonic-gate
1321*0Sstevel@tonic-gateString that will be included in the compiler call command line between
1322*0Sstevel@tonic-gatethe arguments INC and OPTIMIZE.
1323*0Sstevel@tonic-gate
1324*0Sstevel@tonic-gate=item CONFIG
1325*0Sstevel@tonic-gate
1326*0Sstevel@tonic-gateArrayref. E.g. [qw(archname manext)] defines ARCHNAME & MANEXT from
1327*0Sstevel@tonic-gateconfig.sh. MakeMaker will add to CONFIG the following values anyway:
1328*0Sstevel@tonic-gatear
1329*0Sstevel@tonic-gatecc
1330*0Sstevel@tonic-gatecccdlflags
1331*0Sstevel@tonic-gateccdlflags
1332*0Sstevel@tonic-gatedlext
1333*0Sstevel@tonic-gatedlsrc
1334*0Sstevel@tonic-gateld
1335*0Sstevel@tonic-gatelddlflags
1336*0Sstevel@tonic-gateldflags
1337*0Sstevel@tonic-gatelibc
1338*0Sstevel@tonic-gatelib_ext
1339*0Sstevel@tonic-gateobj_ext
1340*0Sstevel@tonic-gateranlib
1341*0Sstevel@tonic-gatesitelibexp
1342*0Sstevel@tonic-gatesitearchexp
1343*0Sstevel@tonic-gateso
1344*0Sstevel@tonic-gate
1345*0Sstevel@tonic-gate=item CONFIGURE
1346*0Sstevel@tonic-gate
1347*0Sstevel@tonic-gateCODE reference. The subroutine should return a hash reference. The
1348*0Sstevel@tonic-gatehash may contain further attributes, e.g. {LIBS =E<gt> ...}, that have to
1349*0Sstevel@tonic-gatebe determined by some evaluation method.
1350*0Sstevel@tonic-gate
1351*0Sstevel@tonic-gate=item DEFINE
1352*0Sstevel@tonic-gate
1353*0Sstevel@tonic-gateSomething like C<"-DHAVE_UNISTD_H">
1354*0Sstevel@tonic-gate
1355*0Sstevel@tonic-gate=item DESTDIR
1356*0Sstevel@tonic-gate
1357*0Sstevel@tonic-gateThis is the root directory into which the code will be installed.  It
1358*0Sstevel@tonic-gateI<prepends itself to the normal prefix>.  For example, if your code
1359*0Sstevel@tonic-gatewould normally go into /usr/local/lib/perl you could set DESTDIR=/tmp/
1360*0Sstevel@tonic-gateand installation would go into /tmp/usr/local/lib/perl.
1361*0Sstevel@tonic-gate
1362*0Sstevel@tonic-gateThis is primarily of use for people who repackage Perl modules.
1363*0Sstevel@tonic-gate
1364*0Sstevel@tonic-gateNOTE: Due to the nature of make, it is important that you put the trailing
1365*0Sstevel@tonic-gateslash on your DESTDIR.  "/tmp/" not "/tmp".
1366*0Sstevel@tonic-gate
1367*0Sstevel@tonic-gate=item DIR
1368*0Sstevel@tonic-gate
1369*0Sstevel@tonic-gateRef to array of subdirectories containing Makefile.PLs e.g. [ 'sdbm'
1370*0Sstevel@tonic-gate] in ext/SDBM_File
1371*0Sstevel@tonic-gate
1372*0Sstevel@tonic-gate=item DISTNAME
1373*0Sstevel@tonic-gate
1374*0Sstevel@tonic-gateA safe filename for the package.
1375*0Sstevel@tonic-gate
1376*0Sstevel@tonic-gateDefaults to NAME above but with :: replaced with -.
1377*0Sstevel@tonic-gate
1378*0Sstevel@tonic-gateFor example, Foo::Bar becomes Foo-Bar.
1379*0Sstevel@tonic-gate
1380*0Sstevel@tonic-gate=item DISTVNAME
1381*0Sstevel@tonic-gate
1382*0Sstevel@tonic-gateYour name for distributing the package with the version number
1383*0Sstevel@tonic-gateincluded.  This is used by 'make dist' to name the resulting archive
1384*0Sstevel@tonic-gatefile.
1385*0Sstevel@tonic-gate
1386*0Sstevel@tonic-gateDefaults to DISTNAME-VERSION.
1387*0Sstevel@tonic-gate
1388*0Sstevel@tonic-gateFor example, version 1.04 of Foo::Bar becomes Foo-Bar-1.04.
1389*0Sstevel@tonic-gate
1390*0Sstevel@tonic-gateOn some OS's where . has special meaning VERSION_SYM may be used in
1391*0Sstevel@tonic-gateplace of VERSION.
1392*0Sstevel@tonic-gate
1393*0Sstevel@tonic-gate=item DL_FUNCS
1394*0Sstevel@tonic-gate
1395*0Sstevel@tonic-gateHashref of symbol names for routines to be made available as universal
1396*0Sstevel@tonic-gatesymbols.  Each key/value pair consists of the package name and an
1397*0Sstevel@tonic-gatearray of routine names in that package.  Used only under AIX, OS/2,
1398*0Sstevel@tonic-gateVMS and Win32 at present.  The routine names supplied will be expanded
1399*0Sstevel@tonic-gatein the same way as XSUB names are expanded by the XS() macro.
1400*0Sstevel@tonic-gateDefaults to
1401*0Sstevel@tonic-gate
1402*0Sstevel@tonic-gate  {"$(NAME)" => ["boot_$(NAME)" ] }
1403*0Sstevel@tonic-gate
1404*0Sstevel@tonic-gatee.g.
1405*0Sstevel@tonic-gate
1406*0Sstevel@tonic-gate  {"RPC" => [qw( boot_rpcb rpcb_gettime getnetconfigent )],
1407*0Sstevel@tonic-gate   "NetconfigPtr" => [ 'DESTROY'] }
1408*0Sstevel@tonic-gate
1409*0Sstevel@tonic-gatePlease see the L<ExtUtils::Mksymlists> documentation for more information
1410*0Sstevel@tonic-gateabout the DL_FUNCS, DL_VARS and FUNCLIST attributes.
1411*0Sstevel@tonic-gate
1412*0Sstevel@tonic-gate=item DL_VARS
1413*0Sstevel@tonic-gate
1414*0Sstevel@tonic-gateArray of symbol names for variables to be made available as universal symbols.
1415*0Sstevel@tonic-gateUsed only under AIX, OS/2, VMS and Win32 at present.  Defaults to [].
1416*0Sstevel@tonic-gate(e.g. [ qw(Foo_version Foo_numstreams Foo_tree ) ])
1417*0Sstevel@tonic-gate
1418*0Sstevel@tonic-gate=item EXCLUDE_EXT
1419*0Sstevel@tonic-gate
1420*0Sstevel@tonic-gateArray of extension names to exclude when doing a static build.  This
1421*0Sstevel@tonic-gateis ignored if INCLUDE_EXT is present.  Consult INCLUDE_EXT for more
1422*0Sstevel@tonic-gatedetails.  (e.g.  [ qw( Socket POSIX ) ] )
1423*0Sstevel@tonic-gate
1424*0Sstevel@tonic-gateThis attribute may be most useful when specified as a string on the
1425*0Sstevel@tonic-gatecommand line:  perl Makefile.PL EXCLUDE_EXT='Socket Safe'
1426*0Sstevel@tonic-gate
1427*0Sstevel@tonic-gate=item EXE_FILES
1428*0Sstevel@tonic-gate
1429*0Sstevel@tonic-gateRef to array of executable files. The files will be copied to the
1430*0Sstevel@tonic-gateINST_SCRIPT directory. Make realclean will delete them from there
1431*0Sstevel@tonic-gateagain.
1432*0Sstevel@tonic-gate
1433*0Sstevel@tonic-gateIf your executables start with something like #!perl or
1434*0Sstevel@tonic-gate#!/usr/bin/perl MakeMaker will change this to the path of the perl
1435*0Sstevel@tonic-gate'Makefile.PL' was invoked with so the programs will be sure to run
1436*0Sstevel@tonic-gateproperly even if perl is not in /usr/bin/perl.
1437*0Sstevel@tonic-gate
1438*0Sstevel@tonic-gate=item FIRST_MAKEFILE
1439*0Sstevel@tonic-gate
1440*0Sstevel@tonic-gateThe name of the Makefile to be produced.  This is used for the second
1441*0Sstevel@tonic-gateMakefile that will be produced for the MAP_TARGET.
1442*0Sstevel@tonic-gate
1443*0Sstevel@tonic-gateDefaults to 'Makefile' or 'Descrip.MMS' on VMS.
1444*0Sstevel@tonic-gate
1445*0Sstevel@tonic-gate(Note: we couldn't use MAKEFILE because dmake uses this for something
1446*0Sstevel@tonic-gateelse).
1447*0Sstevel@tonic-gate
1448*0Sstevel@tonic-gate=item FULLPERL
1449*0Sstevel@tonic-gate
1450*0Sstevel@tonic-gatePerl binary able to run this extension, load XS modules, etc...
1451*0Sstevel@tonic-gate
1452*0Sstevel@tonic-gate=item FULLPERLRUN
1453*0Sstevel@tonic-gate
1454*0Sstevel@tonic-gateLike PERLRUN, except it uses FULLPERL.
1455*0Sstevel@tonic-gate
1456*0Sstevel@tonic-gate=item FULLPERLRUNINST
1457*0Sstevel@tonic-gate
1458*0Sstevel@tonic-gateLike PERLRUNINST, except it uses FULLPERL.
1459*0Sstevel@tonic-gate
1460*0Sstevel@tonic-gate=item FUNCLIST
1461*0Sstevel@tonic-gate
1462*0Sstevel@tonic-gateThis provides an alternate means to specify function names to be
1463*0Sstevel@tonic-gateexported from the extension.  Its value is a reference to an
1464*0Sstevel@tonic-gatearray of function names to be exported by the extension.  These
1465*0Sstevel@tonic-gatenames are passed through unaltered to the linker options file.
1466*0Sstevel@tonic-gate
1467*0Sstevel@tonic-gate=item H
1468*0Sstevel@tonic-gate
1469*0Sstevel@tonic-gateRef to array of *.h file names. Similar to C.
1470*0Sstevel@tonic-gate
1471*0Sstevel@tonic-gate=item IMPORTS
1472*0Sstevel@tonic-gate
1473*0Sstevel@tonic-gateThis attribute is used to specify names to be imported into the
1474*0Sstevel@tonic-gateextension. Takes a hash ref.
1475*0Sstevel@tonic-gate
1476*0Sstevel@tonic-gateIt is only used on OS/2 and Win32.
1477*0Sstevel@tonic-gate
1478*0Sstevel@tonic-gate=item INC
1479*0Sstevel@tonic-gate
1480*0Sstevel@tonic-gateInclude file dirs eg: C<"-I/usr/5include -I/path/to/inc">
1481*0Sstevel@tonic-gate
1482*0Sstevel@tonic-gate=item INCLUDE_EXT
1483*0Sstevel@tonic-gate
1484*0Sstevel@tonic-gateArray of extension names to be included when doing a static build.
1485*0Sstevel@tonic-gateMakeMaker will normally build with all of the installed extensions when
1486*0Sstevel@tonic-gatedoing a static build, and that is usually the desired behavior.  If
1487*0Sstevel@tonic-gateINCLUDE_EXT is present then MakeMaker will build only with those extensions
1488*0Sstevel@tonic-gatewhich are explicitly mentioned. (e.g.  [ qw( Socket POSIX ) ])
1489*0Sstevel@tonic-gate
1490*0Sstevel@tonic-gateIt is not necessary to mention DynaLoader or the current extension when
1491*0Sstevel@tonic-gatefilling in INCLUDE_EXT.  If the INCLUDE_EXT is mentioned but is empty then
1492*0Sstevel@tonic-gateonly DynaLoader and the current extension will be included in the build.
1493*0Sstevel@tonic-gate
1494*0Sstevel@tonic-gateThis attribute may be most useful when specified as a string on the
1495*0Sstevel@tonic-gatecommand line:  perl Makefile.PL INCLUDE_EXT='POSIX Socket Devel::Peek'
1496*0Sstevel@tonic-gate
1497*0Sstevel@tonic-gate=item INSTALLARCHLIB
1498*0Sstevel@tonic-gate
1499*0Sstevel@tonic-gateUsed by 'make install', which copies files from INST_ARCHLIB to this
1500*0Sstevel@tonic-gatedirectory if INSTALLDIRS is set to perl.
1501*0Sstevel@tonic-gate
1502*0Sstevel@tonic-gate=item INSTALLBIN
1503*0Sstevel@tonic-gate
1504*0Sstevel@tonic-gateDirectory to install binary files (e.g. tkperl) into if
1505*0Sstevel@tonic-gateINSTALLDIRS=perl.
1506*0Sstevel@tonic-gate
1507*0Sstevel@tonic-gate=item INSTALLDIRS
1508*0Sstevel@tonic-gate
1509*0Sstevel@tonic-gateDetermines which of the sets of installation directories to choose:
1510*0Sstevel@tonic-gateperl, site or vendor.  Defaults to site.
1511*0Sstevel@tonic-gate
1512*0Sstevel@tonic-gate=item INSTALLMAN1DIR
1513*0Sstevel@tonic-gate
1514*0Sstevel@tonic-gate=item INSTALLMAN3DIR
1515*0Sstevel@tonic-gate
1516*0Sstevel@tonic-gateThese directories get the man pages at 'make install' time if
1517*0Sstevel@tonic-gateINSTALLDIRS=perl.  Defaults to $Config{installman*dir}.
1518*0Sstevel@tonic-gate
1519*0Sstevel@tonic-gateIf set to 'none', no man pages will be installed.
1520*0Sstevel@tonic-gate
1521*0Sstevel@tonic-gate=item INSTALLPRIVLIB
1522*0Sstevel@tonic-gate
1523*0Sstevel@tonic-gateUsed by 'make install', which copies files from INST_LIB to this
1524*0Sstevel@tonic-gatedirectory if INSTALLDIRS is set to perl.
1525*0Sstevel@tonic-gate
1526*0Sstevel@tonic-gateDefaults to $Config{installprivlib}.
1527*0Sstevel@tonic-gate
1528*0Sstevel@tonic-gate=item INSTALLSCRIPT
1529*0Sstevel@tonic-gate
1530*0Sstevel@tonic-gateUsed by 'make install' which copies files from INST_SCRIPT to this
1531*0Sstevel@tonic-gatedirectory.
1532*0Sstevel@tonic-gate
1533*0Sstevel@tonic-gate=item INSTALLSITEARCH
1534*0Sstevel@tonic-gate
1535*0Sstevel@tonic-gateUsed by 'make install', which copies files from INST_ARCHLIB to this
1536*0Sstevel@tonic-gatedirectory if INSTALLDIRS is set to site (default).
1537*0Sstevel@tonic-gate
1538*0Sstevel@tonic-gate=item INSTALLSITEBIN
1539*0Sstevel@tonic-gate
1540*0Sstevel@tonic-gateUsed by 'make install', which copies files from INST_BIN to this
1541*0Sstevel@tonic-gatedirectory if INSTALLDIRS is set to site (default).
1542*0Sstevel@tonic-gate
1543*0Sstevel@tonic-gate=item INSTALLSITELIB
1544*0Sstevel@tonic-gate
1545*0Sstevel@tonic-gateUsed by 'make install', which copies files from INST_LIB to this
1546*0Sstevel@tonic-gatedirectory if INSTALLDIRS is set to site (default).
1547*0Sstevel@tonic-gate
1548*0Sstevel@tonic-gate=item INSTALLSITEMAN1DIR
1549*0Sstevel@tonic-gate
1550*0Sstevel@tonic-gate=item INSTALLSITEMAN3DIR
1551*0Sstevel@tonic-gate
1552*0Sstevel@tonic-gateThese directories get the man pages at 'make install' time if
1553*0Sstevel@tonic-gateINSTALLDIRS=site (default).  Defaults to
1554*0Sstevel@tonic-gate$(SITEPREFIX)/man/man$(MAN*EXT).
1555*0Sstevel@tonic-gate
1556*0Sstevel@tonic-gateIf set to 'none', no man pages will be installed.
1557*0Sstevel@tonic-gate
1558*0Sstevel@tonic-gate=item INSTALLVENDORARCH
1559*0Sstevel@tonic-gate
1560*0Sstevel@tonic-gateUsed by 'make install', which copies files from INST_ARCHLIB to this
1561*0Sstevel@tonic-gatedirectory if INSTALLDIRS is set to vendor.
1562*0Sstevel@tonic-gate
1563*0Sstevel@tonic-gate=item INSTALLVENDORBIN
1564*0Sstevel@tonic-gate
1565*0Sstevel@tonic-gateUsed by 'make install', which copies files from INST_BIN to this
1566*0Sstevel@tonic-gatedirectory if INSTALLDIRS is set to vendor.
1567*0Sstevel@tonic-gate
1568*0Sstevel@tonic-gate=item INSTALLVENDORLIB
1569*0Sstevel@tonic-gate
1570*0Sstevel@tonic-gateUsed by 'make install', which copies files from INST_LIB to this
1571*0Sstevel@tonic-gatedirectory if INSTALLDIRS is set to vendor.
1572*0Sstevel@tonic-gate
1573*0Sstevel@tonic-gate=item INSTALLVENDORMAN1DIR
1574*0Sstevel@tonic-gate
1575*0Sstevel@tonic-gate=item INSTALLVENDORMAN3DIR
1576*0Sstevel@tonic-gate
1577*0Sstevel@tonic-gateThese directories get the man pages at 'make install' time if
1578*0Sstevel@tonic-gateINSTALLDIRS=vendor.  Defaults to $(VENDORPREFIX)/man/man$(MAN*EXT).
1579*0Sstevel@tonic-gate
1580*0Sstevel@tonic-gateIf set to 'none', no man pages will be installed.
1581*0Sstevel@tonic-gate
1582*0Sstevel@tonic-gate=item INST_ARCHLIB
1583*0Sstevel@tonic-gate
1584*0Sstevel@tonic-gateSame as INST_LIB for architecture dependent files.
1585*0Sstevel@tonic-gate
1586*0Sstevel@tonic-gate=item INST_BIN
1587*0Sstevel@tonic-gate
1588*0Sstevel@tonic-gateDirectory to put real binary files during 'make'. These will be copied
1589*0Sstevel@tonic-gateto INSTALLBIN during 'make install'
1590*0Sstevel@tonic-gate
1591*0Sstevel@tonic-gate=item INST_LIB
1592*0Sstevel@tonic-gate
1593*0Sstevel@tonic-gateDirectory where we put library files of this extension while building
1594*0Sstevel@tonic-gateit.
1595*0Sstevel@tonic-gate
1596*0Sstevel@tonic-gate=item INST_MAN1DIR
1597*0Sstevel@tonic-gate
1598*0Sstevel@tonic-gateDirectory to hold the man pages at 'make' time
1599*0Sstevel@tonic-gate
1600*0Sstevel@tonic-gate=item INST_MAN3DIR
1601*0Sstevel@tonic-gate
1602*0Sstevel@tonic-gateDirectory to hold the man pages at 'make' time
1603*0Sstevel@tonic-gate
1604*0Sstevel@tonic-gate=item INST_SCRIPT
1605*0Sstevel@tonic-gate
1606*0Sstevel@tonic-gateDirectory, where executable files should be installed during
1607*0Sstevel@tonic-gate'make'. Defaults to "./blib/script", just to have a dummy location during
1608*0Sstevel@tonic-gatetesting. make install will copy the files in INST_SCRIPT to
1609*0Sstevel@tonic-gateINSTALLSCRIPT.
1610*0Sstevel@tonic-gate
1611*0Sstevel@tonic-gate=item LD
1612*0Sstevel@tonic-gate
1613*0Sstevel@tonic-gateProgram to be used to link libraries for dynamic loading.
1614*0Sstevel@tonic-gate
1615*0Sstevel@tonic-gateDefaults to $Config{ld}.
1616*0Sstevel@tonic-gate
1617*0Sstevel@tonic-gate=item LDDLFLAGS
1618*0Sstevel@tonic-gate
1619*0Sstevel@tonic-gateAny special flags that might need to be passed to ld to create a
1620*0Sstevel@tonic-gateshared library suitable for dynamic loading.  It is up to the makefile
1621*0Sstevel@tonic-gateto use it.  (See L<Config/lddlflags>)
1622*0Sstevel@tonic-gate
1623*0Sstevel@tonic-gateDefaults to $Config{lddlflags}.
1624*0Sstevel@tonic-gate
1625*0Sstevel@tonic-gate=item LDFROM
1626*0Sstevel@tonic-gate
1627*0Sstevel@tonic-gateDefaults to "$(OBJECT)" and is used in the ld command to specify
1628*0Sstevel@tonic-gatewhat files to link/load from (also see dynamic_lib below for how to
1629*0Sstevel@tonic-gatespecify ld flags)
1630*0Sstevel@tonic-gate
1631*0Sstevel@tonic-gate=item LIB
1632*0Sstevel@tonic-gate
1633*0Sstevel@tonic-gateLIB should only be set at C<perl Makefile.PL> time but is allowed as a
1634*0Sstevel@tonic-gateMakeMaker argument. It has the effect of setting both INSTALLPRIVLIB
1635*0Sstevel@tonic-gateand INSTALLSITELIB to that value regardless any explicit setting of
1636*0Sstevel@tonic-gatethose arguments (or of PREFIX).  INSTALLARCHLIB and INSTALLSITEARCH
1637*0Sstevel@tonic-gateare set to the corresponding architecture subdirectory.
1638*0Sstevel@tonic-gate
1639*0Sstevel@tonic-gate=item LIBPERL_A
1640*0Sstevel@tonic-gate
1641*0Sstevel@tonic-gateThe filename of the perllibrary that will be used together with this
1642*0Sstevel@tonic-gateextension. Defaults to libperl.a.
1643*0Sstevel@tonic-gate
1644*0Sstevel@tonic-gate=item LIBS
1645*0Sstevel@tonic-gate
1646*0Sstevel@tonic-gateAn anonymous array of alternative library
1647*0Sstevel@tonic-gatespecifications to be searched for (in order) until
1648*0Sstevel@tonic-gateat least one library is found. E.g.
1649*0Sstevel@tonic-gate
1650*0Sstevel@tonic-gate  'LIBS' => ["-lgdbm", "-ldbm -lfoo", "-L/path -ldbm.nfs"]
1651*0Sstevel@tonic-gate
1652*0Sstevel@tonic-gateMind, that any element of the array
1653*0Sstevel@tonic-gatecontains a complete set of arguments for the ld
1654*0Sstevel@tonic-gatecommand. So do not specify
1655*0Sstevel@tonic-gate
1656*0Sstevel@tonic-gate  'LIBS' => ["-ltcl", "-ltk", "-lX11"]
1657*0Sstevel@tonic-gate
1658*0Sstevel@tonic-gateSee ODBM_File/Makefile.PL for an example, where an array is needed. If
1659*0Sstevel@tonic-gateyou specify a scalar as in
1660*0Sstevel@tonic-gate
1661*0Sstevel@tonic-gate  'LIBS' => "-ltcl -ltk -lX11"
1662*0Sstevel@tonic-gate
1663*0Sstevel@tonic-gateMakeMaker will turn it into an array with one element.
1664*0Sstevel@tonic-gate
1665*0Sstevel@tonic-gate=item LINKTYPE
1666*0Sstevel@tonic-gate
1667*0Sstevel@tonic-gate'static' or 'dynamic' (default unless usedl=undef in
1668*0Sstevel@tonic-gateconfig.sh). Should only be used to force static linking (also see
1669*0Sstevel@tonic-gatelinkext below).
1670*0Sstevel@tonic-gate
1671*0Sstevel@tonic-gate=item MAKEAPERL
1672*0Sstevel@tonic-gate
1673*0Sstevel@tonic-gateBoolean which tells MakeMaker, that it should include the rules to
1674*0Sstevel@tonic-gatemake a perl. This is handled automatically as a switch by
1675*0Sstevel@tonic-gateMakeMaker. The user normally does not need it.
1676*0Sstevel@tonic-gate
1677*0Sstevel@tonic-gate=item MAKEFILE_OLD
1678*0Sstevel@tonic-gate
1679*0Sstevel@tonic-gateWhen 'make clean' or similar is run, the $(FIRST_MAKEFILE) will be
1680*0Sstevel@tonic-gatebacked up at this location.
1681*0Sstevel@tonic-gate
1682*0Sstevel@tonic-gateDefaults to $(FIRST_MAKEFILE).old or $(FIRST_MAKEFILE)_old on VMS.
1683*0Sstevel@tonic-gate
1684*0Sstevel@tonic-gate=item MAN1PODS
1685*0Sstevel@tonic-gate
1686*0Sstevel@tonic-gateHashref of pod-containing files. MakeMaker will default this to all
1687*0Sstevel@tonic-gateEXE_FILES files that include POD directives. The files listed
1688*0Sstevel@tonic-gatehere will be converted to man pages and installed as was requested
1689*0Sstevel@tonic-gateat Configure time.
1690*0Sstevel@tonic-gate
1691*0Sstevel@tonic-gate=item MAN3PODS
1692*0Sstevel@tonic-gate
1693*0Sstevel@tonic-gateHashref that assigns to *.pm and *.pod files the files into which the
1694*0Sstevel@tonic-gatemanpages are to be written. MakeMaker parses all *.pod and *.pm files
1695*0Sstevel@tonic-gatefor POD directives. Files that contain POD will be the default keys of
1696*0Sstevel@tonic-gatethe MAN3PODS hashref. These will then be converted to man pages during
1697*0Sstevel@tonic-gateC<make> and will be installed during C<make install>.
1698*0Sstevel@tonic-gate
1699*0Sstevel@tonic-gate=item MAP_TARGET
1700*0Sstevel@tonic-gate
1701*0Sstevel@tonic-gateIf it is intended, that a new perl binary be produced, this variable
1702*0Sstevel@tonic-gatemay hold a name for that binary. Defaults to perl
1703*0Sstevel@tonic-gate
1704*0Sstevel@tonic-gate=item MYEXTLIB
1705*0Sstevel@tonic-gate
1706*0Sstevel@tonic-gateIf the extension links to a library that it builds set this to the
1707*0Sstevel@tonic-gatename of the library (see SDBM_File)
1708*0Sstevel@tonic-gate
1709*0Sstevel@tonic-gate=item NAME
1710*0Sstevel@tonic-gate
1711*0Sstevel@tonic-gatePerl module name for this extension (DBD::Oracle). This will default
1712*0Sstevel@tonic-gateto the directory name but should be explicitly defined in the
1713*0Sstevel@tonic-gateMakefile.PL.
1714*0Sstevel@tonic-gate
1715*0Sstevel@tonic-gate=item NEEDS_LINKING
1716*0Sstevel@tonic-gate
1717*0Sstevel@tonic-gateMakeMaker will figure out if an extension contains linkable code
1718*0Sstevel@tonic-gateanywhere down the directory tree, and will set this variable
1719*0Sstevel@tonic-gateaccordingly, but you can speed it up a very little bit if you define
1720*0Sstevel@tonic-gatethis boolean variable yourself.
1721*0Sstevel@tonic-gate
1722*0Sstevel@tonic-gate=item NOECHO
1723*0Sstevel@tonic-gate
1724*0Sstevel@tonic-gateCommand so make does not print the literal commands its running.
1725*0Sstevel@tonic-gate
1726*0Sstevel@tonic-gateBy setting it to an empty string you can generate a Makefile that
1727*0Sstevel@tonic-gateprints all commands. Mainly used in debugging MakeMaker itself.
1728*0Sstevel@tonic-gate
1729*0Sstevel@tonic-gateDefaults to C<@>.
1730*0Sstevel@tonic-gate
1731*0Sstevel@tonic-gate=item NORECURS
1732*0Sstevel@tonic-gate
1733*0Sstevel@tonic-gateBoolean.  Attribute to inhibit descending into subdirectories.
1734*0Sstevel@tonic-gate
1735*0Sstevel@tonic-gate=item NO_META
1736*0Sstevel@tonic-gate
1737*0Sstevel@tonic-gateWhen true, suppresses the generation and addition to the MANIFEST of
1738*0Sstevel@tonic-gatethe META.yml module meta-data file during 'make distdir'.
1739*0Sstevel@tonic-gate
1740*0Sstevel@tonic-gateDefaults to false.
1741*0Sstevel@tonic-gate
1742*0Sstevel@tonic-gate=item NO_VC
1743*0Sstevel@tonic-gate
1744*0Sstevel@tonic-gateIn general, any generated Makefile checks for the current version of
1745*0Sstevel@tonic-gateMakeMaker and the version the Makefile was built under. If NO_VC is
1746*0Sstevel@tonic-gateset, the version check is neglected. Do not write this into your
1747*0Sstevel@tonic-gateMakefile.PL, use it interactively instead.
1748*0Sstevel@tonic-gate
1749*0Sstevel@tonic-gate=item OBJECT
1750*0Sstevel@tonic-gate
1751*0Sstevel@tonic-gateList of object files, defaults to '$(BASEEXT)$(OBJ_EXT)', but can be a long
1752*0Sstevel@tonic-gatestring containing all object files, e.g. "tkpBind.o
1753*0Sstevel@tonic-gatetkpButton.o tkpCanvas.o"
1754*0Sstevel@tonic-gate
1755*0Sstevel@tonic-gate(Where BASEEXT is the last component of NAME, and OBJ_EXT is $Config{obj_ext}.)
1756*0Sstevel@tonic-gate
1757*0Sstevel@tonic-gate=item OPTIMIZE
1758*0Sstevel@tonic-gate
1759*0Sstevel@tonic-gateDefaults to C<-O>. Set it to C<-g> to turn debugging on. The flag is
1760*0Sstevel@tonic-gatepassed to subdirectory makes.
1761*0Sstevel@tonic-gate
1762*0Sstevel@tonic-gate=item PERL
1763*0Sstevel@tonic-gate
1764*0Sstevel@tonic-gatePerl binary for tasks that can be done by miniperl
1765*0Sstevel@tonic-gate
1766*0Sstevel@tonic-gate=item PERL_CORE
1767*0Sstevel@tonic-gate
1768*0Sstevel@tonic-gateSet only when MakeMaker is building the extensions of the Perl core
1769*0Sstevel@tonic-gatedistribution.
1770*0Sstevel@tonic-gate
1771*0Sstevel@tonic-gate=item PERLMAINCC
1772*0Sstevel@tonic-gate
1773*0Sstevel@tonic-gateThe call to the program that is able to compile perlmain.c. Defaults
1774*0Sstevel@tonic-gateto $(CC).
1775*0Sstevel@tonic-gate
1776*0Sstevel@tonic-gate=item PERL_ARCHLIB
1777*0Sstevel@tonic-gate
1778*0Sstevel@tonic-gateSame as for PERL_LIB, but for architecture dependent files.
1779*0Sstevel@tonic-gate
1780*0Sstevel@tonic-gateUsed only when MakeMaker is building the extensions of the Perl core
1781*0Sstevel@tonic-gatedistribution (because normally $(PERL_ARCHLIB) is automatically in @INC,
1782*0Sstevel@tonic-gateand adding it would get in the way of PERL5LIB).
1783*0Sstevel@tonic-gate
1784*0Sstevel@tonic-gate=item PERL_LIB
1785*0Sstevel@tonic-gate
1786*0Sstevel@tonic-gateDirectory containing the Perl library to use.
1787*0Sstevel@tonic-gate
1788*0Sstevel@tonic-gateUsed only when MakeMaker is building the extensions of the Perl core
1789*0Sstevel@tonic-gatedistribution (because normally $(PERL_LIB) is automatically in @INC,
1790*0Sstevel@tonic-gateand adding it would get in the way of PERL5LIB).
1791*0Sstevel@tonic-gate
1792*0Sstevel@tonic-gate=item PERL_MALLOC_OK
1793*0Sstevel@tonic-gate
1794*0Sstevel@tonic-gatedefaults to 0.  Should be set to TRUE if the extension can work with
1795*0Sstevel@tonic-gatethe memory allocation routines substituted by the Perl malloc() subsystem.
1796*0Sstevel@tonic-gateThis should be applicable to most extensions with exceptions of those
1797*0Sstevel@tonic-gate
1798*0Sstevel@tonic-gate=over 4
1799*0Sstevel@tonic-gate
1800*0Sstevel@tonic-gate=item *
1801*0Sstevel@tonic-gate
1802*0Sstevel@tonic-gatewith bugs in memory allocations which are caught by Perl's malloc();
1803*0Sstevel@tonic-gate
1804*0Sstevel@tonic-gate=item *
1805*0Sstevel@tonic-gate
1806*0Sstevel@tonic-gatewhich interact with the memory allocator in other ways than via
1807*0Sstevel@tonic-gatemalloc(), realloc(), free(), calloc(), sbrk() and brk();
1808*0Sstevel@tonic-gate
1809*0Sstevel@tonic-gate=item *
1810*0Sstevel@tonic-gate
1811*0Sstevel@tonic-gatewhich rely on special alignment which is not provided by Perl's malloc().
1812*0Sstevel@tonic-gate
1813*0Sstevel@tonic-gate=back
1814*0Sstevel@tonic-gate
1815*0Sstevel@tonic-gateB<NOTE.>  Negligence to set this flag in I<any one> of loaded extension
1816*0Sstevel@tonic-gatenullifies many advantages of Perl's malloc(), such as better usage of
1817*0Sstevel@tonic-gatesystem resources, error detection, memory usage reporting, catchable failure
1818*0Sstevel@tonic-gateof memory allocations, etc.
1819*0Sstevel@tonic-gate
1820*0Sstevel@tonic-gate=item PERLPREFIX
1821*0Sstevel@tonic-gate
1822*0Sstevel@tonic-gateDirectory under which core modules are to be installed.
1823*0Sstevel@tonic-gate
1824*0Sstevel@tonic-gateDefaults to $Config{installprefixexp} falling back to
1825*0Sstevel@tonic-gate$Config{installprefix}, $Config{prefixexp} or $Config{prefix} should
1826*0Sstevel@tonic-gate$Config{installprefixexp} not exist.
1827*0Sstevel@tonic-gate
1828*0Sstevel@tonic-gateOverridden by PREFIX.
1829*0Sstevel@tonic-gate
1830*0Sstevel@tonic-gate=item PERLRUN
1831*0Sstevel@tonic-gate
1832*0Sstevel@tonic-gateUse this instead of $(PERL) when you wish to run perl.  It will set up
1833*0Sstevel@tonic-gateextra necessary flags for you.
1834*0Sstevel@tonic-gate
1835*0Sstevel@tonic-gate=item PERLRUNINST
1836*0Sstevel@tonic-gate
1837*0Sstevel@tonic-gateUse this instead of $(PERL) when you wish to run perl to work with
1838*0Sstevel@tonic-gatemodules.  It will add things like -I$(INST_ARCH) and other necessary
1839*0Sstevel@tonic-gateflags so perl can see the modules you're about to install.
1840*0Sstevel@tonic-gate
1841*0Sstevel@tonic-gate=item PERL_SRC
1842*0Sstevel@tonic-gate
1843*0Sstevel@tonic-gateDirectory containing the Perl source code (use of this should be
1844*0Sstevel@tonic-gateavoided, it may be undefined)
1845*0Sstevel@tonic-gate
1846*0Sstevel@tonic-gate=item PERM_RW
1847*0Sstevel@tonic-gate
1848*0Sstevel@tonic-gateDesired permission for read/writable files. Defaults to C<644>.
1849*0Sstevel@tonic-gateSee also L<MM_Unix/perm_rw>.
1850*0Sstevel@tonic-gate
1851*0Sstevel@tonic-gate=item PERM_RWX
1852*0Sstevel@tonic-gate
1853*0Sstevel@tonic-gateDesired permission for executable files. Defaults to C<755>.
1854*0Sstevel@tonic-gateSee also L<MM_Unix/perm_rwx>.
1855*0Sstevel@tonic-gate
1856*0Sstevel@tonic-gate=item PL_FILES
1857*0Sstevel@tonic-gate
1858*0Sstevel@tonic-gateRef to hash of files to be processed as perl programs. MakeMaker
1859*0Sstevel@tonic-gatewill default to any found *.PL file (except Makefile.PL) being keys
1860*0Sstevel@tonic-gateand the basename of the file being the value. E.g.
1861*0Sstevel@tonic-gate
1862*0Sstevel@tonic-gate  {'foobar.PL' => 'foobar'}
1863*0Sstevel@tonic-gate
1864*0Sstevel@tonic-gateThe *.PL files are expected to produce output to the target files
1865*0Sstevel@tonic-gatethemselves. If multiple files can be generated from the same *.PL
1866*0Sstevel@tonic-gatefile then the value in the hash can be a reference to an array of
1867*0Sstevel@tonic-gatetarget file names. E.g.
1868*0Sstevel@tonic-gate
1869*0Sstevel@tonic-gate  {'foobar.PL' => ['foobar1','foobar2']}
1870*0Sstevel@tonic-gate
1871*0Sstevel@tonic-gate=item PM
1872*0Sstevel@tonic-gate
1873*0Sstevel@tonic-gateHashref of .pm files and *.pl files to be installed.  e.g.
1874*0Sstevel@tonic-gate
1875*0Sstevel@tonic-gate  {'name_of_file.pm' => '$(INST_LIBDIR)/install_as.pm'}
1876*0Sstevel@tonic-gate
1877*0Sstevel@tonic-gateBy default this will include *.pm and *.pl and the files found in
1878*0Sstevel@tonic-gatethe PMLIBDIRS directories.  Defining PM in the
1879*0Sstevel@tonic-gateMakefile.PL will override PMLIBDIRS.
1880*0Sstevel@tonic-gate
1881*0Sstevel@tonic-gate=item PMLIBDIRS
1882*0Sstevel@tonic-gate
1883*0Sstevel@tonic-gateRef to array of subdirectories containing library files.  Defaults to
1884*0Sstevel@tonic-gate[ 'lib', $(BASEEXT) ]. The directories will be scanned and I<any> files
1885*0Sstevel@tonic-gatethey contain will be installed in the corresponding location in the
1886*0Sstevel@tonic-gatelibrary.  A libscan() method can be used to alter the behaviour.
1887*0Sstevel@tonic-gateDefining PM in the Makefile.PL will override PMLIBDIRS.
1888*0Sstevel@tonic-gate
1889*0Sstevel@tonic-gate(Where BASEEXT is the last component of NAME.)
1890*0Sstevel@tonic-gate
1891*0Sstevel@tonic-gate=item PM_FILTER
1892*0Sstevel@tonic-gate
1893*0Sstevel@tonic-gateA filter program, in the traditional Unix sense (input from stdin, output
1894*0Sstevel@tonic-gateto stdout) that is passed on each .pm file during the build (in the
1895*0Sstevel@tonic-gatepm_to_blib() phase).  It is empty by default, meaning no filtering is done.
1896*0Sstevel@tonic-gate
1897*0Sstevel@tonic-gateGreat care is necessary when defining the command if quoting needs to be
1898*0Sstevel@tonic-gatedone.  For instance, you would need to say:
1899*0Sstevel@tonic-gate
1900*0Sstevel@tonic-gate  {'PM_FILTER' => 'grep -v \\"^\\#\\"'}
1901*0Sstevel@tonic-gate
1902*0Sstevel@tonic-gateto remove all the leading coments on the fly during the build.  The
1903*0Sstevel@tonic-gateextra \\ are necessary, unfortunately, because this variable is interpolated
1904*0Sstevel@tonic-gatewithin the context of a Perl program built on the command line, and double
1905*0Sstevel@tonic-gatequotes are what is used with the -e switch to build that command line.  The
1906*0Sstevel@tonic-gate# is escaped for the Makefile, since what is going to be generated will then
1907*0Sstevel@tonic-gatebe:
1908*0Sstevel@tonic-gate
1909*0Sstevel@tonic-gate  PM_FILTER = grep -v \"^\#\"
1910*0Sstevel@tonic-gate
1911*0Sstevel@tonic-gateWithout the \\ before the #, we'd have the start of a Makefile comment,
1912*0Sstevel@tonic-gateand the macro would be incorrectly defined.
1913*0Sstevel@tonic-gate
1914*0Sstevel@tonic-gate=item POLLUTE
1915*0Sstevel@tonic-gate
1916*0Sstevel@tonic-gateRelease 5.005 grandfathered old global symbol names by providing preprocessor
1917*0Sstevel@tonic-gatemacros for extension source compatibility.  As of release 5.6, these
1918*0Sstevel@tonic-gatepreprocessor definitions are not available by default.  The POLLUTE flag
1919*0Sstevel@tonic-gatespecifies that the old names should still be defined:
1920*0Sstevel@tonic-gate
1921*0Sstevel@tonic-gate  perl Makefile.PL POLLUTE=1
1922*0Sstevel@tonic-gate
1923*0Sstevel@tonic-gatePlease inform the module author if this is necessary to successfully install
1924*0Sstevel@tonic-gatea module under 5.6 or later.
1925*0Sstevel@tonic-gate
1926*0Sstevel@tonic-gate=item PPM_INSTALL_EXEC
1927*0Sstevel@tonic-gate
1928*0Sstevel@tonic-gateName of the executable used to run C<PPM_INSTALL_SCRIPT> below. (e.g. perl)
1929*0Sstevel@tonic-gate
1930*0Sstevel@tonic-gate=item PPM_INSTALL_SCRIPT
1931*0Sstevel@tonic-gate
1932*0Sstevel@tonic-gateName of the script that gets executed by the Perl Package Manager after
1933*0Sstevel@tonic-gatethe installation of a package.
1934*0Sstevel@tonic-gate
1935*0Sstevel@tonic-gate=item PREFIX
1936*0Sstevel@tonic-gate
1937*0Sstevel@tonic-gateThis overrides all the default install locations.  Man pages,
1938*0Sstevel@tonic-gatelibraries, scripts, etc...  MakeMaker will try to make an educated
1939*0Sstevel@tonic-gateguess about where to place things under the new PREFIX based on your
1940*0Sstevel@tonic-gateConfig defaults.  Failing that, it will fall back to a structure
1941*0Sstevel@tonic-gatewhich should be sensible for your platform.
1942*0Sstevel@tonic-gate
1943*0Sstevel@tonic-gateIf you specify LIB or any INSTALL* variables they will not be effected
1944*0Sstevel@tonic-gateby the PREFIX.
1945*0Sstevel@tonic-gate
1946*0Sstevel@tonic-gate=item PREREQ_FATAL
1947*0Sstevel@tonic-gate
1948*0Sstevel@tonic-gateBool. If this parameter is true, failing to have the required modules
1949*0Sstevel@tonic-gate(or the right versions thereof) will be fatal. perl Makefile.PL will die
1950*0Sstevel@tonic-gatewith the proper message.
1951*0Sstevel@tonic-gate
1952*0Sstevel@tonic-gateNote: see L<Test::Harness> for a shortcut for stopping tests early if
1953*0Sstevel@tonic-gateyou are missing dependencies.
1954*0Sstevel@tonic-gate
1955*0Sstevel@tonic-gateDo I<not> use this parameter for simple requirements, which could be resolved
1956*0Sstevel@tonic-gateat a later time, e.g. after an unsuccessful B<make test> of your module.
1957*0Sstevel@tonic-gate
1958*0Sstevel@tonic-gateIt is I<extremely> rare to have to use C<PREREQ_FATAL> at all!
1959*0Sstevel@tonic-gate
1960*0Sstevel@tonic-gate=item PREREQ_PM
1961*0Sstevel@tonic-gate
1962*0Sstevel@tonic-gateHashref: Names of modules that need to be available to run this
1963*0Sstevel@tonic-gateextension (e.g. Fcntl for SDBM_File) are the keys of the hash and the
1964*0Sstevel@tonic-gatedesired version is the value. If the required version number is 0, we
1965*0Sstevel@tonic-gateonly check if any version is installed already.
1966*0Sstevel@tonic-gate
1967*0Sstevel@tonic-gate=item PREREQ_PRINT
1968*0Sstevel@tonic-gate
1969*0Sstevel@tonic-gateBool.  If this parameter is true, the prerequisites will be printed to
1970*0Sstevel@tonic-gatestdout and MakeMaker will exit.  The output format is an evalable hash
1971*0Sstevel@tonic-gateref.
1972*0Sstevel@tonic-gate
1973*0Sstevel@tonic-gate$PREREQ_PM = {
1974*0Sstevel@tonic-gate               'A::B' => Vers1,
1975*0Sstevel@tonic-gate               'C::D' => Vers2,
1976*0Sstevel@tonic-gate               ...
1977*0Sstevel@tonic-gate             };
1978*0Sstevel@tonic-gate
1979*0Sstevel@tonic-gate=item PRINT_PREREQ
1980*0Sstevel@tonic-gate
1981*0Sstevel@tonic-gateRedHatism for C<PREREQ_PRINT>.  The output format is different, though:
1982*0Sstevel@tonic-gate
1983*0Sstevel@tonic-gate    perl(A::B)>=Vers1 perl(C::D)>=Vers2 ...
1984*0Sstevel@tonic-gate
1985*0Sstevel@tonic-gate=item SITEPREFIX
1986*0Sstevel@tonic-gate
1987*0Sstevel@tonic-gateLike PERLPREFIX, but only for the site install locations.
1988*0Sstevel@tonic-gate
1989*0Sstevel@tonic-gateDefaults to $Config{siteprefixexp}.  Perls prior to 5.6.0 didn't have
1990*0Sstevel@tonic-gatean explicit siteprefix in the Config.  In those cases
1991*0Sstevel@tonic-gate$Config{installprefix} will be used.
1992*0Sstevel@tonic-gate
1993*0Sstevel@tonic-gateOverridable by PREFIX
1994*0Sstevel@tonic-gate
1995*0Sstevel@tonic-gate=item SKIP
1996*0Sstevel@tonic-gate
1997*0Sstevel@tonic-gateArrayref. E.g. [qw(name1 name2)] skip (do not write) sections of the
1998*0Sstevel@tonic-gateMakefile. Caution! Do not use the SKIP attribute for the negligible
1999*0Sstevel@tonic-gatespeedup. It may seriously damage the resulting Makefile. Only use it
2000*0Sstevel@tonic-gateif you really need it.
2001*0Sstevel@tonic-gate
2002*0Sstevel@tonic-gate=item TYPEMAPS
2003*0Sstevel@tonic-gate
2004*0Sstevel@tonic-gateRef to array of typemap file names.  Use this when the typemaps are
2005*0Sstevel@tonic-gatein some directory other than the current directory or when they are
2006*0Sstevel@tonic-gatenot named B<typemap>.  The last typemap in the list takes
2007*0Sstevel@tonic-gateprecedence.  A typemap in the current directory has highest
2008*0Sstevel@tonic-gateprecedence, even if it isn't listed in TYPEMAPS.  The default system
2009*0Sstevel@tonic-gatetypemap has lowest precedence.
2010*0Sstevel@tonic-gate
2011*0Sstevel@tonic-gate=item VENDORPREFIX
2012*0Sstevel@tonic-gate
2013*0Sstevel@tonic-gateLike PERLPREFIX, but only for the vendor install locations.
2014*0Sstevel@tonic-gate
2015*0Sstevel@tonic-gateDefaults to $Config{vendorprefixexp}.
2016*0Sstevel@tonic-gate
2017*0Sstevel@tonic-gateOverridable by PREFIX
2018*0Sstevel@tonic-gate
2019*0Sstevel@tonic-gate=item VERBINST
2020*0Sstevel@tonic-gate
2021*0Sstevel@tonic-gateIf true, make install will be verbose
2022*0Sstevel@tonic-gate
2023*0Sstevel@tonic-gate=item VERSION
2024*0Sstevel@tonic-gate
2025*0Sstevel@tonic-gateYour version number for distributing the package.  This defaults to
2026*0Sstevel@tonic-gate0.1.
2027*0Sstevel@tonic-gate
2028*0Sstevel@tonic-gate=item VERSION_FROM
2029*0Sstevel@tonic-gate
2030*0Sstevel@tonic-gateInstead of specifying the VERSION in the Makefile.PL you can let
2031*0Sstevel@tonic-gateMakeMaker parse a file to determine the version number. The parsing
2032*0Sstevel@tonic-gateroutine requires that the file named by VERSION_FROM contains one
2033*0Sstevel@tonic-gatesingle line to compute the version number. The first line in the file
2034*0Sstevel@tonic-gatethat contains the regular expression
2035*0Sstevel@tonic-gate
2036*0Sstevel@tonic-gate    /([\$*])(([\w\:\']*)\bVERSION)\b.*\=/
2037*0Sstevel@tonic-gate
2038*0Sstevel@tonic-gatewill be evaluated with eval() and the value of the named variable
2039*0Sstevel@tonic-gateB<after> the eval() will be assigned to the VERSION attribute of the
2040*0Sstevel@tonic-gateMakeMaker object. The following lines will be parsed o.k.:
2041*0Sstevel@tonic-gate
2042*0Sstevel@tonic-gate    $VERSION = '1.00';
2043*0Sstevel@tonic-gate    *VERSION = \'1.01';
2044*0Sstevel@tonic-gate    $VERSION = sprintf "%d.%03d", q$Revision: 1.133 $ =~ /(\d+)/g;
2045*0Sstevel@tonic-gate    $FOO::VERSION = '1.10';
2046*0Sstevel@tonic-gate    *FOO::VERSION = \'1.11';
2047*0Sstevel@tonic-gate    our $VERSION = 1.2.3;       # new for perl5.6.0
2048*0Sstevel@tonic-gate
2049*0Sstevel@tonic-gatebut these will fail:
2050*0Sstevel@tonic-gate
2051*0Sstevel@tonic-gate    my $VERSION = '1.01';
2052*0Sstevel@tonic-gate    local $VERSION = '1.02';
2053*0Sstevel@tonic-gate    local $FOO::VERSION = '1.30';
2054*0Sstevel@tonic-gate
2055*0Sstevel@tonic-gate(Putting C<my> or C<local> on the preceding line will work o.k.)
2056*0Sstevel@tonic-gate
2057*0Sstevel@tonic-gateThe file named in VERSION_FROM is not added as a dependency to
2058*0Sstevel@tonic-gateMakefile. This is not really correct, but it would be a major pain
2059*0Sstevel@tonic-gateduring development to have to rewrite the Makefile for any smallish
2060*0Sstevel@tonic-gatechange in that file. If you want to make sure that the Makefile
2061*0Sstevel@tonic-gatecontains the correct VERSION macro after any change of the file, you
2062*0Sstevel@tonic-gatewould have to do something like
2063*0Sstevel@tonic-gate
2064*0Sstevel@tonic-gate    depend => { Makefile => '$(VERSION_FROM)' }
2065*0Sstevel@tonic-gate
2066*0Sstevel@tonic-gateSee attribute C<depend> below.
2067*0Sstevel@tonic-gate
2068*0Sstevel@tonic-gate=item VERSION_SYM
2069*0Sstevel@tonic-gate
2070*0Sstevel@tonic-gateA sanitized VERSION with . replaced by _.  For places where . has
2071*0Sstevel@tonic-gatespecial meaning (some filesystems, RCS labels, etc...)
2072*0Sstevel@tonic-gate
2073*0Sstevel@tonic-gate=item XS
2074*0Sstevel@tonic-gate
2075*0Sstevel@tonic-gateHashref of .xs files. MakeMaker will default this.  e.g.
2076*0Sstevel@tonic-gate
2077*0Sstevel@tonic-gate  {'name_of_file.xs' => 'name_of_file.c'}
2078*0Sstevel@tonic-gate
2079*0Sstevel@tonic-gateThe .c files will automatically be included in the list of files
2080*0Sstevel@tonic-gatedeleted by a make clean.
2081*0Sstevel@tonic-gate
2082*0Sstevel@tonic-gate=item XSOPT
2083*0Sstevel@tonic-gate
2084*0Sstevel@tonic-gateString of options to pass to xsubpp.  This might include C<-C++> or
2085*0Sstevel@tonic-gateC<-extern>.  Do not include typemaps here; the TYPEMAP parameter exists for
2086*0Sstevel@tonic-gatethat purpose.
2087*0Sstevel@tonic-gate
2088*0Sstevel@tonic-gate=item XSPROTOARG
2089*0Sstevel@tonic-gate
2090*0Sstevel@tonic-gateMay be set to an empty string, which is identical to C<-prototypes>, or
2091*0Sstevel@tonic-gateC<-noprototypes>. See the xsubpp documentation for details. MakeMaker
2092*0Sstevel@tonic-gatedefaults to the empty string.
2093*0Sstevel@tonic-gate
2094*0Sstevel@tonic-gate=item XS_VERSION
2095*0Sstevel@tonic-gate
2096*0Sstevel@tonic-gateYour version number for the .xs file of this package.  This defaults
2097*0Sstevel@tonic-gateto the value of the VERSION attribute.
2098*0Sstevel@tonic-gate
2099*0Sstevel@tonic-gate=back
2100*0Sstevel@tonic-gate
2101*0Sstevel@tonic-gate=head2 Additional lowercase attributes
2102*0Sstevel@tonic-gate
2103*0Sstevel@tonic-gatecan be used to pass parameters to the methods which implement that
2104*0Sstevel@tonic-gatepart of the Makefile.  Parameters are specified as a hash ref but are
2105*0Sstevel@tonic-gatepassed to the method as a hash.
2106*0Sstevel@tonic-gate
2107*0Sstevel@tonic-gate=over 2
2108*0Sstevel@tonic-gate
2109*0Sstevel@tonic-gate=item clean
2110*0Sstevel@tonic-gate
2111*0Sstevel@tonic-gate  {FILES => "*.xyz foo"}
2112*0Sstevel@tonic-gate
2113*0Sstevel@tonic-gate=item depend
2114*0Sstevel@tonic-gate
2115*0Sstevel@tonic-gate  {ANY_TARGET => ANY_DEPENDECY, ...}
2116*0Sstevel@tonic-gate
2117*0Sstevel@tonic-gate(ANY_TARGET must not be given a double-colon rule by MakeMaker.)
2118*0Sstevel@tonic-gate
2119*0Sstevel@tonic-gate=item dist
2120*0Sstevel@tonic-gate
2121*0Sstevel@tonic-gate  {TARFLAGS => 'cvfF', COMPRESS => 'gzip', SUFFIX => '.gz',
2122*0Sstevel@tonic-gate  SHAR => 'shar -m', DIST_CP => 'ln', ZIP => '/bin/zip',
2123*0Sstevel@tonic-gate  ZIPFLAGS => '-rl', DIST_DEFAULT => 'private tardist' }
2124*0Sstevel@tonic-gate
2125*0Sstevel@tonic-gateIf you specify COMPRESS, then SUFFIX should also be altered, as it is
2126*0Sstevel@tonic-gateneeded to tell make the target file of the compression. Setting
2127*0Sstevel@tonic-gateDIST_CP to ln can be useful, if you need to preserve the timestamps on
2128*0Sstevel@tonic-gateyour files. DIST_CP can take the values 'cp', which copies the file,
2129*0Sstevel@tonic-gate'ln', which links the file, and 'best' which copies symbolic links and
2130*0Sstevel@tonic-gatelinks the rest. Default is 'best'.
2131*0Sstevel@tonic-gate
2132*0Sstevel@tonic-gate=item dynamic_lib
2133*0Sstevel@tonic-gate
2134*0Sstevel@tonic-gate  {ARMAYBE => 'ar', OTHERLDFLAGS => '...', INST_DYNAMIC_DEP => '...'}
2135*0Sstevel@tonic-gate
2136*0Sstevel@tonic-gate=item linkext
2137*0Sstevel@tonic-gate
2138*0Sstevel@tonic-gate  {LINKTYPE => 'static', 'dynamic' or ''}
2139*0Sstevel@tonic-gate
2140*0Sstevel@tonic-gateNB: Extensions that have nothing but *.pm files had to say
2141*0Sstevel@tonic-gate
2142*0Sstevel@tonic-gate  {LINKTYPE => ''}
2143*0Sstevel@tonic-gate
2144*0Sstevel@tonic-gatewith Pre-5.0 MakeMakers. Since version 5.00 of MakeMaker such a line
2145*0Sstevel@tonic-gatecan be deleted safely. MakeMaker recognizes when there's nothing to
2146*0Sstevel@tonic-gatebe linked.
2147*0Sstevel@tonic-gate
2148*0Sstevel@tonic-gate=item macro
2149*0Sstevel@tonic-gate
2150*0Sstevel@tonic-gate  {ANY_MACRO => ANY_VALUE, ...}
2151*0Sstevel@tonic-gate
2152*0Sstevel@tonic-gate=item postamble
2153*0Sstevel@tonic-gate
2154*0Sstevel@tonic-gateAnything put here will be passed to MY::postamble() if you have one.
2155*0Sstevel@tonic-gate
2156*0Sstevel@tonic-gate=item realclean
2157*0Sstevel@tonic-gate
2158*0Sstevel@tonic-gate  {FILES => '$(INST_ARCHAUTODIR)/*.xyz'}
2159*0Sstevel@tonic-gate
2160*0Sstevel@tonic-gate=item test
2161*0Sstevel@tonic-gate
2162*0Sstevel@tonic-gate  {TESTS => 't/*.t'}
2163*0Sstevel@tonic-gate
2164*0Sstevel@tonic-gate=item tool_autosplit
2165*0Sstevel@tonic-gate
2166*0Sstevel@tonic-gate  {MAXLEN => 8}
2167*0Sstevel@tonic-gate
2168*0Sstevel@tonic-gate=back
2169*0Sstevel@tonic-gate
2170*0Sstevel@tonic-gate=head2 Overriding MakeMaker Methods
2171*0Sstevel@tonic-gate
2172*0Sstevel@tonic-gateIf you cannot achieve the desired Makefile behaviour by specifying
2173*0Sstevel@tonic-gateattributes you may define private subroutines in the Makefile.PL.
2174*0Sstevel@tonic-gateEach subroutine returns the text it wishes to have written to
2175*0Sstevel@tonic-gatethe Makefile. To override a section of the Makefile you can
2176*0Sstevel@tonic-gateeither say:
2177*0Sstevel@tonic-gate
2178*0Sstevel@tonic-gate        sub MY::c_o { "new literal text" }
2179*0Sstevel@tonic-gate
2180*0Sstevel@tonic-gateor you can edit the default by saying something like:
2181*0Sstevel@tonic-gate
2182*0Sstevel@tonic-gate        package MY; # so that "SUPER" works right
2183*0Sstevel@tonic-gate        sub c_o {
2184*0Sstevel@tonic-gate            my $inherited = shift->SUPER::c_o(@_);
2185*0Sstevel@tonic-gate            $inherited =~ s/old text/new text/;
2186*0Sstevel@tonic-gate            $inherited;
2187*0Sstevel@tonic-gate        }
2188*0Sstevel@tonic-gate
2189*0Sstevel@tonic-gateIf you are running experiments with embedding perl as a library into
2190*0Sstevel@tonic-gateother applications, you might find MakeMaker is not sufficient. You'd
2191*0Sstevel@tonic-gatebetter have a look at ExtUtils::Embed which is a collection of utilities
2192*0Sstevel@tonic-gatefor embedding.
2193*0Sstevel@tonic-gate
2194*0Sstevel@tonic-gateIf you still need a different solution, try to develop another
2195*0Sstevel@tonic-gatesubroutine that fits your needs and submit the diffs to
2196*0Sstevel@tonic-gateF<makemaker@perl.org>
2197*0Sstevel@tonic-gate
2198*0Sstevel@tonic-gateFor a complete description of all MakeMaker methods see
2199*0Sstevel@tonic-gateL<ExtUtils::MM_Unix>.
2200*0Sstevel@tonic-gate
2201*0Sstevel@tonic-gateHere is a simple example of how to add a new target to the generated
2202*0Sstevel@tonic-gateMakefile:
2203*0Sstevel@tonic-gate
2204*0Sstevel@tonic-gate    sub MY::postamble {
2205*0Sstevel@tonic-gate        return <<'MAKE_FRAG';
2206*0Sstevel@tonic-gate    $(MYEXTLIB): sdbm/Makefile
2207*0Sstevel@tonic-gate            cd sdbm && $(MAKE) all
2208*0Sstevel@tonic-gate
2209*0Sstevel@tonic-gate    MAKE_FRAG
2210*0Sstevel@tonic-gate    }
2211*0Sstevel@tonic-gate
2212*0Sstevel@tonic-gate=head2 The End Of Cargo Cult Programming
2213*0Sstevel@tonic-gate
2214*0Sstevel@tonic-gateWriteMakefile() now does some basic sanity checks on its parameters to
2215*0Sstevel@tonic-gateprotect against typos and malformatted values.  This means some things
2216*0Sstevel@tonic-gatewhich happened to work in the past will now throw warnings and
2217*0Sstevel@tonic-gatepossibly produce internal errors.
2218*0Sstevel@tonic-gate
2219*0Sstevel@tonic-gateSome of the most common mistakes:
2220*0Sstevel@tonic-gate
2221*0Sstevel@tonic-gate=over 2
2222*0Sstevel@tonic-gate
2223*0Sstevel@tonic-gate=item C<<MAN3PODS => ' '>>
2224*0Sstevel@tonic-gate
2225*0Sstevel@tonic-gateThis is commonly used to supress the creation of man pages.  MAN3PODS
2226*0Sstevel@tonic-gatetakes a hash ref not a string, but the above worked by accident in old
2227*0Sstevel@tonic-gateversions of MakeMaker.
2228*0Sstevel@tonic-gate
2229*0Sstevel@tonic-gateThe correct code is C<<MAN3PODS => { }>>.
2230*0Sstevel@tonic-gate
2231*0Sstevel@tonic-gate=back
2232*0Sstevel@tonic-gate
2233*0Sstevel@tonic-gate
2234*0Sstevel@tonic-gate=head2 Hintsfile support
2235*0Sstevel@tonic-gate
2236*0Sstevel@tonic-gateMakeMaker.pm uses the architecture specific information from
2237*0Sstevel@tonic-gateConfig.pm. In addition it evaluates architecture specific hints files
2238*0Sstevel@tonic-gatein a C<hints/> directory. The hints files are expected to be named
2239*0Sstevel@tonic-gatelike their counterparts in C<PERL_SRC/hints>, but with an C<.pl> file
2240*0Sstevel@tonic-gatename extension (eg. C<next_3_2.pl>). They are simply C<eval>ed by
2241*0Sstevel@tonic-gateMakeMaker within the WriteMakefile() subroutine, and can be used to
2242*0Sstevel@tonic-gateexecute commands as well as to include special variables. The rules
2243*0Sstevel@tonic-gatewhich hintsfile is chosen are the same as in Configure.
2244*0Sstevel@tonic-gate
2245*0Sstevel@tonic-gateThe hintsfile is eval()ed immediately after the arguments given to
2246*0Sstevel@tonic-gateWriteMakefile are stuffed into a hash reference $self but before this
2247*0Sstevel@tonic-gatereference becomes blessed. So if you want to do the equivalent to
2248*0Sstevel@tonic-gateoverride or create an attribute you would say something like
2249*0Sstevel@tonic-gate
2250*0Sstevel@tonic-gate    $self->{LIBS} = ['-ldbm -lucb -lc'];
2251*0Sstevel@tonic-gate
2252*0Sstevel@tonic-gate=head2 Distribution Support
2253*0Sstevel@tonic-gate
2254*0Sstevel@tonic-gateFor authors of extensions MakeMaker provides several Makefile
2255*0Sstevel@tonic-gatetargets. Most of the support comes from the ExtUtils::Manifest module,
2256*0Sstevel@tonic-gatewhere additional documentation can be found.
2257*0Sstevel@tonic-gate
2258*0Sstevel@tonic-gate=over 4
2259*0Sstevel@tonic-gate
2260*0Sstevel@tonic-gate=item    make distcheck
2261*0Sstevel@tonic-gate
2262*0Sstevel@tonic-gatereports which files are below the build directory but not in the
2263*0Sstevel@tonic-gateMANIFEST file and vice versa. (See ExtUtils::Manifest::fullcheck() for
2264*0Sstevel@tonic-gatedetails)
2265*0Sstevel@tonic-gate
2266*0Sstevel@tonic-gate=item    make skipcheck
2267*0Sstevel@tonic-gate
2268*0Sstevel@tonic-gatereports which files are skipped due to the entries in the
2269*0Sstevel@tonic-gateC<MANIFEST.SKIP> file (See ExtUtils::Manifest::skipcheck() for
2270*0Sstevel@tonic-gatedetails)
2271*0Sstevel@tonic-gate
2272*0Sstevel@tonic-gate=item    make distclean
2273*0Sstevel@tonic-gate
2274*0Sstevel@tonic-gatedoes a realclean first and then the distcheck. Note that this is not
2275*0Sstevel@tonic-gateneeded to build a new distribution as long as you are sure that the
2276*0Sstevel@tonic-gateMANIFEST file is ok.
2277*0Sstevel@tonic-gate
2278*0Sstevel@tonic-gate=item    make manifest
2279*0Sstevel@tonic-gate
2280*0Sstevel@tonic-gaterewrites the MANIFEST file, adding all remaining files found (See
2281*0Sstevel@tonic-gateExtUtils::Manifest::mkmanifest() for details)
2282*0Sstevel@tonic-gate
2283*0Sstevel@tonic-gate=item    make distdir
2284*0Sstevel@tonic-gate
2285*0Sstevel@tonic-gateCopies all the files that are in the MANIFEST file to a newly created
2286*0Sstevel@tonic-gatedirectory with the name C<$(DISTNAME)-$(VERSION)>. If that directory
2287*0Sstevel@tonic-gateexists, it will be removed first.
2288*0Sstevel@tonic-gate
2289*0Sstevel@tonic-gateAdditionally, it will create a META.yml module meta-data file and add
2290*0Sstevel@tonic-gatethis to your MANFIEST.  You can shut this behavior off with the NO_META
2291*0Sstevel@tonic-gateflag.
2292*0Sstevel@tonic-gate
2293*0Sstevel@tonic-gate=item   make disttest
2294*0Sstevel@tonic-gate
2295*0Sstevel@tonic-gateMakes a distdir first, and runs a C<perl Makefile.PL>, a make, and
2296*0Sstevel@tonic-gatea make test in that directory.
2297*0Sstevel@tonic-gate
2298*0Sstevel@tonic-gate=item    make tardist
2299*0Sstevel@tonic-gate
2300*0Sstevel@tonic-gateFirst does a distdir. Then a command $(PREOP) which defaults to a null
2301*0Sstevel@tonic-gatecommand, followed by $(TOUNIX), which defaults to a null command under
2302*0Sstevel@tonic-gateUNIX, and will convert files in distribution directory to UNIX format
2303*0Sstevel@tonic-gateotherwise. Next it runs C<tar> on that directory into a tarfile and
2304*0Sstevel@tonic-gatedeletes the directory. Finishes with a command $(POSTOP) which
2305*0Sstevel@tonic-gatedefaults to a null command.
2306*0Sstevel@tonic-gate
2307*0Sstevel@tonic-gate=item    make dist
2308*0Sstevel@tonic-gate
2309*0Sstevel@tonic-gateDefaults to $(DIST_DEFAULT) which in turn defaults to tardist.
2310*0Sstevel@tonic-gate
2311*0Sstevel@tonic-gate=item    make uutardist
2312*0Sstevel@tonic-gate
2313*0Sstevel@tonic-gateRuns a tardist first and uuencodes the tarfile.
2314*0Sstevel@tonic-gate
2315*0Sstevel@tonic-gate=item    make shdist
2316*0Sstevel@tonic-gate
2317*0Sstevel@tonic-gateFirst does a distdir. Then a command $(PREOP) which defaults to a null
2318*0Sstevel@tonic-gatecommand. Next it runs C<shar> on that directory into a sharfile and
2319*0Sstevel@tonic-gatedeletes the intermediate directory again. Finishes with a command
2320*0Sstevel@tonic-gate$(POSTOP) which defaults to a null command.  Note: For shdist to work
2321*0Sstevel@tonic-gateproperly a C<shar> program that can handle directories is mandatory.
2322*0Sstevel@tonic-gate
2323*0Sstevel@tonic-gate=item    make zipdist
2324*0Sstevel@tonic-gate
2325*0Sstevel@tonic-gateFirst does a distdir. Then a command $(PREOP) which defaults to a null
2326*0Sstevel@tonic-gatecommand. Runs C<$(ZIP) $(ZIPFLAGS)> on that directory into a
2327*0Sstevel@tonic-gatezipfile. Then deletes that directory. Finishes with a command
2328*0Sstevel@tonic-gate$(POSTOP) which defaults to a null command.
2329*0Sstevel@tonic-gate
2330*0Sstevel@tonic-gate=item    make ci
2331*0Sstevel@tonic-gate
2332*0Sstevel@tonic-gateDoes a $(CI) and a $(RCS_LABEL) on all files in the MANIFEST file.
2333*0Sstevel@tonic-gate
2334*0Sstevel@tonic-gate=back
2335*0Sstevel@tonic-gate
2336*0Sstevel@tonic-gateCustomization of the dist targets can be done by specifying a hash
2337*0Sstevel@tonic-gatereference to the dist attribute of the WriteMakefile call. The
2338*0Sstevel@tonic-gatefollowing parameters are recognized:
2339*0Sstevel@tonic-gate
2340*0Sstevel@tonic-gate    CI           ('ci -u')
2341*0Sstevel@tonic-gate    COMPRESS     ('gzip --best')
2342*0Sstevel@tonic-gate    POSTOP       ('@ :')
2343*0Sstevel@tonic-gate    PREOP        ('@ :')
2344*0Sstevel@tonic-gate    TO_UNIX      (depends on the system)
2345*0Sstevel@tonic-gate    RCS_LABEL    ('rcs -q -Nv$(VERSION_SYM):')
2346*0Sstevel@tonic-gate    SHAR         ('shar')
2347*0Sstevel@tonic-gate    SUFFIX       ('.gz')
2348*0Sstevel@tonic-gate    TAR          ('tar')
2349*0Sstevel@tonic-gate    TARFLAGS     ('cvf')
2350*0Sstevel@tonic-gate    ZIP          ('zip')
2351*0Sstevel@tonic-gate    ZIPFLAGS     ('-r')
2352*0Sstevel@tonic-gate
2353*0Sstevel@tonic-gateAn example:
2354*0Sstevel@tonic-gate
2355*0Sstevel@tonic-gate    WriteMakefile( 'dist' => { COMPRESS=>"bzip2", SUFFIX=>".bz2" })
2356*0Sstevel@tonic-gate
2357*0Sstevel@tonic-gate
2358*0Sstevel@tonic-gate=head2 Module Meta-Data
2359*0Sstevel@tonic-gate
2360*0Sstevel@tonic-gateLong plaguing users of MakeMaker based modules has been the problem of
2361*0Sstevel@tonic-gategetting basic information about the module out of the sources
2362*0Sstevel@tonic-gateI<without> running the F<Makefile.PL> and doing a bunch of messy
2363*0Sstevel@tonic-gateheuristics on the resulting F<Makefile>.  To this end a simple module
2364*0Sstevel@tonic-gatemeta-data file has been introduced, F<META.yml>.
2365*0Sstevel@tonic-gate
2366*0Sstevel@tonic-gateF<META.yml> is a YAML document (see http://www.yaml.org) containing
2367*0Sstevel@tonic-gatebasic information about the module (name, version, prerequisites...)
2368*0Sstevel@tonic-gatein an easy to read format.  The format is developed and defined by the
2369*0Sstevel@tonic-gateModule::Build developers (see
2370*0Sstevel@tonic-gatehttp://module-build.sourceforge.net/META-spec.html)
2371*0Sstevel@tonic-gate
2372*0Sstevel@tonic-gateMakeMaker will automatically generate a F<META.yml> file for you and
2373*0Sstevel@tonic-gateadd it to your F<MANIFEST> as part of the 'distdir' target (and thus
2374*0Sstevel@tonic-gatethe 'dist' target).  This is intended to seamlessly and rapidly
2375*0Sstevel@tonic-gatepopulate CPAN with module meta-data.  If you wish to shut this feature
2376*0Sstevel@tonic-gateoff, set the C<NO_META> C<WriteMakefile()> flag to true.
2377*0Sstevel@tonic-gate
2378*0Sstevel@tonic-gate
2379*0Sstevel@tonic-gate=head2 Disabling an extension
2380*0Sstevel@tonic-gate
2381*0Sstevel@tonic-gateIf some events detected in F<Makefile.PL> imply that there is no way
2382*0Sstevel@tonic-gateto create the Module, but this is a normal state of things, then you
2383*0Sstevel@tonic-gatecan create a F<Makefile> which does nothing, but succeeds on all the
2384*0Sstevel@tonic-gate"usual" build targets.  To do so, use
2385*0Sstevel@tonic-gate
2386*0Sstevel@tonic-gate   ExtUtils::MakeMaker::WriteEmptyMakefile();
2387*0Sstevel@tonic-gate
2388*0Sstevel@tonic-gateinstead of WriteMakefile().
2389*0Sstevel@tonic-gate
2390*0Sstevel@tonic-gateThis may be useful if other modules expect this module to be I<built>
2391*0Sstevel@tonic-gateOK, as opposed to I<work> OK (say, this system-dependent module builds
2392*0Sstevel@tonic-gatein a subdirectory of some other distribution, or is listed as a
2393*0Sstevel@tonic-gatedependency in a CPAN::Bundle, but the functionality is supported by
2394*0Sstevel@tonic-gatedifferent means on the current architecture).
2395*0Sstevel@tonic-gate
2396*0Sstevel@tonic-gate=head2 Other Handy Functions
2397*0Sstevel@tonic-gate
2398*0Sstevel@tonic-gate=over 4
2399*0Sstevel@tonic-gate
2400*0Sstevel@tonic-gate=item prompt
2401*0Sstevel@tonic-gate
2402*0Sstevel@tonic-gate    my $value = prompt($message);
2403*0Sstevel@tonic-gate    my $value = prompt($message, $default);
2404*0Sstevel@tonic-gate
2405*0Sstevel@tonic-gateThe C<prompt()> function provides an easy way to request user input
2406*0Sstevel@tonic-gateused to write a makefile.  It displays the $message as a prompt for
2407*0Sstevel@tonic-gateinput.  If a $default is provided it will be used as a default.  The
2408*0Sstevel@tonic-gatefunction returns the $value selected by the user.
2409*0Sstevel@tonic-gate
2410*0Sstevel@tonic-gateIf C<prompt()> detects that it is not running interactively and there
2411*0Sstevel@tonic-gateis nothing on STDIN or if the PERL_MM_USE_DEFAULT environment variable
2412*0Sstevel@tonic-gateis set to true, the $default will be used without prompting.  This
2413*0Sstevel@tonic-gateprevents automated processes from blocking on user input.
2414*0Sstevel@tonic-gate
2415*0Sstevel@tonic-gateIf no $default is provided an empty string will be used instead.
2416*0Sstevel@tonic-gate
2417*0Sstevel@tonic-gate=back
2418*0Sstevel@tonic-gate
2419*0Sstevel@tonic-gate
2420*0Sstevel@tonic-gate=head1 ENVIRONMENT
2421*0Sstevel@tonic-gate
2422*0Sstevel@tonic-gate=over 4
2423*0Sstevel@tonic-gate
2424*0Sstevel@tonic-gate=item PERL_MM_OPT
2425*0Sstevel@tonic-gate
2426*0Sstevel@tonic-gateCommand line options used by C<MakeMaker-E<gt>new()>, and thus by
2427*0Sstevel@tonic-gateC<WriteMakefile()>.  The string is split on whitespace, and the result
2428*0Sstevel@tonic-gateis processed before any actual command line arguments are processed.
2429*0Sstevel@tonic-gate
2430*0Sstevel@tonic-gate=item PERL_MM_USE_DEFAULT
2431*0Sstevel@tonic-gate
2432*0Sstevel@tonic-gateIf set to a true value then MakeMaker's prompt function will
2433*0Sstevel@tonic-gatealways return the default without waiting for user input.
2434*0Sstevel@tonic-gate
2435*0Sstevel@tonic-gate=back
2436*0Sstevel@tonic-gate
2437*0Sstevel@tonic-gate=head1 SEE ALSO
2438*0Sstevel@tonic-gate
2439*0Sstevel@tonic-gateExtUtils::MM_Unix, ExtUtils::Manifest ExtUtils::Install,
2440*0Sstevel@tonic-gateExtUtils::Embed
2441*0Sstevel@tonic-gate
2442*0Sstevel@tonic-gate=head1 AUTHORS
2443*0Sstevel@tonic-gate
2444*0Sstevel@tonic-gateAndy Dougherty <F<doughera@lafayette.edu>>, Andreas KE<ouml>nig
2445*0Sstevel@tonic-gate<F<andreas.koenig@mind.de>>, Tim Bunce <F<timb@cpan.org>>.  VMS
2446*0Sstevel@tonic-gatesupport by Charles Bailey <F<bailey@newman.upenn.edu>>.  OS/2 support
2447*0Sstevel@tonic-gateby Ilya Zakharevich <F<ilya@math.ohio-state.edu>>.
2448*0Sstevel@tonic-gate
2449*0Sstevel@tonic-gateCurrently maintained by Michael G Schwern <F<schwern@pobox.com>>
2450*0Sstevel@tonic-gate
2451*0Sstevel@tonic-gateSend patches and ideas to <F<makemaker@perl.org>>.
2452*0Sstevel@tonic-gate
2453*0Sstevel@tonic-gateSend bug reports via http://rt.cpan.org/.  Please send your
2454*0Sstevel@tonic-gategenerated Makefile along with your report.
2455*0Sstevel@tonic-gate
2456*0Sstevel@tonic-gateFor more up-to-date information, see http://www.makemaker.org.
2457*0Sstevel@tonic-gate
2458*0Sstevel@tonic-gate=head1 LICENSE
2459*0Sstevel@tonic-gate
2460*0Sstevel@tonic-gateThis program is free software; you can redistribute it and/or
2461*0Sstevel@tonic-gatemodify it under the same terms as Perl itself.
2462*0Sstevel@tonic-gate
2463*0Sstevel@tonic-gateSee F<http://www.perl.com/perl/misc/Artistic.html>
2464*0Sstevel@tonic-gate
2465*0Sstevel@tonic-gate
2466*0Sstevel@tonic-gate=cut
2467