Unnecessary whitespace diff.
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / MakeMaker.pm
index 7172dbd..13bb850 100644 (file)
 package ExtUtils::MakeMaker;
 
-$Version = 3.7;                # Last edited 19th Dec 1994 by Tim Bunce
+BEGIN {require 5.005_03;}
 
-use Config;
-use Carp;
-use Cwd;
+$VERSION = '6.16';
+($Revision) = q$Revision: 1.131 $ =~ /Revision:\s+(\S+)/;
 
 require Exporter;
+use Config;
+use Carp ();
+use File::Path;
+
+use vars qw(
+            @ISA @EXPORT @EXPORT_OK
+            $Revision $VERSION $Verbose %Config 
+            @Prepend_parent @Parent
+            %Recognized_Att_Keys @Get_from_Config @MM_Sections @Overridable 
+            $Filename
+           );
+use strict;
+
 @ISA = qw(Exporter);
-@EXPORT = qw(&WriteMakefile &mkbootstrap $Verbose &writeMakefile);
-@EXPORT_OK = qw($Version %att %skip %Recognized_Att_Keys @MM_Sections %MM_Sections);
+@EXPORT = qw(&WriteMakefile &writeMakefile $Verbose &prompt);
+@EXPORT_OK = qw($VERSION &neatvalue &mkbootstrap &mksymlists);
 
-$Is_VMS = $Config{'osname'} eq 'VMS';
-require ExtUtils::MM_VMS if $Is_VMS;
+# These will go away once the last of the Win32 & VMS specific code is 
+# purged.
+my $Is_VMS     = $^O eq 'VMS';
+my $Is_Win32   = $^O eq 'MSWin32';
 
-use strict qw(refs);
+# Our filename for diagnostic and debugging purposes.  More reliable
+# than %INC (think caseless filesystems)
+$Filename = __FILE__;
 
-$Version = $Version;# avoid typo warning
-$Verbose = 0;
-$^W=1;
+full_setup();
 
+require ExtUtils::MM;  # Things like CPAN assume loading ExtUtils::MakeMaker
+                       # will give them MM.
 
-=head1 NAME
+require ExtUtils::MY;  # XXX pre-5.8 versions of ExtUtils::Embed expect
+                       # loading ExtUtils::MakeMaker will give them MY.
+                       # This will go when Embed is it's own CPAN module.
 
-ExtUtils::MakeMaker - create an extension Makefile
 
-=head1 SYNOPSIS
+sub WriteMakefile {
+    Carp::croak "WriteMakefile: Need even number of args" if @_ % 2;
 
-use ExtUtils::MakeMaker;
-WriteMakefile( ATTRIBUTE => VALUE [, ...] );
+    require ExtUtils::MY;
+    my %att = @_;
 
-=head1 DESCRIPTION
+    _verify_att(\%att);
 
-This utility is designed to write a Makefile for an extension module
-from a Makefile.PL. It is based on the Makefile.SH model provided by
-Andy Dougherty and the perl5-porters.
+    my $mm = MM->new(\%att);
+    $mm->flush;
 
-It splits the task of generating the Makefile into several subroutines
-that can be individually overridden.  Each subroutine returns the text
-it wishes to have written to the Makefile.
+    return $mm;
+}
 
-=head2 Default Makefile Behaviour
 
-This section (not yet written) will describe how a default Makefile will behave.
+# Basic signatures of the attributes WriteMakefile takes.  Each is the
+# reference type.  Empty value indicate it takes a non-reference
+# scalar.
+my %Att_Sigs;
+my %Special_Sigs = (
+ C                  => 'array',
+ CONFIG             => 'array',
+ CONFIGURE          => 'code',
+ DIR                => 'array',
+ DL_FUNCS           => 'hash',
+ DL_VARS            => 'array',
+ EXCLUDE_EXT        => 'array',
+ EXE_FILES          => 'array',
+ FUNCLIST           => 'array',
+ H                  => 'array',
+ IMPORTS            => 'hash',
+ INCLUDE_EXT        => 'array',
+ LIBS               => ['array',''],
+ MAN1PODS           => 'hash',
+ MAN3PODS           => 'hash',
+ PL_FILES           => 'hash',
+ PM                 => 'hash',
+ PMLIBDIRS          => 'array',
+ PREREQ_PM          => 'hash',
+ SKIP               => 'array',
+ TYPEMAPS           => 'array',
+ XS                 => 'hash',
+ _KEEP_AFTER_FLUSH  => '',
+
+ clean      => 'hash',
+ depend     => 'hash',
+ dist       => 'hash',
+ dynamic_lib=> 'hash',
+ linkext    => 'hash',
+ macro      => 'hash',
+ postamble  => 'hash',
+ realclean  => 'hash',
+ test       => 'hash',
+ tool_autosplit => 'hash',
+);
 
-=head2 Determination of Perl Library and Installation Locations
+@Att_Sigs{keys %Recognized_Att_Keys} = ('') x keys %Recognized_Att_Keys;
+@Att_Sigs{keys %Special_Sigs} = values %Special_Sigs;
+
+
+sub _verify_att {
+    my($att) = @_;
+
+    while( my($key, $val) = each %$att ) {
+        my $sig = $Att_Sigs{$key};
+        unless( defined $sig ) {
+            warn "WARNING: $key is not a known parameter.\n";
+            next;
+        }
+
+        my @sigs   = ref $sig ? @$sig : $sig;
+        my $given = lc ref $val;
+        unless( grep $given eq $_, @sigs ) {
+            my $takes = join " or ", map { $_ ne '' ? "$_ reference"
+                                                    : "string/number"
+                                         } @sigs;
+            my $has   = $given ne '' ? "$given reference"
+                                     : "string/number";
+            warn "WARNING: $key takes a $takes not a $has.\n".
+                 "         Please inform the author.\n";
+        }
+    }
+}
 
-MakeMaker needs to know, or to guess, where certain things are located.
-Especially INST_LIB, INST_ARCHLIB, PERL_LIB, PERL_ARCHLIB and PERL_SRC.
+sub prompt ($;$) {
+    my($mess, $def) = @_;
+    Carp::confess("prompt function called without an argument") 
+        unless defined $mess;
 
-Because installperl does not currently install header files (etc) into
-the library the Perl source code must be available when building
-extensions.  Currently MakeMaker will default PERL_LIB and PERL_ARCHLIB
-to PERL_SRC/lib.  Later, once installperl does install header files
-(etc) into the library, PERL_*LIB will only default to PERL_SRC/lib if
-the extension is in PERL_SRC/ext/* (e.g., a standard extension).
-Otherwise PERL_*LIB and PERL_SRC will default to the public library
-locations.
+    my $isa_tty = -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)) ;
 
-INST_LIB and INST_ARCHLIB default to PERL_LIB and PERL_ARCHLIB.
+    my $dispdef = defined $def ? "[$def] " : " ";
+    $def = defined $def ? $def : "";
 
-=head2 Useful Default Makefile Macros
+    local $|=1;
+    local $\;
+    print "$mess $dispdef";
 
-FULLEXT = Pathname for extension directory (eg DBD/Oracle).
+    my $ans;
+    if ($ENV{PERL_MM_USE_DEFAULT} || (!$isa_tty && eof STDIN)) {
+        print "$def\n";
+    }
+    else {
+        $ans = <STDIN>;
+        if( defined $ans ) {
+            chomp $ans;
+        }
+        else { # user hit ctrl-D
+            print "\n";
+        }
+    }
 
-BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT.
+    return (!defined $ans || $ans eq '') ? $def : $ans;
+}
 
-ROOTEXT = Directory part of FULLEXT with leading slash (eg /DBD)
+sub eval_in_subdirs {
+    my($self) = @_;
+    use Cwd qw(cwd abs_path);
+    my $pwd = cwd() || die "Can't figure out your cwd!";
 
-PERL_LIB
+    local @INC = map eval {abs_path($_) if -e} || $_, @INC;
+    push @INC, '.';     # '.' has to always be at the end of @INC
 
-PERL_ARCHLIB
+    foreach my $dir (@{$self->{DIR}}){
+        my($abs) = $self->catdir($pwd,$dir);
+        $self->eval_in_x($abs);
+    }
+    chdir $pwd;
+}
 
-INST_LIB
+sub eval_in_x {
+    my($self,$dir) = @_;
+    chdir $dir or Carp::carp("Couldn't change to directory $dir: $!");
 
-INST_ARCHLIB
+    {
+        package main;
+        do './Makefile.PL';
+    };
+    if ($@) {
+#         if ($@ =~ /prerequisites/) {
+#             die "MakeMaker WARNING: $@";
+#         } else {
+#             warn "WARNING from evaluation of $dir/Makefile.PL: $@";
+#         }
+        die "ERROR from evaluation of $dir/Makefile.PL: $@";
+    }
+}
 
-INST_LIBDIR = $(INST_LIB)$(ROOTEXT)          (and INST_ARCHLIBDIR)
 
-INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT)   (and INST_ARCHAUTODIR)
+# package name for the classes into which the first object will be blessed
+my $PACKNAME = 'PACK000';
 
-=head2 Customizing The Generated Makefile
+sub full_setup {
+    $Verbose ||= 0;
 
-If the Makefile generated does not fit your purpose you can change it
-using the mechanisms described below.
+    my @attrib_help = qw/
 
-=head2 Using Attributes (and Parameters)
+    AUTHOR ABSTRACT ABSTRACT_FROM BINARY_LOCATION
+    C CAPI CCFLAGS CONFIG CONFIGURE DEFINE DIR DISTNAME DL_FUNCS DL_VARS
+    EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE
+    FULLPERL FULLPERLRUN FULLPERLRUNINST
+    FUNCLIST H IMPORTS
 
-The following attributes can be specified as arguments to WriteMakefile()
-or as NAME=VALUE pairs on the command line:
+    INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB INST_MAN1DIR INST_MAN3DIR
+    INSTALLDIRS
+    DESTDIR PREFIX
+    PERLPREFIX      SITEPREFIX      VENDORPREFIX
+    INSTALLPRIVLIB  INSTALLSITELIB  INSTALLVENDORLIB
+    INSTALLARCHLIB  INSTALLSITEARCH INSTALLVENDORARCH
+    INSTALLBIN      INSTALLSITEBIN  INSTALLVENDORBIN
+    INSTALLMAN1DIR          INSTALLMAN3DIR
+    INSTALLSITEMAN1DIR      INSTALLSITEMAN3DIR
+    INSTALLVENDORMAN1DIR    INSTALLVENDORMAN3DIR
+    INSTALLSCRIPT 
+    PERL_LIB        PERL_ARCHLIB 
+    SITELIBEXP      SITEARCHEXP 
 
-(not yet complete)
+    INC INCLUDE_EXT LDFROM LIB LIBPERL_A LIBS
+    LINKTYPE MAKEAPERL MAKEFILE MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET 
+    MYEXTLIB NAME NEEDS_LINKING NOECHO NO_META NORECURS NO_VC OBJECT OPTIMIZE 
+    PERL_MALLOC_OK PERL PERLMAINCC PERLRUN PERLRUNINST PERL_CORE
+    PERL_SRC PERM_RW PERM_RWX
+    PL_FILES PM PM_FILTER PMLIBDIRS POLLUTE PPM_INSTALL_EXEC
+    PPM_INSTALL_SCRIPT PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ
+    SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG
+    XS_VERSION clean depend dist dynamic_lib linkext macro realclean
+    tool_autosplit
 
-=head2 Overriding MakeMaker Methods
+    MACPERL_SRC MACPERL_LIB MACLIBS_68K MACLIBS_PPC MACLIBS_SC MACLIBS_MRC
+    MACLIBS_ALL_68K MACLIBS_ALL_PPC MACLIBS_SHARED
+        /;
 
-If you cannot achieve the desired Makefile behaviour by specifying
-attributes you may define private subroutines in the Makefile.PL.
-Each subroutines returns the text it wishes to have written to
-the Makefile. To override a section of the Makefile you can
-either say:
+    # IMPORTS is used under OS/2 and Win32
 
-       sub MY::c_o { "new literal text" }
+    # @Overridable is close to @MM_Sections but not identical.  The
+    # order is important. Many subroutines declare macros. These
+    # depend on each other. Let's try to collect the macros up front,
+    # then pasthru, then the rules.
 
-or you can edit the default by saying something like:
+    # MM_Sections are the sections we have to call explicitly
+    # in Overridable we have subroutines that are used indirectly
 
-       sub MY::c_o { $_=MM->c_o; s/old text/new text/; $_ }
 
-If you still need a different solution, try to develop another 
-subroutine, that fits your needs and submit the diffs to 
-perl5-porters@isu.edu or comp.lang.perl as appropriate.
+    @MM_Sections = 
+        qw(
 
+ post_initialize const_config constants platform_constants 
+ tool_autosplit tool_xsubpp tools_other 
 
-=head1 AUTHORS
+ makemakerdflt
 
-Andy Dougherty <doughera@lafcol.lafayette.edu>, Andreas Koenig
-<k@franz.ww.TU-Berlin.DE>, Tim Bunce <Tim.Bunce@ig.co.uk>
-
-=head1 MODIFICATION HISTORY
-
-v1, August 1994; by Andreas Koenig.
-
-Initial version. Based on Andy Dougherty's Makefile.SH work.
-
-v2, September 1994; by Tim Bunce.
-
-Use inheritance to implement overriding.  Methods return text so
-derived methods can edit it before it's output.  mkbootstrap() now
-executes the *_BS file in the DynaLoader package and automatically adds
-dl_findfile() if required. More support for nested modules.
-
-v3.0, October/November 1994; by Tim Bunce.
-
-Major reorganisation. Fixed perl binary locating code. Replaced single
-$(TOP) with $(PERL_SRC), $(PERL_LIB) and $(INST_LIB).  Restructured
-code.  Consolidated and/or eliminated several attributes and added
-argument name checking. Added initial pod documentation. Made generated
-Makefile easier to read. Added generic mechanism for passing parameters
-to specific sections of the Makefile. Merged in Andreas's perl version
-of Andy's extliblist.
-
-v3.1 November 11th 1994 by Tim Bunce
-
-Fixed AIX dynamic loading problem for nested modules. Fixed perl
-extliblist to give paths not names for libs so that cross-check works.
-Converted the .xs to .c translation to a suffix rule. Added a .xs.o
-rule for dumb makes.  Added very useful PM, XS and DIR attributes. Used
-new attributes to make other sections smarter (especially clean and
-realclean). Make clean no longer deletes Makefile so that a later make
-realclean can still work. Fixed all known problems.  Write temporary
-Makefile as Makefile.new and rename once complete.
-
-v3.2 November 18th 1994 By Tim Bunce
-
-Fixed typos, added makefile section (split out of a flattened
-perldepend section). Added subdirectories to test section. Added -lm
-fix for NeXT in extliblist. Added clean of *~ files. Tidied up clean
-and realclean sections to produce fewer lines. Major revision to the
-const_loadlibs comments for EXTRALIBS, LDLOADLIBS and BSLOADLIBS.
-Added LINKTYPE=\$(LINKTYPE) to subdirectory make invocations.
-Write temporary Makefile as MakeMaker.tmp. Write temporary xsubpp
-output files as xstmp.c instead of tmp. Now installs multiple PM files.
-Improved parsing of NAME=VALUE args. $(BOOTSTRAP) is now a dependency
-of $(INST_DYNAMIC). Improved init of PERL_LIB, INST_LIB and PERL_SRC.
-Reinstated $(TOP) for transition period.  Removed CONFIG_SH attribute
-(no longer used). Put INST_PM back and include .pm and .pl files in
-current and lib directory.  Allow OBJECT to contain newlines. ROOTEXT
-now has leading slash. Added INST_LIBDIR (containing ROOTEXT) and
-renamed AUTOEXT to INST_AUTO.  Assorted other cosmetic changes.
-All known problems fixed.
-
-v3.3 November 27th 1994 By Andreas Koenig
-
-Bug fixes submitted by Michael Peppler and Wayne Scott. Changed the
-order how @libpath is constructed in C<new_extliblist()>. Improved
-pod-structure. Relative paths in C<-L> switches to LIBS are turned into
-absolute ones now.  Included VMS support thanks to submissions by
-Charles Bailey.  Added warnings for switches other than C<-L> or C<-l>
-in new_extliblist() and if a library is not found at all. Changed
-dependency distclean:clean to distclean:realclean. Added dependency
-all->config. ext.libs is now written without duplicates and empty
-lines.  As old_extliblist() and new_extliblist() do not produce the
-same anymore, the default becomes new_extliblist(), though the warning
-remains, whenever they differ. The use of cflags is accompanied by a
-replacement: there will be a warning when the two routines lead to
-different results, but still the output of cflags will be used.
-Cosmetic changes (Capitalize globals, uncapitalize others, insert a
-C<:> as default for $postop). Added some verbosity.
-
-v3.4 December 7th 1994 By Andreas Koenig and Tim Bunce
-
-Introduced ARCH_LIB and required other perl files to be patched.
-
-v3.5 December 15th 1994 By Tim Bunce
-
-Based primarily on v3.3. Replaced ARCH_LIB with INST_ARCHLIB, which
-defaults to INST_LIB, because the rest of perl assumes that ./lib
-includes architecture dependent files. Ideally an ./archlib should
-exist, that would be more consistent and simplify installperl.
-Added linkext and $(INST_PM) dependencies to all: target. The linkext
-target (and subroutine) exists solely to depend on $(LINKTYPE). Any
-Makefile.PLs using LINKTYPE => '...' where '...' is not 'static' or
-'dynamic' should be changed to use 'linkext' => { LINKTYPE => '...' }.
-
-Automatic determination of PERL_* and INST_* has been revised.  The
-INST_* macros have INST_ARCH* and INST_*DIR variants. The ARCH variants
-point to the architecture specific directory and the *DIR variants
-include the module specific subdirectory path.  So INST_AUTO is now
-INST_AUTODIR and an INST_ARCHAUTODIR has also been defined.
-
-An AUTOSPLITFILE tool macro has been defined which will AutoSplit any
-named file into any named auto directory. This replaces AUTOSPLITLIB.
-MKPATH now accepts multiple paths. The paths INST_LIBDIR,
-INST_ARCHLIBDIR, INST_AUTODIR and INST_ARCHAUTODIR are made by the
-config: target. A new ext.libs mechanism has been added. installpm has
-been split and now calls installpm_x per file.  A section attribute
-mechanism has been added and skip cross-checking has been moved into a
-skipcheck function. MakeMaker now uses Cwd and File::Basename modules.
-
-v3.6 December 15th 1994 By Tim Bunce
-
-Added C and H attributes and corresponding macros. These default to the
-list of *.c and *.h files in the directory. C also includes *.c file
-names corresponding to any *.xs files in the directory. ARMAYBE should
-now be specified as an attribute of the dynamic_lib section. The installpm
-section now accepts a SPLITLIB attribute. This defaults to '$(INST_LIB)'.
-Improved automatic setting of INST_ARCHLIB. Newlines in OBJECT now translate
-into <space><backslash><newline><tab> for better formatting. Improved
-descriptive comments for EXTRALIBS, LDLOADLIBS and BSLOADLIBS. Bootstrap
-files are now always installed - (after a small patch) the DynaLoader will
-only read a non-empty bootstrap file. Subdirectory dependencies have
-been improved. The .c files produced from .xs files now depend on
-XSUBPPDEPS (the typemaps).
-
-
-=head1 NOTES
-
-MakeMaker development work still to be done:
-
-Needs more complete documentation.
-
-Replace use of cflags with %Config (taking note of hints etc)
-
-Move xsubpp and typemap into lib/ExtUtils/...
-
-The ext.libs file mechanism will need to be revised to allow a
-make-a-perl [list-of-static-extensions] script to work.
-
-Eventually eliminate use of $(PERL_SRC). This must wait until
-MakeMaker is the standard and Larry makes the required changes
-elsewhere.
-
-Add method to take a list of files and wrap it in a Makefile
-compatible way (<space><backslash><newline><tab>).
+ dist macro depend cflags const_loadlibs const_cccmd
+ post_constants
 
-=cut
+ pasthru
 
+ special_targets
+ c_o xs_c xs_o
+ top_targets linkext dlsyms dynamic dynamic_bs
+ dynamic_lib static static_lib manifypods processPL
+ installbin subdirs
+ clean_subdirs clean realclean_subdirs realclean 
+ metafile metafile_addtomanifest
+ dist_basics dist_core distdir dist_test dist_ci
+ install force perldepend makefile staticmake test ppd
 
-# Setup dummy package:
-# MY exists for overriding methods to be defined within
-unshift(@MY::ISA, qw(MM));
-
-# Dummy package MM inherits actual methods from OS-specific
-# default packages.  We use this intermediate package so
-# MY->func() can call MM->func() and get the proper
-# default routine without having to know under what OS
-# it's running.
-unshift(@MM::ISA, $Is_VMS ? qw(ExtUtils::MM_VMS MM_Unix) : qw(MM_Unix));
-
-$Attrib_Help = <<'END';
- NAME:         Perl module name for this extension (DBD::Oracle)
-               This defaults to the directory name.
-
- DISTNAME:     Your name for distributing the package (by tar file)
-               This defaults to NAME above.
-
- VERSION:      Your version number for distributing the package.
-               This defaults to 0.1.
-
- INST_LIB:     Perl library directory to install the module into.
- INST_ARCHLIB: Perl architecture-dependent library to install into
-               (defaults to INST_LIB)
-
- PERL_LIB:     Directory containing the Perl library to use.
- PERL_SRC:     Directory containing the Perl source code
-               (use of this should be avoided, it may be undefined)
-
- INC:          Include file dirs eg: '-I/usr/5include -I/path/to/inc'
- DEFINE:       something like "-DHAVE_UNISTD_H"
- OBJECT:       List of object files, defaults to '$(BASEEXT).o',
-               but can be a long string containing all object files,
-                   e.g. "tkpBind.o tkpButton.o tkpCanvas.o"
- MYEXTLIB:     If the extension links to a library that it builds
-               set this to the name of the library (see SDBM_File)
-
- LIBS:         An anonymous array of alternative library specifications
-               to be searched for (in order) until at least one library
-               is found.
-                 'LIBS' => [ "-lgdbm", "-ldbm -lfoo", "-L/path -ldbm.nfs" ]
-               Mind, that any element of the array contains a complete
-               set of arguments for the ld command. So do not specify
-                 'LIBS' => ["-ltcl", "-ltk", "-lX11" ], #wrong
-               See ODBM_File/Makefile.PL for an example, where an
-               array is needed. If you specify a scalar as in
-                 'LIBS' => "-ltcl -ltk -lX11"
-               MakeMaker will turn it into an array with one element.
-
- LDTARGET:     defaults to "$(OBJECT)" and is used in the ld command
-               (some machines need additional switches for bigger projects)
-
- DIR:          Ref to array of subdirectories containing Makefile.PLs
-               e.g. [ 'sdbm' ] in ext/SDBM_File
-
- PM:           Hashref of .pm files and *.pl files to be installed.
-               e.g. { 'name_of_file.pm' => '$(INST_LIBDIR)/install_as.pm' }
-               By default this will include *.pm and *.pl. If a lib directory
-               exists and is not listed in DIR (above) then any *.pm and
-               *.pl files it contains will also be included by default.
-
- XS:           Hashref of .xs files. MakeMaker will default this.
-               e.g. { 'name_of_file.xs' => 'name_of_file.c' }
-               The .c files will automatically be included in the list
-               of files deleted by a make clean.
-
- C:            Ref to array of *.c file names. Initialised from a directory scan
-               and the values portion of the XS attribute hash. This is not
-               currently used by MakeMaker but may be handy in Makefile.PLs.
-
- H:            Ref to array of *.h file names. Similar to C: above.
-
- LINKTYPE:     =>'static' or 'dynamic' (default unless usedl=undef in config.sh)
-               Should only be used to force static linking (also see linkext below).
-
- CONFIG:       =>[qw(archname manext)] defines ARCHNAME & MANEXT from config.sh
- SKIP:         =>[qw(name1 name2)] skip (do not write) sections of the Makefile
-
- PERL:
- FULLPERL:
-
-Additional lowercase attributes can be used to pass parameters to the
-methods which implement that part of the Makefile. These are not
-normally required:
-
- installpm:    {SPLITLIB => '$(INST_LIB)' (default) or '$(INST_ARCHLIB)'}
- linkext:      {LINKTYPE => 'static', 'dynamic' or ''}
- dynamic_lib   {ARMAYBE => 'ar', OTHERLDFLAGS => '...'}
- clean:                {FILES => "*.xyz foo"}
- realclean:    {FILES => '$(INST_AUTODIR)/*.xyz'}
- distclean:    {TARNAME=>'MyTarFile', TARFLAGS=>'cvfF', COMPRESS=>'gzip'}
- tool_autosplit:       {MAXLEN => 8}
-END
+          ); # loses section ordering
 
-@MM_Sections_spec = (
-    'post_initialize'  => {},
-    'constants'                => {},
-    'const_config'     => {},
-    'const_loadlibs'   => {},
-    'const_cccmd'      => {},
-    'tool_autosplit'   => {},
-    'tool_xsubpp'      => {},
-    'tools_other'      => {},
-    'post_constants'   => {},
-    'c_o'              => {},
-    'xs_c'             => {},
-    'xs_o'             => {},
-    'top_targets'      => {},
-    'linkext'          => {},
-    'dynamic'          => {},
-    'dynamic_bs'       => {},
-    'dynamic_lib'      => {},
-    'static'           => {},
-    'static_lib'       => {},
-    'installpm'                => {},
-    'subdirs'          => {},
-    'clean'            => {},
-    'realclean'                => {},
-    'distclean'                => {},
-    'test'             => {},
-    'install'          => {},
-    'force'            => {},
-    'perldepend'       => {},
-    'makefile'         => {},
-    'postamble'                => {},
-);
-%MM_Sections = @MM_Sections_spec; # looses section ordering
-@MM_Sections = grep(!ref, @MM_Sections_spec); # keeps order
-
-%Recognized_Att_Keys = %MM_Sections; # All sections are valid keys.
-foreach(split(/\n/,$Attrib_Help)){
-    chomp;
-    next unless m/^\s*(\w+):\s*(.*)/;
-    $Recognized_Att_Keys{$1} = $2;
-    print "Attribute '$1' => '$2'\n" if ($Verbose >= 2);
+    @Overridable = @MM_Sections;
+    push @Overridable, qw[
+
+ dir_target libscan makeaperl needs_linking perm_rw perm_rwx
+ subdir_x test_via_harness test_via_script init_PERL
+                         ];
+
+    push @MM_Sections, qw[
+
+ pm_to_blib selfdocument
+
+                         ];
+
+    # Postamble needs to be the last that was always the case
+    push @MM_Sections, "postamble";
+    push @Overridable, "postamble";
+
+    # All sections are valid keys.
+    @Recognized_Att_Keys{@MM_Sections} = (1) x @MM_Sections;
+
+    # we will use all these variables in the Makefile
+    @Get_from_Config = 
+        qw(
+           ar cc cccdlflags ccdlflags dlext dlsrc ld lddlflags ldflags libc
+           lib_ext obj_ext osname osvers ranlib sitelibexp sitearchexp so
+           exe_ext full_ar
+          );
+
+    # 5.5.3 doesn't have any concept of vendor libs
+    push @Get_from_Config, qw( vendorarchexp vendorlibexp ) if $] >= 5.006;
+
+    foreach my $item (@attrib_help){
+        $Recognized_Att_Keys{$item} = 1;
+    }
+    foreach my $item (@Get_from_Config) {
+        $Recognized_Att_Keys{uc $item} = $Config{$item};
+        print "Attribute '\U$item\E' => '$Config{$item}'\n"
+            if ($Verbose >= 2);
+    }
+
+    #
+    # When we eval a Makefile.PL in a subdirectory, that one will ask
+    # us (the parent) for the values and will prepend "..", so that
+    # all files to be installed end up below OUR ./blib
+    #
+    @Prepend_parent = qw(
+           INST_BIN INST_LIB INST_ARCHLIB INST_SCRIPT
+           MAP_TARGET INST_MAN1DIR INST_MAN3DIR PERL_SRC
+           PERL FULLPERL
+    );
 }
 
-%att  = ();
-%skip = ();
+sub writeMakefile {
+    die <<END;
 
-sub skipcheck{
-    my($section) = @_;
-    return 'skipped' if $skip{$section};
-    return '';
+The extension you are trying to build apparently is rather old and
+most probably outdated. We detect that from the fact, that a
+subroutine "writeMakefile" is called, and this subroutine is not
+supported anymore since about October 1994.
+
+Please contact the author or look into CPAN (details about CPAN can be
+found in the FAQ and at http:/www.perl.com) for a more recent version
+of the extension. If you're really desperate, you can try to change
+the subroutine name from writeMakefile to WriteMakefile and rerun
+'perl Makefile.PL', but you're most probably left alone, when you do
+so.
+
+The MakeMaker team
+
+END
 }
 
+sub new {
+    my($class,$self) = @_;
+    my($key);
 
-sub WriteMakefile {
-    %att = @_;
-    local($\)="\n";
+    # Store the original args passed to WriteMakefile()
+    foreach my $k (keys %$self) {
+        $self->{ARGS}{$k} = $self->{$k};
+    }
 
-    print STDOUT "MakeMaker" if $Verbose;
+    if ("@ARGV" =~ /\bPREREQ_PRINT\b/) {
+        require Data::Dumper;
+        print Data::Dumper->Dump([$self->{PREREQ_PM}], [qw(PREREQ_PM)]);
+        exit 0;
+    }
 
-    parse_args(\%att, @ARGV);
-    my(%initial_att) = %att; # record initial attributes
+    # PRINT_PREREQ is RedHatism.
+    if ("@ARGV" =~ /\bPRINT_PREREQ\b/) {
+        print join(" ", map { "perl($_)>=$self->{PREREQ_PM}->{$_} " } 
+                        sort keys %{$self->{PREREQ_PM}}), "\n";
+        exit 0;
+   }
 
-    MY->initialize(@ARGV);
+    print STDOUT "MakeMaker (v$VERSION)\n" if $Verbose;
+    if (-f "MANIFEST" && ! -f "Makefile"){
+        check_manifest();
+    }
 
-    print STDOUT "Writing Makefile for $att{NAME}";
+    $self = {} unless (defined $self);
+
+    check_hints($self);
+
+    my %configure_att;         # record &{$self->{CONFIGURE}} attributes
+    my(%initial_att) = %$self; # record initial attributes
+
+    my(%unsatisfied) = ();
+    foreach my $prereq (sort keys %{$self->{PREREQ_PM}}) {
+        # 5.8.0 has a bug with require Foo::Bar alone in an eval, so an
+        # extra statement is a workaround.
+        eval "require $prereq; 0";
+
+        my $pr_version = $prereq->VERSION || 0;
+
+        # convert X.Y_Z alpha version #s to X.YZ for easier comparisons
+        $pr_version =~ s/(\d+)\.(\d+)_(\d+)/$1.$2$3/;
+
+        if ($@) {
+            warn sprintf "Warning: prerequisite %s %s not found.\n", 
+              $prereq, $self->{PREREQ_PM}{$prereq} 
+                   unless $self->{PREREQ_FATAL};
+            $unsatisfied{$prereq} = 'not installed';
+        } elsif ($pr_version < $self->{PREREQ_PM}->{$prereq} ){
+            warn sprintf "Warning: prerequisite %s %s not found. We have %s.\n",
+              $prereq, $self->{PREREQ_PM}{$prereq}, 
+                ($pr_version || 'unknown version') 
+                  unless $self->{PREREQ_FATAL};
+            $unsatisfied{$prereq} = $self->{PREREQ_PM}->{$prereq} ? 
+              $self->{PREREQ_PM}->{$prereq} : 'unknown version' ;
+        }
+    }
+    if (%unsatisfied && $self->{PREREQ_FATAL}){
+        my $failedprereqs = join ', ', map {"$_ $unsatisfied{$_}"} 
+                            keys %unsatisfied;
+        die qq{MakeMaker FATAL: prerequisites not found ($failedprereqs)\n
+               Please install these modules first and rerun 'perl Makefile.PL'.\n};
+    }
 
-    unlink("Makefile", "MakeMaker.tmp", $Is_VMS ? 'Descrip.MMS' : '');
-    open MAKE, ">MakeMaker.tmp" or die "Unable to open MakeMaker.tmp: $!";
-    select MAKE; $|=1; select STDOUT;
+    if (defined $self->{CONFIGURE}) {
+        if (ref $self->{CONFIGURE} eq 'CODE') {
+            %configure_att = %{&{$self->{CONFIGURE}}};
+            $self = { %$self, %configure_att };
+        } else {
+            Carp::croak "Attribute 'CONFIGURE' to WriteMakefile() not a code reference\n";
+        }
+    }
 
-    print MAKE "# This Makefile is for the $att{NAME} extension to perl.\n#";
-    print MAKE "# It was generated automatically by MakeMaker from the contents";
-    print MAKE "# of Makefile.PL. Don't edit this file, edit Makefile.PL instead.";
-    print MAKE "#\n#   ANY CHANGES MADE HERE WILL BE LOST! \n#";
-    print MAKE "#   MakeMaker Parameters: ";
-    foreach $key (sort keys %initial_att){
-       my($v) = neatvalue($initial_att{$key});
-       $v =~ tr/\n/ /s;
-       print MAKE "#   $key => $v";
+    # This is for old Makefiles written pre 5.00, will go away
+    if ( Carp::longmess("") =~ /runsubdirpl/s ){
+        Carp::carp("WARNING: Please rerun 'perl Makefile.PL' to regenerate your Makefiles\n");
     }
 
-    # build hash for SKIP to make testing easy
-    %skip = map( ($_,1), @{$att{'SKIP'} || []});
-
-    foreach $section ( @MM_Sections ){
-       print "Processing Makefile '$section' section" if ($Verbose >= 2);
-       my($skipit) = skipcheck($section);
-       if ($skipit){
-           print MAKE "\n# --- MakeMaker $section section $skipit.";
-       } else {
-           my(%a) = %{$att{$section} || {}};
-           print MAKE "\n# --- MakeMaker $section section:";
-           print MAKE "# ",%a if ($Verbose >= 2);
-           print(MAKE MY->nicetext(MY->$section( %a )));
-       }
+    my $newclass = ++$PACKNAME;
+    local @Parent = @Parent;    # Protect against non-local exits
+    {
+        no strict 'refs';
+        print "Blessing Object into class [$newclass]\n" if $Verbose>=2;
+        mv_all_methods("MY",$newclass);
+        bless $self, $newclass;
+        push @Parent, $self;
+        require ExtUtils::MY;
+        @{"$newclass\:\:ISA"} = 'MM';
     }
 
-    if ($Verbose){
-       print MAKE "\n# Full list of MakeMaker attribute values:";
-       foreach $key (sort keys %att){
-           my($v) = neatvalue($att{$key});
-           $v =~ tr/\n/ /s;
-           print MAKE "#       $key => $v";
-       }
+    if (defined $Parent[-2]){
+        $self->{PARENT} = $Parent[-2];
+        my $key;
+        for $key (@Prepend_parent) {
+            next unless defined $self->{PARENT}{$key};
+
+            # Don't stomp on WriteMakefile() args.
+            next if defined $self->{ARGS}{$key} and
+                    $self->{ARGS}{$key} eq $self->{$key};
+
+            $self->{$key} = $self->{PARENT}{$key};
+
+            unless ($Is_VMS && $key =~ /PERL$/) {
+                $self->{$key} = $self->catdir("..",$self->{$key})
+                  unless $self->file_name_is_absolute($self->{$key});
+            } else {
+                # PERL or FULLPERL will be a command verb or even a
+                # command with an argument instead of a full file
+                # specification under VMS.  So, don't turn the command
+                # into a filespec, but do add a level to the path of
+                # the argument if not already absolute.
+                my @cmd = split /\s+/, $self->{$key};
+                $cmd[1] = $self->catfile('[-]',$cmd[1])
+                  unless (@cmd < 2) || $self->file_name_is_absolute($cmd[1]);
+                $self->{$key} = join(' ', @cmd);
+            }
+        }
+        if ($self->{PARENT}) {
+            $self->{PARENT}->{CHILDREN}->{$newclass} = $self;
+            foreach my $opt (qw(POLLUTE PERL_CORE)) {
+                if (exists $self->{PARENT}->{$opt}
+                    and not exists $self->{$opt})
+                    {
+                        # inherit, but only if already unspecified
+                        $self->{$opt} = $self->{PARENT}->{$opt};
+                    }
+            }
+        }
+        my @fm = grep /^FIRST_MAKEFILE=/, @ARGV;
+        parse_args($self,@fm) if @fm;
+    } else {
+        parse_args($self,split(' ', $ENV{PERL_MM_OPT} || ''),@ARGV);
+    }
+
+    $self->{NAME} ||= $self->guess_name;
+
+    ($self->{NAME_SYM} = $self->{NAME}) =~ s/\W+/_/g;
+
+    $self->init_main;
+    $self->init_VERSION;
+    $self->init_dist;
+    $self->init_INST;
+    $self->init_INSTALL;
+    $self->init_DEST;
+    $self->init_dirscan;
+    $self->init_xs;
+    $self->init_PERL;
+    $self->init_DIRFILESEP;
+    $self->init_linker;
+
+    if (! $self->{PERL_SRC} ) {
+        require VMS::Filespec if $Is_VMS;
+        my($pthinks) = $self->canonpath($INC{'Config.pm'});
+        my($cthinks) = $self->catfile($Config{'archlibexp'},'Config.pm');
+        $pthinks = VMS::Filespec::vmsify($pthinks) if $Is_VMS;
+        if ($pthinks ne $cthinks &&
+            !($Is_Win32 and lc($pthinks) eq lc($cthinks))) {
+            print "Have $pthinks expected $cthinks\n";
+            if ($Is_Win32) {
+                $pthinks =~ s![/\\]Config\.pm$!!i; $pthinks =~ s!.*[/\\]!!;
+            }
+            else {
+                $pthinks =~ s!/Config\.pm$!!; $pthinks =~ s!.*/!!;
+            }
+            print STDOUT <<END unless $self->{UNINSTALLED_PERL};
+Your perl and your Config.pm seem to have different ideas about the 
+architecture they are running on.
+Perl thinks: [$pthinks]
+Config says: [$Config{archname}]
+This may or may not cause problems. Please check your installation of perl 
+if you have problems building this extension.
+END
+        }
     }
 
-    print MAKE "\n# End.";
-    close MAKE;
-    my($finalname) = $Is_VMS ? "Descrip.MMS" : "Makefile";
-    rename("MakeMaker.tmp", $finalname);
+    $self->init_others();
+    $self->init_platform();
+    $self->init_PERM();
+    my($argv) = neatvalue(\@ARGV);
+    $argv =~ s/^\[/(/;
+    $argv =~ s/\]$/)/;
 
-    chmod 0644, $finalname;
-    system("$Config{'eunicefix'} $finalname") unless $Config{'eunicefix'} eq ":";
+    push @{$self->{RESULT}}, <<END;
+# This Makefile is for the $self->{NAME} extension to perl.
+#
+# It was generated automatically by MakeMaker version
+# $VERSION (Revision: $Revision) from the contents of
+# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
+#
+#       ANY CHANGES MADE HERE WILL BE LOST!
+#
+#   MakeMaker ARGV: $argv
+#
+#   MakeMaker Parameters:
+END
 
-    1;
-}
+    foreach my $key (sort keys %initial_att){
+        next if $key eq 'ARGS';
 
+        my($v) = neatvalue($initial_att{$key});
+        $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
+        $v =~ tr/\n/ /s;
+        push @{$self->{RESULT}}, "#     $key => $v";
+    }
+    undef %initial_att;        # free memory
 
-sub mkbootstrap{
-    parse_args(\%att, @ARGV);
-    MY->mkbootstrap(@_);
-}
+    if (defined $self->{CONFIGURE}) {
+       push @{$self->{RESULT}}, <<END;
 
+#   MakeMaker 'CONFIGURE' Parameters:
+END
+        if (scalar(keys %configure_att) > 0) {
+            foreach my $key (sort keys %configure_att){
+               next if $key eq 'ARGS';
+               my($v) = neatvalue($configure_att{$key});
+               $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
+               $v =~ tr/\n/ /s;
+               push @{$self->{RESULT}}, "#     $key => $v";
+            }
+        }
+        else
+        {
+           push @{$self->{RESULT}}, "# no values returned";
+        }
+        undef %configure_att;  # free memory
+    }
 
-sub parse_args{
-    my($attr, @args) = @_;
-    foreach (@args){
-       next unless m/(.*?)=(.*)/;
-       $$attr{$1} = $2;
+    # turn the SKIP array into a SKIPHASH hash
+    my (%skip,$skip);
+    for $skip (@{$self->{SKIP} || []}) {
+        $self->{SKIPHASH}{$skip} = 1;
     }
-    # catch old-style 'potential_libs' and inform user how to 'upgrade'
-    if (defined $$attr{'potential_libs'}){
-       my($msg)="'potential_libs' => '$$attr{potential_libs}' should be";
-       if ($$attr{'potential_libs'}){
-           print STDERR "$msg changed to:\n\t'LIBS' => ['$$attr{potential_libs}']\n";
-       } else {
-           print STDERR "$msg deleted.\n";
-       }
-       $$attr{LIBS} = [$$attr{'potential_libs'}];
-       delete $$attr{'potential_libs'};
+    delete $self->{SKIP}; # free memory
+
+    if ($self->{PARENT}) {
+        for (qw/install dist dist_basics dist_core distdir dist_test dist_ci/) {
+            $self->{SKIPHASH}{$_} = 1;
+        }
     }
-    # catch old-style 'ARMAYBE' and inform user how to 'upgrade'
-    if (defined $$attr{'ARMAYBE'}){
-       my($armaybe) = $$attr{'ARMAYBE'};
-       print STDERR "ARMAYBE => '$armaybe' should be changed to:\n",
-                       "\t'dynamic_lib' => {ARMAYBE => '$armaybe'}\n";
-       my(%dl) = %{$$attr{'dynamic_lib'} || {}};
-       $$attr{'dynamic_lib'} = { %dl, ARMAYBE => $armaybe};
-       delete $$attr{'ARMAYBE'};
+
+    # We run all the subdirectories now. They don't have much to query
+    # from the parent, but the parent has to query them: if they need linking!
+    unless ($self->{NORECURS}) {
+        $self->eval_in_subdirs if @{$self->{DIR}};
     }
-    foreach(sort keys %{$attr}){
-       print STDOUT "  $_ => ".neatvalue($$attr{$_}) if ($Verbose);
-       warn "'$_' is not a known MakeMaker parameter name.\n"
-           unless exists $Recognized_Att_Keys{$_};
+
+    foreach my $section ( @MM_Sections ){
+        # Support for new foo_target() methods.
+        my $method = $section;
+        $method .= '_target' unless $self->can($method);
+
+        print "Processing Makefile '$section' section\n" if ($Verbose >= 2);
+        my($skipit) = $self->skipcheck($section);
+        if ($skipit){
+            push @{$self->{RESULT}}, "\n# --- MakeMaker $section section $skipit.";
+        } else {
+            my(%a) = %{$self->{$section} || {}};
+            push @{$self->{RESULT}}, "\n# --- MakeMaker $section section:";
+            push @{$self->{RESULT}}, "# " . join ", ", %a if $Verbose && %a;
+            push @{$self->{RESULT}}, $self->nicetext($self->$method( %a ));
+        }
     }
-}
 
+    push @{$self->{RESULT}}, "\n# End.";
 
-sub neatvalue{
-    my($v) = @_;
-    my($t) = ref $v;
-    return "'$v'" unless $t;
-    return "[ ".join(', ',map("'$_'",@$v))." ]" if ($t eq 'ARRAY');
-    return "$v" unless $t eq 'HASH';
-    my(@m, $key, $val);
-    push(@m,"$key=>".neatvalue($val)) while (($key,$val) = each %$v);
-    return "{ ".join(', ',@m)." }";
+    $self;
 }
 
+sub WriteEmptyMakefile {
+    Carp::croak "WriteEmptyMakefile: Need even number of args" if @_ % 2;
 
-# ------ Define the MakeMaker default methods in package MM_Unix ------
+    my %att = @_;
+    my $self = MM->new(\%att);
+    if (-f $self->{MAKEFILE_OLD}) {
+      _unlink($self->{MAKEFILE_OLD}) or 
+        warn "unlink $self->{MAKEFILE_OLD}: $!";
+    }
+    if ( -f $self->{MAKEFILE} ) {
+        _rename($self->{MAKEFILE}, $self->{MAKEFILE_OLD}) or
+          warn "rename $self->{MAKEFILE} => $self->{MAKEFILE_OLD}: $!"
+    }
+    open MF, '>'.$self->{MAKEFILE} or die "open $self->{MAKEFILE} for write: $!";
+    print MF <<'EOP';
+all:
 
-package MM_Unix;
+clean:
 
-use Config;
-use Cwd;
-use File::Basename;
-require Exporter;
+install:
 
-Exporter::import('ExtUtils::MakeMaker',
-       qw(%att %skip %Recognized_Att_Keys $Verbose));
+makemakerdflt:
 
-# These attributes cannot be overridden externally
-@Other_Att_Keys{qw(EXTRALIBS BSLOADLIBS LDLOADLIBS)} = (1) x 3;
+test:
 
-if ($Is_VMS = $Config{'osname'} eq 'VMS') {
-    require File::VMSspec;
-    import File::VMSspec 'vmsify';
+EOP
+    close MF or die "close $self->{MAKEFILE} for write: $!";
 }
 
+sub check_manifest {
+    print STDOUT "Checking if your kit is complete...\n";
+    require ExtUtils::Manifest;
+    # avoid warning
+    $ExtUtils::Manifest::Quiet = $ExtUtils::Manifest::Quiet = 1;
+    my(@missed) = ExtUtils::Manifest::manicheck();
+    if (@missed) {
+        print STDOUT "Warning: the following files are missing in your kit:\n";
+        print "\t", join "\n\t", @missed;
+        print STDOUT "\n";
+        print STDOUT "Please inform the author.\n";
+    } else {
+        print STDOUT "Looks good\n";
+    }
+}
 
-sub initialize {
-    # Find out directory name.  This may contain the extension name.
-    my($pwd) = fastcwd(); # from Cwd.pm
+sub parse_args{
+    my($self, @args) = @_;
+    foreach (@args) {
+        unless (m/(.*?)=(.*)/) {
+            help(),exit 1 if m/^help$/;
+            ++$Verbose if m/^verb/;
+            next;
+        }
+        my($name, $value) = ($1, $2);
+        if ($value =~ m/^~(\w+)?/) { # tilde with optional username
+            $value =~ s [^~(\w*)]
+                [$1 ?
+                 ((getpwnam($1))[7] || "~$1") :
+                 (getpwuid($>))[7]
+                 ]ex;
+        }
+
+        # Remember the original args passed it.  It will be useful later.
+        $self->{ARGS}{uc $name} = $self->{uc $name} = $value;
+    }
 
-    # --- Initialize PERL_LIB, INST_LIB, PERL_SRC
+    # catch old-style 'potential_libs' and inform user how to 'upgrade'
+    if (defined $self->{potential_libs}){
+        my($msg)="'potential_libs' => '$self->{potential_libs}' should be";
+        if ($self->{potential_libs}){
+            print STDOUT "$msg changed to:\n\t'LIBS' => ['$self->{potential_libs}']\n";
+        } else {
+            print STDOUT "$msg deleted.\n";
+        }
+        $self->{LIBS} = [$self->{potential_libs}];
+        delete $self->{potential_libs};
+    }
+    # catch old-style 'ARMAYBE' and inform user how to 'upgrade'
+    if (defined $self->{ARMAYBE}){
+        my($armaybe) = $self->{ARMAYBE};
+        print STDOUT "ARMAYBE => '$armaybe' should be changed to:\n",
+                        "\t'dynamic_lib' => {ARMAYBE => '$armaybe'}\n";
+        my(%dl) = %{$self->{dynamic_lib} || {}};
+        $self->{dynamic_lib} = { %dl, ARMAYBE => $armaybe};
+        delete $self->{ARMAYBE};
+    }
+    if (defined $self->{LDTARGET}){
+        print STDOUT "LDTARGET should be changed to LDFROM\n";
+        $self->{LDFROM} = $self->{LDTARGET};
+        delete $self->{LDTARGET};
+    }
+    # Turn a DIR argument on the command line into an array
+    if (defined $self->{DIR} && ref \$self->{DIR} eq 'SCALAR') {
+        # So they can choose from the command line, which extensions they want
+        # the grep enables them to have some colons too much in case they
+        # have to build a list with the shell
+        $self->{DIR} = [grep $_, split ":", $self->{DIR}];
+    }
+    # Turn a INCLUDE_EXT argument on the command line into an array
+    if (defined $self->{INCLUDE_EXT} && ref \$self->{INCLUDE_EXT} eq 'SCALAR') {
+        $self->{INCLUDE_EXT} = [grep $_, split '\s+', $self->{INCLUDE_EXT}];
+    }
+    # Turn a EXCLUDE_EXT argument on the command line into an array
+    if (defined $self->{EXCLUDE_EXT} && ref \$self->{EXCLUDE_EXT} eq 'SCALAR') {
+        $self->{EXCLUDE_EXT} = [grep $_, split '\s+', $self->{EXCLUDE_EXT}];
+    }
 
-    # *Real* information: where did we get these two from? ...
-    $inc_config_dir = dirname($INC{'Config.pm'});
-    $inc_carp_dir   = dirname($INC{'Carp.pm'});
+    foreach my $mmkey (sort keys %$self){
+        next if $mmkey eq 'ARGS';
+        print STDOUT "  $mmkey => ", neatvalue($self->{$mmkey}), "\n" if $Verbose;
+        print STDOUT "'$mmkey' is not a known MakeMaker parameter name.\n"
+            unless exists $Recognized_Att_Keys{$mmkey};
+    }
+    $| = 1 if $Verbose;
+}
 
-    # Typically PERL_* and INST_* will be identical but that need
-    # not be the case (e.g., installing into project libraries etc).
+sub check_hints {
+    my($self) = @_;
+    # We allow extension-specific hints files.
 
-    # Perl Macro:    With source    No source
-    # PERL_LIB       ../../lib      /usr/local/lib/perl5
-    # PERL_ARCHLIB   ../../lib      /usr/local/lib/perl5/sun4-sunos
-    # PERL_SRC       ../..          (undefined)
+    require File::Spec;
+    my $curdir = File::Spec->curdir;
 
-    # INST Macro:    Locally        Publically
-    # INST_LIB       ../../lib      /usr/local/lib/perl5
-    # INST_ARCHLIB   ../../lib      /usr/local/lib/perl5/sun4-sunos
+    my $hint_dir = File::Spec->catdir($curdir, "hints");
+    return unless -d $hint_dir;
 
-    # This code will need to be reworked to deal with having no perl
-    # source.  PERL_LIB should become the primary focus.
+    # First we look for the best hintsfile we have
+    my($hint)="${^O}_$Config{osvers}";
+    $hint =~ s/\./_/g;
+    $hint =~ s/_$//;
+    return unless $hint;
 
-    unless ($att{PERL_SRC}){
-       foreach(qw(../.. ../../.. ../../../..)){
-           ($att{PERL_SRC}=$_, last) if -f "$_/config.sh";
-       }
-    }
-    unless ($att{PERL_SRC}){
-       warn "Unable to locate perl source.\n";
-       # we should also consider $ENV{PERL5LIB} here
-       $att{PERL_LIB}     = $Config{'privlib'} unless $att{PERL_LIB};
-       $att{PERL_ARCHLIB} = $Config{'archlib'} unless $att{PERL_ARCHLIB};
-       $att{PERL_INC}     = "$att{PERL_ARCHLIB}/CORE"; # wild guess for now
-       die "Try setting PERL_SRC in Makefile.PL or on command line.\n"
-               unless (-f "$att{PERL_INC}/perl.h");
-    } else {
-       $att{PERL_LIB}     = "$att{PERL_SRC}/lib" unless $att{PERL_LIB};
-       $att{PERL_ARCHLIB} = $att{PERL_LIB};
-       $att{PERL_INC}     = $att{PERL_SRC};
+    # Also try without trailing minor version numbers.
+    while (1) {
+        last if -f File::Spec->catfile($hint_dir, "$hint.pl");  # found
+    } continue {
+        last unless $hint =~ s/_[^_]*$//; # nothing to cut off
     }
+    my $hint_file = File::Spec->catfile($hint_dir, "$hint.pl");
 
-    # INST_LIB typically pre-set if building an extension after
-    # perl has been built and installed. Setting INST_LIB allows
-    # You to build directly into privlib and avoid installperl.
-    $att{INST_LIB} = $att{PERL_LIB} unless $att{INST_LIB};
-
-    # Try to work out what INST_ARCHLIB should be if not set:
-    unless ($att{INST_ARCHLIB}){
-       my(%archmap) = (
-           $att{PERL_LIB}      => $att{PERL_ARCHLIB},
-           $Config{'privlib'}  => $Config{'archlib'},
-           $Config{'installprivlib'}   => $Config{'installarchlib'},
-           $inc_carp_dir       => $inc_config_dir,
-       );
-       $att{INST_ARCHLIB} = $archmap{$att{INST_LIB}};
-       die "Unable to determine INST_ARCHLIB. Please define it explicitly.\n"
-           unless $att{INST_ARCHLIB};
-    }
+    return unless -f $hint_file;    # really there
+
+    _run_hintfile($self, $hint_file);
+}
 
-    # make a few simple checks
-    die "PERL_LIB ($att{PERL_LIB}) is not a perl library directory"
-       unless (-f "$att{PERL_LIB}/Exporter.pm");
-
-    # --- Initialize Module Name and Paths
-
-    # NAME    = The perl module name for this extension (eg DBD::Oracle).
-    # FULLEXT = Pathname for extension directory (eg DBD/Oracle).
-    # BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT.
-    # ROOTEXT = Directory part of FULLEXT with leading /.
-    unless($att{NAME}){ # we have to guess our name
-       my($name) = $pwd;
-       if ($Is_VMS) {
-         $name =~ s:.*?([^.\]]+)\]:$1: unless ($name =~ s:.*[.\[]ext\.::);
-         ($att{NAME}=$name) =~ s#[.\]]#::#g;
-       } else {
-         $name =~ s:.*/:: unless ($name =~ s:^.*/ext/::);
-         ($att{NAME} =$name) =~ s#/#::#g;
-       }
+sub _run_hintfile {
+    no strict 'vars';
+    local($self) = shift;       # make $self available to the hint file.
+    my($hint_file) = shift;
+
+    local($@, $!);
+    print STDERR "Processing hints file $hint_file\n";
+
+    # Just in case the ./ isn't on the hint file, which File::Spec can
+    # often strip off, we bung the curdir into @INC
+    local @INC = (File::Spec->curdir, @INC);
+    my $ret = do $hint_file;
+    if( !defined $ret ) {
+        my $error = $@ || $!;
+        print STDERR $error;
     }
-    ($att{FULLEXT} =$att{NAME}) =~ s#::#/#g ;          #eg. BSD/Foo/Socket
-    ($att{BASEEXT} =$att{NAME}) =~ s#.*::##;           #eg. Socket
-    ($att{ROOTEXT} =$att{FULLEXT}) =~ s#/?\Q$att{BASEEXT}\E$## ; # eg. /BSD/Foo
-    $att{ROOTEXT} = "/$att{ROOTEXT}" if $att{ROOTEXT};
-    $att{ROOTEXT} = "" if $Is_VMS;
+}
 
-    ($att{DISTNAME}=$att{NAME}) =~ s#(::)#-#g;
-    $att{VERSION} = "0.1" unless $att{VERSION};
+sub mv_all_methods {
+    my($from,$to) = @_;
+    no strict 'refs';
+    my($symtab) = \%{"${from}::"};
 
+    # Here you see the *current* list of methods that are overridable
+    # from Makefile.PL via MY:: subroutines. As of VERSION 5.07 I'm
+    # still trying to reduce the list to some reasonable minimum --
+    # because I want to make it easier for the user. A.K.
 
-    # --- Initialize Perl Binary Locations
+    local $SIG{__WARN__} = sub { 
+        # can't use 'no warnings redefined', 5.6 only
+        warn @_ unless $_[0] =~ /^Subroutine .* redefined/ 
+    };
+    foreach my $method (@Overridable) {
 
-    # Find Perl 5. The only contract here is that both 'PERL' and 'FULLPERL'
-    # will be working versions of perl 5.
-    $att{'PERL'} = MY->find_perl(5.0, [ qw(perl5 perl miniperl) ],
-           [ $att{PERL_SRC}, split(":", $ENV{PATH}), $Config{'bin'} ], 0 )
-       unless ($att{'PERL'} && -x $att{'PERL'});
+        # We cannot say "next" here. Nick might call MY->makeaperl
+        # which isn't defined right now
 
-    # Define 'FULLPERL' to be a non-miniperl (used in test: target)
-    ($att{'FULLPERL'} = $att{'PERL'}) =~ s/miniperl/perl/
-       unless ($att{'FULLPERL'} && -x $att{'FULLPERL'});
+        # Above statement was written at 4.23 time when Tk-b8 was
+        # around. As Tk-b9 only builds with 5.002something and MM 5 is
+        # standard, we try to enable the next line again. It was
+        # commented out until MM 5.23
 
-    if ($Is_VMS) {
-       ($att{'PERL'} = 'MCR ' . vmsify($att{'PERL'})) =~ s:.*/::;
-       ($att{'FULLPERL'} = 'MCR ' . vmsify($att{'FULLPERL'})) =~ s:.*/::;
-    }
+        next unless defined &{"${from}::$method"};
 
-    # --- Initialize File and Directory Lists (.xs .pm etc)
+        *{"${to}::$method"} = \&{"${from}::$method"};
 
-    {
-       my($name, %dir, %xs, %pm, %c, %h, %ignore);
-       $ignore{'test.pl'} = 1;
-       $ignore{'makefile.pl'} = 1 if $Is_VMS;
-       foreach $name (lsdir(".")){
-           next if ($name =~ /^\./ or $ignore{$name});
-           if (-d $name){
-               $dir{$name} = $name if (-f "$name/Makefile.PL");
-           }elsif ($name =~ /\.xs$/){
-               my($c); ($c = $name) =~ s/\.xs$/.c/;
-               $xs{$name} = $c;
-               $c{$c} = 1;
-           }elsif ($name =~ /\.c$/){
-               $c{$name} = 1;
-           }elsif ($name =~ /\.h$/){
-               $h{$name} = 1;
-           }elsif ($name =~ /\.p[ml]$/){
-               $pm{$name} = "\$(INST_LIBDIR)/$name";
-           }
-       }
-
-       # If we have a ./lib dir that does NOT contain a Makefile.PL
-       # then add in any .pm and .pl files in that directory.
-       # This makes it easy and tidy to ship a number of perl files.
-       if (-d "lib" and !$dir{'lib'}){
-           foreach $name (lsdir("lib")){
-               next unless ($name =~ /\.p[ml]$/);
-               $pm{"lib/$name"} = "\$(INST_LIBDIR)/$name";
-           }
-       }
-
-       $att{DIR} = [sort keys %dir] unless $att{DIRS};
-       $att{XS}  = \%xs             unless $att{XS};
-       $att{PM}  = \%pm             unless $att{PM};
-       $att{C}   = [sort keys %c]   unless $att{C};
-       $att{H}   = [sort keys %h]   unless $att{H};
+        # delete would do, if we were sure, nobody ever called
+        # MY->makeaperl directly
+
+        # delete $symtab->{$method};
+
+        # If we delete a method, then it will be undefined and cannot
+        # be called.  But as long as we have Makefile.PLs that rely on
+        # %MY:: being intact, we have to fill the hole with an
+        # inheriting method:
+
+        eval "package MY; sub $method { shift->SUPER::$method(\@_); }";
     }
 
-    # --- Initialize Other Attributes
+    # We have to clean out %INC also, because the current directory is
+    # changed frequently and Graham Barr prefers to get his version
+    # out of a History.pl file which is "required" so woudn't get
+    # loaded again in another extension requiring a History.pl
+
+    # With perl5.002_01 the deletion of entries in %INC caused Tk-b11
+    # to core dump in the middle of a require statement. The required
+    # file was Tk/MMutil.pm.  The consequence is, we have to be
+    # extremely careful when we try to give perl a reason to reload a
+    # library with same name.  The workaround prefers to drop nothing
+    # from %INC and teach the writers not to use such libraries.
+
+#    my $inc;
+#    foreach $inc (keys %INC) {
+#       #warn "***$inc*** deleted";
+#       delete $INC{$inc};
+#    }
+}
 
-    for $key (keys(%Recognized_Att_Keys), keys(%Other_Att_Keys)){
-       # avoid warnings for uninitialized vars
-       next if exists $att{$key};
-       $att{$key} = "";
+sub skipcheck {
+    my($self) = shift;
+    my($section) = @_;
+    if ($section eq 'dynamic') {
+        print STDOUT "Warning (non-fatal): Target 'dynamic' depends on targets ",
+        "in skipped section 'dynamic_bs'\n"
+            if $self->{SKIPHASH}{dynamic_bs} && $Verbose;
+        print STDOUT "Warning (non-fatal): Target 'dynamic' depends on targets ",
+        "in skipped section 'dynamic_lib'\n"
+            if $self->{SKIPHASH}{dynamic_lib} && $Verbose;
     }
+    if ($section eq 'dynamic_lib') {
+        print STDOUT "Warning (non-fatal): Target '\$(INST_DYNAMIC)' depends on ",
+        "targets in skipped section 'dynamic_bs'\n"
+            if $self->{SKIPHASH}{dynamic_bs} && $Verbose;
+    }
+    if ($section eq 'static') {
+        print STDOUT "Warning (non-fatal): Target 'static' depends on targets ",
+        "in skipped section 'static_lib'\n"
+            if $self->{SKIPHASH}{static_lib} && $Verbose;
+    }
+    return 'skipped' if $self->{SKIPHASH}{$section};
+    return '';
+}
 
-    # Compute EXTRALIBS, BSLOADLIBS and LDLOADLIBS from $att{'LIBS'}
-    # Lets look at $att{LIBS} carefully: It may be an anon array, a string or
-    # undefined. In any case we turn it into an anon array:
-    $att{LIBS}=[] unless $att{LIBS};
-    $att{LIBS}=[$att{LIBS}] if ref \$att{LIBS} eq SCALAR;
-    foreach ( @{$att{'LIBS'}} ){
-       s/^\s*(.*\S)\s*$/$1/; # remove leading and trailing whitespace
-       my(@libs) = MY->extliblist($_);
-       if ($libs[0] or $libs[1] or $libs[2]){
-           @att{EXTRALIBS, BSLOADLIBS, LDLOADLIBS} = @libs;
-           last;
-       }
+sub flush {
+    my $self = shift;
+    my($chunk);
+    local *FH;
+    print STDOUT "Writing $self->{MAKEFILE} for $self->{NAME}\n";
+
+    unlink($self->{MAKEFILE}, "MakeMaker.tmp", $Is_VMS ? 'Descrip.MMS' : '');
+    open(FH,">MakeMaker.tmp") or die "Unable to open MakeMaker.tmp: $!";
+
+    for $chunk (@{$self->{RESULT}}) {
+        print FH "$chunk\n";
     }
 
-    warn "CONFIG must be an array ref\n"
-       if ($att{CONFIG} and ref $att{CONFIG} ne 'ARRAY');
-    $att{CONFIG} = [] unless (ref $att{CONFIG});
-    push(@{$att{CONFIG}},
-       qw( cc libc ldflags lddlflags ccdlflags cccdlflags
-           ranlib so dlext dlsrc installprivlib installarchlib
-       ));
-    push(@{$att{CONFIG}}, 'shellflags') if $Config{'shellflags'};
-
-    if ($Is_VMS) {
-      # This will not make other Makefile.PLs portable. Any Makefile.PL
-      # which says OBJECT => "foo.o bar.o" will fail on VMS. It might
-      # be better to fix the c_o section to produce .o files.
-      $att{OBJECT} = '$(BASEEXT).obj' unless $att{OBJECT};
-      $att{OBJECT} =~ s/[^,\s]\s+/, /g;
-      $att{OBJECT} =~ s/\n+/, /g;
-    } else {
-      $att{OBJECT} = '$(BASEEXT).o' unless $att{OBJECT};
-      $att{OBJECT} =~ s/\n+/ \\\n\t/g;
+    close FH;
+    my($finalname) = $self->{MAKEFILE};
+    _rename("MakeMaker.tmp", $finalname) or
+      warn "rename MakeMaker.tmp => $finalname: $!";
+    chmod 0644, $finalname unless $Is_VMS;
+
+    my %keep = map { ($_ => 1) } qw(NEEDS_LINKING HAS_LINK_CODE);
+
+    if ($self->{PARENT} && !$self->{_KEEP_AFTER_FLUSH}) {
+        foreach (keys %$self) { # safe memory
+            delete $self->{$_} unless $keep{$_};
+        }
     }
-    $att{BOOTDEP}  = (-f "$att{BASEEXT}_BS") ? "$att{BASEEXT}_BS" : "";
-    $att{LD}       = ($Config{'ld'} || 'ld') unless $att{LD};
-    $att{LDTARGET} = '$(OBJECT)' unless $att{LDTARGET};
-    $att{LINKTYPE} = ($Config{'usedl'}) ? 'dynamic' : 'static'
-       unless $att{LINKTYPE};
 
+    system("$Config::Config{eunicefix} $finalname") unless $Config::Config{eunicefix} eq ":";
 }
 
 
-sub lsdir{
-    local(*DIR, @ls);
-    opendir(DIR, $_[0] || ".") or die "opendir: $!";
-    @ls = readdir(DIR);
-    closedir(DIR);
-    @ls;
+# This is a rename for OS's where the target must be unlinked first.
+sub _rename {
+    my($src, $dest) = @_;
+    chmod 0666, $dest;
+    unlink $dest;
+    return rename $src, $dest;
 }
 
-
-sub find_perl{
-    my($self, $ver, $names, $dirs, $trace) = @_;
-    my($name, $dir);
-    print "Looking for perl $ver by these names: @$names, in these dirs: @$dirs\n"
-       if ($trace);
-    foreach $dir (@$dirs){
-       foreach $name (@$names){
-           print "checking $dir/$name\n" if ($trace >= 2);
-           if ($Is_VMS) {
-             $name .= ".exe" unless -x "$dir/$name";
-           }
-           next unless -x "$dir/$name";
-           print "executing $dir/$name\n" if ($trace);
-           my($out);
-           if ($Is_VMS) {
-             my($vmscmd) = 'MCR ' . vmsify("$dir/$name");
-             $out = `$vmscmd -e "require $ver; print ""VER_OK\n"""`;
-           } else {
-             $out = `$dir/$name -e 'require $ver; print "VER_OK\n" ' 2>&1`;
-           }
-           return "$dir/$name" if $out =~ /VER_OK/;
-       }
-    }
-    warn "Unable to find a perl $ver (by these names: @$names, in these dirs: @$dirs)\n";
-    0; # false and not empty
+# This is an unlink for OS's where the target must be writable first.
+sub _unlink {
+    my @files = @_;
+    chmod 0666, @files;
+    return unlink @files;
 }
 
 
-sub post_initialize{
-    "";
+# The following mkbootstrap() is only for installations that are calling
+# the pre-4.1 mkbootstrap() from their old Makefiles. This MakeMaker
+# writes Makefiles, that use ExtUtils::Mkbootstrap directly.
+sub mkbootstrap {
+    die <<END;
+!!! Your Makefile has been built such a long time ago, !!!
+!!! that is unlikely to work with current MakeMaker.   !!!
+!!! Please rebuild your Makefile                       !!!
+END
 }
-
-sub constants {
-    my(@m);
 
-    push @m, "
-NAME = $att{NAME}
-DISTNAME = $att{DISTNAME}
-VERSION = $att{VERSION}
-
-# In which library should we install this extension?
-# This is typically the same as PERL_LIB.
-# (also see INST_LIBDIR and relationship to ROOTEXT)
-INST_LIB = $att{INST_LIB}
-INST_ARCHLIB = $att{INST_ARCHLIB}
-
-# Perl library to use when building the extension
-PERL_LIB = $att{PERL_LIB}
-PERL_ARCHLIB = $att{PERL_ARCHLIB}
-
-# Where is the perl source code located? (Eventually we should
-# be able to build extensions without requiring the perl source
-# but that's a way off yet).
-PERL_SRC = $att{PERL_SRC}
-# Perl header files (will eventually be under PERL_LIB)
-PERL_INC = $att{PERL_INC}
-# Perl binaries
-PERL = $att{'PERL'}
-FULLPERL = $att{'FULLPERL'}
-
-# FULLEXT = Pathname for extension directory (eg DBD/Oracle).
-# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT.
-# ROOTEXT = Directory part of FULLEXT with leading slash (eg /DBD)
-FULLEXT = $att{FULLEXT}
-BASEEXT = $att{BASEEXT}
-ROOTEXT = $att{ROOTEXT}
-
-# These will be removed later. Use PERL_SRC and BASEEXT instead.
-TOP = \$(PERL_SRC)
-EXT = CHANGE_EXT_TO_BASEEXT
-
-INC = $att{INC}
-DEFINE = $att{DEFINE}
-OBJECT = $att{OBJECT}
-LDTARGET = $att{LDTARGET}
-LINKTYPE = $att{LINKTYPE}
-
-# Source code:
-XS= ".join(" \\\n\t", sort keys %{$att{XS}})."
-C = ".join(" \\\n\t", @{$att{C}})."
-H = ".join(" \\\n\t", @{$att{H}})."
-
-.SUFFIXES: .xs
-
-.PRECIOUS: Makefile
-
-.PHONY: all config static dynamic test 
-
-# This extension may link to it's own library (see SDBM_File)
-MYEXTLIB = $att{MYEXTLIB}
-
-# Where is the Config.pm that we are using/depend on
-CONFIGDEP = \$(PERL_ARCHLIB)/Config.pm
-";
-
-    push @m, '
-# Where to put things:
-INST_LIBDIR     = $(INST_LIB)$(ROOTEXT)
-INST_ARCHLIBDIR = $(INST_ARCHLIB)$(ROOTEXT)
-
-INST_AUTODIR     = $(INST_LIB)/auto/$(FULLEXT)
-INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT)
-
-INST_BOOT    = $(INST_ARCHAUTODIR)/$(BASEEXT).bs
-INST_DYNAMIC = $(INST_ARCHAUTODIR)/$(BASEEXT).$(DLEXT)
-INST_STATIC  = $(BASEEXT).a
-INST_PM = '.join(" \\\n\t", sort values %{$att{PM}}).'
-';
-
-    join('',@m);
+# Ditto for mksymlists() as of MakeMaker 5.17
+sub mksymlists {
+    die <<END;
+!!! Your Makefile has been built such a long time ago, !!!
+!!! that is unlikely to work with current MakeMaker.   !!!
+!!! Please rebuild your Makefile                       !!!
+END
 }
 
+sub neatvalue {
+    my($v) = @_;
+    return "undef" unless defined $v;
+    my($t) = ref $v;
+    return "q[$v]" unless $t;
+    if ($t eq 'ARRAY') {
+        my(@m, @neat);
+        push @m, "[";
+        foreach my $elem (@$v) {
+            push @neat, "q[$elem]";
+        }
+        push @m, join ", ", @neat;
+        push @m, "]";
+        return join "", @m;
+    }
+    return "$v" unless $t eq 'HASH';
+    my(@m, $key, $val);
+    while (($key,$val) = each %$v){
+        last unless defined $key; # cautious programming in case (undef,undef) is true
+        push(@m,"$key=>".neatvalue($val)) ;
+    }
+    return "{ ".join(', ',@m)." }";
+}
 
-sub const_cccmd{
-    # This is implemented in the
-    # same manner as extliblist, e.g., do both and compare results during
-    # the transition period.
-  my($cc,$ccflags,$optimize,$large,$split)=@Config{qw(cc ccflags optimize large split)};
-  my($prog, $old);
-
-  chop($old = `cd $att{PERL_SRC}; sh $Config{'shellflags'} ./cflags $att{BASEEXT}.c`)
-       if $att{PERL_SRC};
-
-  # Why is this written this way ?
-  if ($prog = $Config{"$att{BASEEXT}_cflags"}) {
-    my(@o)=`cc=\"$cc\"
-      ccflags=\"$ccflags\"
-      optimize=\"$optimize\"
-      large=\"$large\"
-      split=\"$split\"
-      eval '$prog'
-      echo cc=\$cc
-      echo ccflags=\$ccflags
-      echo optimize=\$optimize
-      echo large=\$large
-      echo split=\$split
-      `;
-    my(%cflags);
-    foreach $line (@o){
-      chomp $line;
-      if ($line =~ /(.*?)\s*=\s*(.*)\s*$/){
-       $cflags{$1} = $2;
-       print STDERR "  $1 = $2" if $Verbose;
-      }
+sub selfdocument {
+    my($self) = @_;
+    my(@m);
+    if ($Verbose){
+        push @m, "\n# Full list of MakeMaker attribute values:";
+        foreach my $key (sort keys %$self){
+            next if $key eq 'RESULT' || $key =~ /^[A-Z][a-z]/;
+            my($v) = neatvalue($self->{$key});
+            $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
+            $v =~ tr/\n/ /s;
+            push @m, "# $key => $v";
+        }
     }
-    ($cc,$ccflags,$optimize,$large,$split)=@cflags{qw(cc ccflags optimize large split)};
-  }
-
-  my($new) = "$cc -c $ccflags $optimize  $large $split";
-  if (defined($old) and $new ne $old) {
-    warn "Warning (non-fatal): cflags evaluation in MakeMaker differs from shell output\n"
-      ."   package: $att{NAME}\n"
-      ."   old: $old\n"
-      ."   new: $new\n"
-      ."   Using 'old' set.\n"
-      ."Please notify perl5-porters\@isu.edu\n";
-  }
-  my($cccmd)=($old) ? $old : $new;
-  "CCCMD = $cccmd\n";
+    join "\n", @m;
 }
 
+1;
 
-# --- Constants Sections ---
+__END__
 
-sub const_config{
-    my(@m,$m);
-    push(@m,"\n# These definitions are from config.sh (via $INC{'Config.pm'})\n");
-    my(%once_only);
-    foreach $m (@{$att{'CONFIG'}}){
-       next if $once_only{$m};
-       warn "CONFIG key '$m' does not exist in Config.pm\n"
-               unless exists $Config{$m};
-       push @m, "\U$m\E = $Config{$m}\n";
-       $once_only{$m} = 1;
-    }
-    join('', @m);
-}
+=head1 NAME
 
+ExtUtils::MakeMaker - Create a module Makefile
 
-sub const_loadlibs{
-    "
-# $att{NAME} might depend on some other libraries:
-# (These comments may need revising:)
-#
-# Dependent libraries can be linked in one of three ways:
-#
-#  1.  (For static extensions) by the ld command when the perl binary
-#      is linked with the extension library. See EXTRALIBS below.
-#
-#  2.  (For dynamic extensions) by the ld command when the shared
-#      object is built/linked. See LDLOADLIBS below.
-#
-#  3.  (For dynamic extensions) by the DynaLoader when the shared
-#      object is loaded. See BSLOADLIBS below.
-#
-# EXTRALIBS =  List of libraries that need to be linked with when
-#              linking a perl binary which includes this extension
-#              Only those libraries that actually exist are included.
-#              These are written to a file and used when linking perl.
-#
-# LDLOADLIBS = List of those libraries which can or must be linked into
-#              the shared library when created using ld. These may be
-#              static or dynamic libraries.
-#
-# BSLOADLIBS = List of those libraries that are needed but can be
-#              linked in dynamically at run time on this platform.
-#              SunOS/Solaris does not need this because ld records
-#              the information (from LDLOADLIBS) into the object file.
-#              This list is used to create a .bs (bootstrap) file.
-#              The bootstrap file is installed only if it's not empty.
-#
-EXTRALIBS  = $att{'EXTRALIBS'}
-LDLOADLIBS = $att{'LDLOADLIBS'}
-BSLOADLIBS = $att{'BSLOADLIBS'}
-";
-}
+=head1 SYNOPSIS
 
+  use ExtUtils::MakeMaker;
 
-# --- Tool Sections ---
+  WriteMakefile( ATTRIBUTE => VALUE [, ...] );
 
-sub tool_autosplit{
-    my($self, %attribs) = @_;
-    my($asl) = "";
-    $asl = "\$AutoSplit::Maxlen=$attribs{MAXLEN};" if $attribs{MAXLEN};
-    q{
-AUTOSPLITLIB = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -e 'use AutoSplit; chdir("$(INST_LIB)/..") or die $$!; $$AutoSplit::Maxlen=}.$asl.q{; autosplit_lib_modules(@ARGV) ;'
+=head1 DESCRIPTION
 
-# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
-AUTOSPLITFILE = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -e 'use AutoSplit;}.$asl.q{ AutoSplit::autosplit_file($$ARGV[0], $$ARGV[1], 0, 1, 1) ;'
-};
-}
+This utility is designed to write a Makefile for an extension module
+from a Makefile.PL. It is based on the Makefile.SH model provided by
+Andy Dougherty and the perl5-porters.
 
+It splits the task of generating the Makefile into several subroutines
+that can be individually overridden.  Each subroutine returns the text
+it wishes to have written to the Makefile.
 
-sub tool_xsubpp{
-    my($xsdir)  = '$(PERL_LIB)/ExtUtils';
-    # drop back to old location if xsubpp is not in new location yet
-    $xsdir = '$(PERL_SRC)/ext' unless (-f "$att{PERL_LIB}/ExtUtils/xsubpp");
-    my(@tmdeps) = ('$(XSUBPPDIR)/typemap');
-    push(@tmdeps, "typemap") if -f "typemap";
-    my(@tmargs) = map("-typemap $_", @tmdeps);
-    "
-XSUBPPDIR = $xsdir
-XSUBPP = \$(XSUBPPDIR)/xsubpp
-XSUBPPDEPS = @tmdeps
-XSUBPPARGS = @tmargs
-";
-};
-
-
-sub tools_other{
-    "
-SHELL = /bin/sh
-LD = $att{LD}
-".q{
-# The following is a portable way to say mkdir -p
-MKPATH = $(PERL) -wle '$$"="/"; foreach $$p (@ARGV){ my(@p); foreach(split(/\//,$$p)){ push(@p,$$_); next if -d "@p/"; print "mkdir @p"; mkdir("@p",0777)||die $$! }} exit 0;'
-};
-}
+MakeMaker is object oriented. Each directory below the current
+directory that contains a Makefile.PL is treated as a separate
+object. This makes it possible to write an unlimited number of
+Makefiles with a single invocation of WriteMakefile().
 
+=head2 How To Write A Makefile.PL
 
-sub post_constants{
-    "";
-}
+See ExtUtils::MakeMaker::Tutorial.
 
+The long answer is the rest of the manpage :-)
 
-# --- Translation Sections ---
+=head2 Default Makefile Behaviour
 
-sub c_o {
-    '
-.c.o:
-       $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $(INC) $*.c
-';
-}
+The generated Makefile enables the user of the extension to invoke
 
-sub xs_c {
-    '
-.xs.c:
-       $(PERL) $(XSUBPP) $(XSUBPPARGS) $*.xs >xstmp.c && mv xstmp.c $@
-';
-}
+  perl Makefile.PL # optionally "perl Makefile.PL verbose"
+  make
+  make test        # optionally set TEST_VERBOSE=1
+  make install     # See below
 
-sub xs_o {     # many makes are too dumb to use xs_c then c_o
-    '
-.xs.o:
-       $(PERL) $(XSUBPP) $(XSUBPPARGS) $*.xs >xstmp.c && mv xstmp.c $*.c
-       $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $(INC) $*.c
-';
-}
+The Makefile to be produced may be altered by adding arguments of the
+form C<KEY=VALUE>. E.g.
 
+  perl Makefile.PL PREFIX=/tmp/myperl5
 
-# --- Target Sections ---
+Other interesting targets in the generated Makefile are
 
-sub top_targets{
-    '
-all :: config linkext $(INST_PM)
+  make config     # to check if the Makefile is up-to-date
+  make clean      # delete local temp files (Makefile gets renamed)
+  make realclean  # delete derived files (including ./blib)
+  make ci         # check in all the files in the MANIFEST file
+  make dist       # see below the Distribution Support section
 
-config :: Makefile
-       @$(MKPATH) $(INST_LIBDIR)  $(INST_ARCHLIBDIR)
-       @$(MKPATH) $(INST_AUTODIR) $(INST_ARCHAUTODIR)
+=head2 make test
 
-install :: all
-';
-}
+MakeMaker checks for the existence of a file named F<test.pl> in the
+current directory and if it exists it execute the script with the
+proper set of perl C<-I> options.
 
-sub linkext {
-    my($self, %attribs) = @_;
-    # LINKTYPE => static or dynamic
-    my($linktype) = $attribs{LINKTYPE} || '$(LINKTYPE)';
-    "
-linkext :: $linktype
-";
-}
+MakeMaker also checks for any files matching glob("t/*.t"). It will
+execute all matching files in alphabetical order via the
+L<Test::Harness> module with the C<-I> switches set correctly.
 
+If you'd like to see the raw output of your tests, set the
+C<TEST_VERBOSE> variable to true.
 
-# --- Dynamic Loading Sections ---
+  make test TEST_VERBOSE=1
 
-sub dynamic {
-    '
-# $(INST_PM) has been moved to the all: target.
-# It remains here for awhile to allow for old usage: "make dynamic"
-dynamic :: $(INST_DYNAMIC) $(INST_BOOT) $(INST_PM)
-';
-}
+=head2 make testdb
 
-sub dynamic_bs {
-    my($self, %attribs) = @_;
-    '
-BOOTSTRAP = '."$att{BASEEXT}.bs".'
-
-# As MakeMaker mkbootstrap might not write a file (if none is required)
-# we use touch to prevent make continually trying to remake it.
-# The DynaLoader only reads a non-empty file.
-$(BOOTSTRAP): '.$att{BOOTDEP}.' $(CONFIGDEP)
-       $(PERL) -I$(PERL_LIB) -e \'use ExtUtils::MakeMaker; &mkbootstrap("$(BSLOADLIBS)");\' \
-               INST_LIB=$(INST_LIB) INST_ARCHLIB=$(INST_ARCHLIB) PERL_SRC=$(PERL_SRC) NAME=$(NAME)
-       @touch $(BOOTSTRAP)
-
-$(INST_BOOT): $(BOOTSTRAP)
-       @rm -f $(INST_BOOT)
-       cp $(BOOTSTRAP) $(INST_BOOT)
-';
-}
+A useful variation of the above is the target C<testdb>. It runs the
+test under the Perl debugger (see L<perldebug>). If the file
+F<test.pl> exists in the current directory, it is used for the test.
 
-sub dynamic_lib {
-    my($self, %attribs) = @_;
-    my($otherldflags) = $attribs{OTHERLDFLAGS} || "";
-    my($armaybe) = $attribs{ARMAYBE} || $att{ARMAYBE} || ":";
-    '
-ARMAYBE = '.$armaybe.'
-OTHERLDFLAGS = '.$otherldflags.'
-
-$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP)
-       @$(MKPATH) $(INST_AUTODIR)
-       $(ARMAYBE) cr $(BASEEXT).a $(OBJECT) 
-       $(LD) $(LDDLFLAGS) -o $@ $(LDTARGET) $(OTHERLDFLAGS) $(MYEXTLIB) $(LDLOADLIBS)
-';
-}
+If you want to debug some other testfile, set the C<TEST_FILE> variable
+thusly:
 
+  make testdb TEST_FILE=t/mytest.t
 
-# --- Static Loading Sections ---
+By default the debugger is called using C<-d> option to perl. If you
+want to specify some other option, set the C<TESTDB_SW> variable:
 
-sub static {
-    '
-# $(INST_PM) has been moved to the all: target.
-# It remains here for awhile to allow for old usage: "make static"
-static :: $(INST_STATIC) $(INST_PM) 
-';
-}
+  make testdb TESTDB_SW=-Dx
 
-sub static_lib{
-    my(@m);
-    push(@m, <<'END');
-$(INST_STATIC): $(OBJECT) $(MYEXTLIB)
-END
-    # If this extension has it's own library (eg SDBM_File)
-    # then copy that to $(INST_STATIC) and add $(OBJECT) into it.
-    push(@m, ' cp $(MYEXTLIB) $@'."\n") if $att{MYEXTLIB};
-
-    push(@m, <<'END');
-       ar cr $@ $(OBJECT) && $(RANLIB) $@
-       @: New mechanism - not yet used:
-       @echo $(EXTRALIBS) > $(INST_ARCHAUTODIR)/extralibs.ld
-       cp $@ $(INST_ARCHAUTODIR)/
-END
-    push(@m, <<'END') if $att{PERL_SRC};
-       @: Old mechanism - still needed:
-       @echo $(EXTRALIBS) >> $(PERL_SRC)/ext.libs
-END
-    join('', "\n",@m);
-}
+=head2 make install
 
+make alone puts all relevant files into directories that are named by
+the macros INST_LIB, INST_ARCHLIB, INST_SCRIPT, INST_MAN1DIR and
+INST_MAN3DIR.  All these default to something below ./blib if you are
+I<not> building below the perl source directory. If you I<are>
+building below the perl source, INST_LIB and INST_ARCHLIB default to
+../../lib, and INST_SCRIPT is not defined.
 
-sub installpm {
-    my($self, %attribs) = @_;
-    # By default .pm files are split into the architecture independent
-    # library. This is a good thing. If a specific module requires that
-    # it's .pm files are split into the architecture specific library
-    # then it should use: installpm => {SPLITLIB=>'$(INST_ARCHLIB)'}
-    # Note that installperl currently interferes with this (Config.pm)
-    # User can disable split by saying: installpm => {SPLITLIB=>''}
-    my($splitlib) = '$(INST_LIB)'; # NOT arch specific by default
-    $splitlib = $attribs{SPLITLIB} if exists $attribs{SPLITLIB};
-    my(@m, $dist);
-    foreach $dist (sort keys %{$att{PM}}){
-       my($inst) = $att{PM}->{$dist};
-       push(@m, "\n# installpm: $dist => $inst, splitlib=$splitlib\n");
-       push(@m, MY->installpm_x($dist, $inst, $splitlib));
-       push(@m, "\n");
-    }
-    join('', @m);
-}
+The I<install> target of the generated Makefile copies the files found
+below each of the INST_* directories to their INSTALL*
+counterparts. Which counterparts are chosen depends on the setting of
+INSTALLDIRS according to the following table:
 
-sub installpm_x { # called by installpm per file
-    my($self, $dist, $inst, $splitlib) = @_;
-    my($instdir) = $inst =~ m|(.*)/|;
-    my(@m);
-    push(@m,"
-$inst: $dist
-".'    @rm -f $@
-       @$(MKPATH) '.$instdir.'
-       cp $? $@
-');
-    push(@m, "\t\$(AUTOSPLITFILE) \$@ $splitlib/auto\n")
-       if ($splitlib and $inst =~ m/\.pm$/);
-    join('', @m);
-}
+                                 INSTALLDIRS set to
+                           perl        site          vendor
 
+                 PERLPREFIX      SITEPREFIX          VENDORPREFIX
+  INST_ARCHLIB   INSTALLARCHLIB  INSTALLSITEARCH     INSTALLVENDORARCH
+  INST_LIB       INSTALLPRIVLIB  INSTALLSITELIB      INSTALLVENDORLIB
+  INST_BIN       INSTALLBIN      INSTALLSITEBIN      INSTALLVENDORBIN
+  INST_SCRIPT    INSTALLSCRIPT   INSTALLSCRIPT       INSTALLSCRIPT
+  INST_MAN1DIR   INSTALLMAN1DIR  INSTALLSITEMAN1DIR  INSTALLVENDORMAN1DIR
+  INST_MAN3DIR   INSTALLMAN3DIR  INSTALLSITEMAN3DIR  INSTALLVENDORMAN3DIR
 
-# --- Sub-directory Sections ---
+The INSTALL... macros in turn default to their %Config
+($Config{installprivlib}, $Config{installarchlib}, etc.) counterparts.
 
-sub subdirs {
-    my(@m);
-    # This method provides a mechanism to automatically deal with
-    # subdirectories containing further Makefile.PL scripts.
-    # It calls the subdir_x() method for each subdirectory.
-    foreach(<*/Makefile.PL>){
-       s:/Makefile\.PL$:: ;
-       print "Including $_ subdirectory" if ($Verbose);
-       push(@m, MY->subdir_x($_));
-    }
-    if (@m){
-       unshift(@m, "
-# The default clean, realclean and test targets in this Makefile
-# have automatically been given entries for each subdir.
+You can check the values of these variables on your system with
 
-all :: subdirs
-");
-    } else {
-       push(@m, "\n# none")
-    }
-    join('',@m);
-}
+    perl '-V:install.*'
 
-sub runsubdirpl{       # Experimental! See subdir_x section
-    my($self,$subdir) = @_;
-    chdir($subdir) or die "chdir($subdir): $!";
-    require "Makefile.PL";
-}
+And to check the sequence in which the library directories are
+searched by perl, run
 
-sub subdir_x {
-    my($self, $subdir) = @_;
-    my(@m);
-    # The intention is that the calling Makefile.PL should define the
-    # $(SUBDIR_MAKEFILE_PL_ARGS) make macro to contain whatever
-    # information needs to be passed down to the other Makefile.PL scripts.
-    # If this does not suit your needs you'll need to write your own
-    # MY::subdir_x() method to override this one.
-    qq{
-config :: $subdir/Makefile
-       cd $subdir ; \$(MAKE) config LINKTYPE=\$(LINKTYPE)
-
-$subdir/Makefile: $subdir/Makefile.PL \$(CONFIGDEP)
-}.'    @echo "Rebuilding $@ ..."
-       $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) \\
-               -e "use ExtUtils::MakeMaker; MM->runsubdirpl(qw('.$subdir.'))" \\
-               $(SUBDIR_MAKEFILE_PL_ARGS)
-       @echo "Rebuild of $@ complete."
-'.qq{
-
-subdirs ::
-       cd $subdir ; \$(MAKE) all LINKTYPE=\$(LINKTYPE)
-
-};
-}
+    perl -le 'print join $/, @INC'
 
 
-# --- Cleanup and Distribution Sections ---
+=head2 PREFIX and LIB attribute
 
-sub clean {
-    my($self, %attribs) = @_;
-    my(@m);
-    push(@m, '
-# Delete temporary files but do not touch installed files. We don\'t delete
-# the Makefile here so a later make realclean still has a makefile to use.
-
-clean ::
-');
-    # clean subdirectories first
-    push(@m, map("\t-cd $_ && test -f Makefile && \$(MAKE) clean\n",@{$att{DIR}}));
-    push(@m, " rm -f *~ t/*~ *.o *.a mon.out core so_locations \$(BOOTSTRAP) \$(BASEEXT).bso\n");
-    my(@otherfiles);
-    # Automatically delete the .c files generated from *.xs files:
-    push(@otherfiles, values %{$att{XS}});
-    push(@otherfiles, $attribs{FILES}) if $attribs{FILES};
-    push(@m, " rm -rf @otherfiles\n") if @otherfiles;
-    push(@m, " $attribs{POSTOP}\n")   if $attribs{POSTOP};
-    join("", @m);
-}
+PREFIX and LIB can be used to set several INSTALL* attributes in one
+go. The quickest way to install a module in a non-standard place might
+be
 
-sub realclean {
-    my($self, %attribs) = @_;
-    my(@m);
-    push(@m,'
-# Delete temporary files (via clean) and also delete installed files
-realclean purge ::  clean
-');
-    # clean subdirectories first
-    push(@m, map("\t-cd $_ && test -f Makefile && \$(MAKE) realclean\n",@{$att{DIR}}));
-    push(@m, ' rm -f Makefile $(INST_DYNAMIC) $(INST_STATIC) $(INST_BOOT) $(INST_PM)'."\n");
-    push(@m, ' rm -rf $(INST_AUTODIR) $(INST_ARCHAUTODIR)'."\n");
-    my(@otherfiles);
-    push(@otherfiles, $attribs{FILES}) if $attribs{FILES};
-    push(@m, " rm -rf @otherfiles\n") if @otherfiles;
-    push(@m, " $attribs{POSTOP}\n")       if $attribs{POSTOP};
-    join("", @m);
-}
+    perl Makefile.PL PREFIX=~
 
+This will install all files in the module under your home directory,
+with man pages and libraries going into an appropriate place (usually
+~/man and ~/lib).
 
-sub distclean {
-    my($self, %attribs) = @_;
-    # VERSION should be sanitised before use as a file name
-    my($tarname)  = $attribs{TARNAME}  || '$(DISTNAME)-$(VERSION)';
-    my($tarflags) = $attribs{TARFLAGS} || 'cvf';
-    my($compress) = $attribs{COMPRESS} || 'compress'; # eg gzip
-    my($preop)    = $attribs{PREOP}  || '@:'; # e.g., update MANIFEST
-    my($postop)   = $attribs{POSTOP} || '@:';
-    my($mkfiles)  = join(' ', map("$_/Makefile", ".", @{$att{DIR}}));
-    "
-distclean:     clean
-       $preop
-       rm -f $mkfiles
-       cd ..; tar $tarflags $tarname.tar \$(BASEEXT)
-       cd ..; $compress $tarname.tar
-       $postop
-";
-}
+Another way to specify many INSTALL directories with a single
+parameter is LIB.
 
+    perl Makefile.PL LIB=~/lib
 
-# --- Test and Installation Sections ---
+This will install the module's architecture-independent files into
+~/lib, the architecture-dependent files into ~/lib/$archname.
 
-sub test {
-    my($self, %attribs) = @_;
-    my($tests) = $attribs{TESTS} || (-d "t" ? "t/*.t" : "");
-    my(@m);
-    push(@m,"
-test :: all
-");
-    push(@m, <<"END") if $tests;
-       \$(FULLPERL) -I\$(PERL_ARCHLIB) -I\$(PERL_LIB) -e 'use Test::Harness; runtests \@ARGV;' $tests
-END
-    push(@m, <<'END') if -f "test.pl";
-       $(FULLPERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) test.pl
-END
-    push(@m, map("\tcd $_ && test -f Makefile && \$(MAKE) test LINKTYPE=\$(LINKTYPE)\n",@{$att{DIR}}));
-    push(@m, "\t\@echo 'No tests defined for \$(NAME) extension.'\n") unless @m > 1;
-    join("", @m);
-}
+Note, that in both cases the tilde expansion is done by MakeMaker, not
+by perl by default, nor by make.
 
+Conflicts between parameters LIB, PREFIX and the various INSTALL*
+arguments are resolved so that:
 
-sub install {
-    '
-install :: all
-       # install is not defined. Makefile, by default, builds the extension
-       # directly into $(INST_LIB) so "installing" does not make much sense.
-       # If INST_LIB is in the perl source tree then installperl will install
-       # the extension when it installs perl.
-';
-}
+=over 4
 
+=item *
 
-sub force {
-    '# Phony target to force checking subdirectories.
-FORCE:
-';
-}
+setting LIB overrides any setting of INSTALLPRIVLIB, INSTALLARCHLIB,
+INSTALLSITELIB, INSTALLSITEARCH (and they are not affected by PREFIX);
 
+=item *
 
-sub perldepend {
-       my(@m);
-    push(@m,'
-PERL_HDRS = $(PERL_INC)/EXTERN.h $(PERL_INC)/INTERN.h \
-    $(PERL_INC)/XSUB.h $(PERL_INC)/av.h        $(PERL_INC)/cop.h \
-    $(PERL_INC)/cv.h   $(PERL_INC)/dosish.h    $(PERL_INC)/embed.h \
-    $(PERL_INC)/form.h $(PERL_INC)/gv.h        $(PERL_INC)/handy.h \
-    $(PERL_INC)/hv.h   $(PERL_INC)/keywords.h  $(PERL_INC)/mg.h \
-    $(PERL_INC)/op.h   $(PERL_INC)/opcode.h    $(PERL_INC)/patchlevel.h \
-    $(PERL_INC)/perl.h $(PERL_INC)/perly.h     $(PERL_INC)/pp.h \
-    $(PERL_INC)/proto.h        $(PERL_INC)/regcomp.h   $(PERL_INC)/regexp.h \
-    $(PERL_INC)/scope.h        $(PERL_INC)/sv.h        $(PERL_INC)/unixish.h \
-    $(PERL_INC)/util.h
-
-$(OBJECT) : $(PERL_HDRS)
-');
-
-    push(@m,'
-$(PERL_INC)/config.h: $(PERL_SRC)/config.sh; cd $(PERL_SRC); /bin/sh config_h.SH
-$(PERL_INC)/embed.h:  $(PERL_SRC)/config.sh; cd $(PERL_SRC); /bin/sh embed_h.SH
-') if $att{PERL_SRC};
-
-    # This needs a better home:
-    push(@m, join(" ", values %{$att{XS}})." : \$(XSUBPPDEPS)\n")
-       if %{$att{XS}};
-    join("\n",@m);
-}
+without LIB, setting PREFIX replaces the initial C<$Config{prefix}>
+part of those INSTALL* arguments, even if the latter are explicitly
+set (but are set to still start with C<$Config{prefix}>).
 
+=back
 
-sub makefile {
-    # We do not know what target was originally specified so we
-    # must force a manual rerun to be sure. But as it would only
-    # happen very rarely it is not a significant problem.
-    '
-$(OBJECT) : Makefile
+If the user has superuser privileges, and is not working on AFS or
+relatives, then the defaults for INSTALLPRIVLIB, INSTALLARCHLIB,
+INSTALLSCRIPT, etc. will be appropriate, and this incantation will be
+the best:
 
-Makefile:      Makefile.PL $(CONFIGDEP)
-       $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) Makefile.PL
-       @echo "Now you must rerun make."; false
-';
-}
+    perl Makefile.PL; 
+    make; 
+    make test
+    make install
 
+make install per default writes some documentation of what has been
+done into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This feature
+can be bypassed by calling make pure_install.
 
-sub postamble{
-    "";
-}
+=head2 AFS users
 
+will have to specify the installation directories as these most
+probably have changed since perl itself has been installed. They will
+have to do this by calling
 
-# --- Determine libraries to use and how to use them ---
+    perl Makefile.PL INSTALLSITELIB=/afs/here/today \
+        INSTALLSCRIPT=/afs/there/now INSTALLMAN3DIR=/afs/for/manpages
+    make
 
-sub extliblist{
-    my($self, $libs) = @_;
-    return ("", "", "") unless $libs;
-    print STDERR "Potential libraries are '$libs':" if $Verbose;
-    my(@new) = MY->new_extliblist($libs);
+Be careful to repeat this procedure every time you recompile an
+extension, unless you are sure the AFS installation directories are
+still valid.
 
-    if ($att{PERL_SRC}){
-       my(@old) = MY->old_extliblist($libs);
-       my($oldlibs) = join(" : ",@old);
-       my($newlibs) = join(" : ",@new);
-       warn "Warning (non-fatal): $att{NAME} extliblist consistency check failed:\n".
-           "  old: $oldlibs\n".
-           "  new: $newlibs\n".
-           "Using 'new' set. Please notify perl5-porters\@isu.edu.\n"
-               if ("$newlibs" ne "$oldlibs");
-    }
-    @new;
-}
+=head2 Static Linking of a new Perl Binary
 
+An extension that is built with the above steps is ready to use on
+systems supporting dynamic loading. On systems that do not support
+dynamic loading, any newly created extension has to be linked together
+with the available resources. MakeMaker supports the linking process
+by creating appropriate targets in the Makefile whenever an extension
+is built. You can invoke the corresponding section of the makefile with
 
-sub old_extliblist {
-    my($self, $potential_libs)=@_;
-    return ("", "", "") unless $potential_libs;
-    die "old_extliblist requires PERL_SRC" unless $att{PERL_SRC};
-
-    my(%attrib, @w);
-    # Now run ext/util/extliblist to discover what *libs definitions
-    # are required for the needs of $potential_libs
-    $ENV{'potential_libs'} = $potential_libs;
-    my(@o)=`. $att{PERL_SRC}/config.sh
-           . $att{PERL_SRC}/ext/util/extliblist;
-           echo EXTRALIBS=\$extralibs
-           echo BSLOADLIBS=\$dynaloadlibs
-           echo LDLOADLIBS=\$statloadlibs
-           `;
-    foreach $line (@o){
-       chomp $line;
-       if ($line =~ /(.*)\s*=\s*(.*)\s*$/){
-           $attrib{$1} = $2;
-           print STDERR "      $1 = $2" if $Verbose;
-       }else{
-           push(@w, $line);
-       }
-    }
-    print STDERR "Messages from extliblist:\n", join("\n",@w,'')
-       if @w ;
-    @attrib{qw(EXTRALIBS BSLOADLIBS LDLOADLIBS)};
-}
+    make perl
 
+That produces a new perl binary in the current directory with all
+extensions linked in that can be found in INST_ARCHLIB, SITELIBEXP,
+and PERL_ARCHLIB. To do that, MakeMaker writes a new Makefile, on
+UNIX, this is called Makefile.aperl (may be system dependent). If you
+want to force the creation of a new perl, it is recommended, that you
+delete this Makefile.aperl, so the directories are searched-through
+for linkable libraries again.
 
-sub new_extliblist {
-    my($self, $potential_libs)=@_;
-    return ("", "", "") unless $potential_libs;
-
-    my($so)   = $Config{'so'};
-    my($libs) = $Config{'libs'};
-
-    # compute $extralibs, $bsloadlibs and $ldloadlibs from
-    # $potential_libs
-    # this is a rewrite of Andy Dougherty's extliblist in perl
-    # its home is in <distribution>/ext/util
-
-    my(@searchpath); # from "-L/path" entries in $potential_libs
-    my(@libpath) = split " ", $Config{'libpth'};
-    my(@ldloadlibs);
-    my(@bsloadlibs);
-    my(@extralibs);
-    my($fullname);
-    my($pwd) = fastcwd(); # from Cwd.pm
-
-    foreach $thislib (split ' ', $potential_libs){
-
-       # Handle possible linker path arguments.
-       if ($thislib =~ s/^(-[LR])//){  # save path flag type
-           my($ptype) = $1;
-           unless (-d $thislib){
-               warn "$ptype$thislib ignored, directory does not exist\n"
-                       if $Verbose;
-               next;
-           }
-           if ($thislib !~ m|^/|) {
-             warn "Warning: $ptype$thislib changed to $ptype$pwd/$thislib\n";
-             $thislib = "$pwd/$thislib";
-           }
-           push(@searchpath, $thislib);
-           push(@extralibs,  "$ptype$thislib");
-           push(@ldloadlibs, "$ptype$thislib");
-           next;
-       }
-
-       # Handle possible library arguments.
-       unless ($thislib =~ s/^-l//){
-         warn "Unrecognized argument in LIBS ignored: '$thislib'\n";
-         next;
-       }
-
-       my($found_lib)=0;
-       foreach $thispth (@searchpath, @libpath){
-
-           if (@fullname=<${thispth}/lib${thislib}.${so}.[0-9]*>){
-               $fullname=$fullname[-1]; #ATTN: 10 looses against 9!
-           } elsif (-f ($fullname="$thispth/lib$thislib.$so")){
-           } elsif (-f ($fullname="$thispth/lib${thislib}_s.a")
-               && ($thislib .= "_s") ){ # we must explicitly ask for _s version
-           } elsif (-f ($fullname="$thispth/lib$thislib.a")){
-           } elsif (-f ($fullname="$thispth/Slib$thislib.a")){
-           } else { 
-               warn "$thislib not found in $thispth\n" if $Verbose;
-               next;
-           }
-           warn "'-l$thislib' found at $fullname\n" if $Verbose;
-           $found_lib++;
-
-           # Now update library lists
-
-           # what do we know about this library...
-           my $is_dyna = ($fullname !~ /\.a$/);
-           my $in_perl = ($libs =~ /\B-l${thislib}\b/s);
-
-           # Do not add it into the list if it is already linked in
-           # with the main perl executable.
-           # We have to special-case the NeXT, because all the math is also in libsys_s
-           unless ( $in_perl || ($Config{'osname'} eq 'next' && $thislib eq 'm') ){
-               push(@extralibs, "-l$thislib");
-           }
-                       
-
-           # We might be able to load this archive file dynamically
-           if ( $Config{'dlsrc'} =~ /dl_next|dl_dld/){
-               # We push -l$thislib instead of $fullname because
-               # it avoids hardwiring a fixed path into the .bs file.
-               # mkbootstrap will automatically add dl_findfile() to
-               # the .bs file if it sees a name in the -l format.
-               # USE THIS LATER: push(@bsloadlibs, "-l$thislib"); # " $fullname";
-               # USE THIS while checking results against old_extliblist
-               push(@bsloadlibs, "$fullname");
-           } else {
-               if ($is_dyna){
-                    # For SunOS4, do not add in this shared library if
-                    # it is already linked in the main perl executable
-                   push(@ldloadlibs, "-l$thislib")
-                       unless ($in_perl and $Config{'osname'} eq 'sunos');
-               } else {
-                   push(@ldloadlibs, "-l$thislib");
-               }
-           }
-           last;       # found one here so don't bother looking further
-       }
-       warn "Warning (non-fatal): No library found for -l$thislib\n" unless $found_lib>0;
-    }
-    ("@extralibs", "@bsloadlibs", "@ldloadlibs");
-}
+The binary can be installed into the directory where perl normally
+resides on your machine with
 
+    make inst_perl
 
-# --- Write a DynaLoader bootstrap file if required
+To produce a perl binary with a different name than C<perl>, either say
 
-sub mkbootstrap {
+    perl Makefile.PL MAP_TARGET=myperl
+    make myperl
+    make inst_perl
 
-=head1 NAME
+or say
 
-mkbootstrap
+    perl Makefile.PL
+    make myperl MAP_TARGET=myperl
+    make inst_perl MAP_TARGET=myperl
 
-=head1 DESCRIPTION
+In any case you will be prompted with the correct invocation of the
+C<inst_perl> target that installs the new binary into INSTALLBIN.
 
-Make a bootstrap file for use by this system's DynaLoader.
-It typically gets called from an extension Makefile.
+make inst_perl per default writes some documentation of what has been
+done into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This
+can be bypassed by calling make pure_inst_perl.
 
-There is no .bs file supplied with the extension. Instead a _BS file
-which has code for the special cases, like posix for berkeley db on the
-NeXT.
+Warning: the inst_perl: target will most probably overwrite your
+existing perl binary. Use with care!
 
-This file will get parsed, and produce a maybe empty
-@DynaLoader::dl_resolve_using array for the current architecture.
-That will be extended by $BSLOADLIBS, which was computed by Andy's
-extliblist script. If this array still is empty, we do nothing, else
-we write a .bs file with an @DynaLoader::dl_resolve_using array, but
-without any C<if>s, because there is no longer a need to deal with
-special cases.
+Sometimes you might want to build a statically linked perl although
+your system supports dynamic loading. In this case you may explicitly
+set the linktype with the invocation of the Makefile.PL or make:
 
-The _BS file can put some code into the generated .bs file by placing
-it in $bscode. This is a handy 'escape' mechanism that may prove
-useful in complex situations.
+    perl Makefile.PL LINKTYPE=static    # recommended
 
-If @DynaLoader::dl_resolve_using contains C<-L*> or C<-l*> entries then
-mkbootstrap will automatically add a dl_findfile() call to the
-generated .bs file.
+or
 
-=head1 AUTHORS
+    make LINKTYPE=static                # works on most systems
 
-Andreas Koenig <k@otto.ww.TU-Berlin.DE>, Tim Bunce
-<Tim.Bunce@ig.co.uk>, Andy Dougherty <doughera@lafcol.lafayette.edu>
+=head2 Determination of Perl Library and Installation Locations
 
-=cut
+MakeMaker needs to know, or to guess, where certain things are
+located.  Especially INST_LIB and INST_ARCHLIB (where to put the files
+during the make(1) run), PERL_LIB and PERL_ARCHLIB (where to read
+existing modules from), and PERL_INC (header files and C<libperl*.*>).
 
-    my($self, @bsloadlibs)=@_;
+Extensions may be built either using the contents of the perl source
+directory tree or from the installed perl library. The recommended way
+is to build extensions after you have run 'make install' on perl
+itself. You can do that in any directory on your hard disk that is not
+below the perl source tree. The support for extensions below the ext
+directory of the perl distribution is only good for the standard
+extensions that come with perl.
 
-    @bsloadlibs = grep($_, @bsloadlibs); # strip empty libs
+If an extension is being built below the C<ext/> directory of the perl
+source then MakeMaker will set PERL_SRC automatically (e.g.,
+C<../..>).  If PERL_SRC is defined and the extension is recognized as
+a standard extension, then other variables default to the following:
 
-    print STDERR "     bsloadlibs=@bsloadlibs\n" if $Verbose;
+  PERL_INC     = PERL_SRC
+  PERL_LIB     = PERL_SRC/lib
+  PERL_ARCHLIB = PERL_SRC/lib
+  INST_LIB     = PERL_LIB
+  INST_ARCHLIB = PERL_ARCHLIB
 
-    # We need DynaLoader here because we and/or the *_BS file may
-    # call dl_findfile(). We don't say `use' here because when
-    # first building perl extensions the DynaLoader will not have
-    # been built when MakeMaker gets first used.
-    require DynaLoader;
-    import DynaLoader;
+If an extension is being built away from the perl source then MakeMaker
+will leave PERL_SRC undefined and default to using the installed copy
+of the perl library. The other variables default to the following:
 
-    initialize(@ARGV) unless defined $att{'BASEEXT'};
+  PERL_INC     = $archlibexp/CORE
+  PERL_LIB     = $privlibexp
+  PERL_ARCHLIB = $archlibexp
+  INST_LIB     = ./blib/lib
+  INST_ARCHLIB = ./blib/arch
 
-    rename "$att{BASEEXT}.bs", "$att{BASEEXT}.bso";
+If perl has not yet been installed then PERL_SRC can be defined on the
+command line as shown in the previous section.
 
-    if (-f "$att{BASEEXT}_BS"){
-       $_ = "$att{BASEEXT}_BS";
-       package DynaLoader; # execute code as if in DynaLoader
-       local($osname, $dlsrc) = (); # avoid warnings
-       ($osname, $dlsrc) = @Config::Config{qw(osname dlsrc)};
-       $bscode = "";
-       unshift @INC, ".";
-       require $_;
-       shift @INC;
-    }
 
-    if ($Config{'dlsrc'} =~ /^dl_dld/){
-       package DynaLoader;
-       push(@dl_resolve_using, dl_findfile('-lc'));
-    }
+=head2 Which architecture dependent directory?
 
-    my(@all) = (@bsloadlibs, @DynaLoader::dl_resolve_using);
-    my($method) = '';
-    if (@all){
-       open BS, ">$att{BASEEXT}.bs"
-               or die "Unable to open $att{BASEEXT}.bs: $!";
-       print STDOUT "Writing $att{BASEEXT}.bs\n";
-       print STDOUT "  containing: @all" if $Verbose;
-       print BS "# $att{BASEEXT} DynaLoader bootstrap file for $Config{'osname'} architecture.\n";
-       print BS "# Do not edit this file, changes will be lost.\n";
-       print BS "# This file was automatically generated by the\n";
-       print BS "# mkbootstrap routine in ExtUtils/MakeMaker.pm.\n";
-       print BS "\@DynaLoader::dl_resolve_using = ";
-       # If @all contains names in the form -lxxx or -Lxxx then it's asking for
-       # runtime library location so we automatically add a call to dl_findfile()
-       if (" @all" =~ m/ -[lLR]/){
-           print BS "  dl_findfile(qw(\n  @all\n  ));\n";
-       }else{
-           print BS "  qw(@all);\n";
-       }
-       # write extra code if *_BS says so
-       print BS $DynaLoader::bscode if $DynaLoader::bscode;
-       print BS "\n1;\n";
-       close BS;
-    }
+If you don't want to keep the defaults for the INSTALL* macros,
+MakeMaker helps you to minimize the typing needed: the usual
+relationship between INSTALLPRIVLIB and INSTALLARCHLIB is determined
+by Configure at perl compilation time. MakeMaker supports the user who
+sets INSTALLPRIVLIB. If INSTALLPRIVLIB is set, but INSTALLARCHLIB not,
+then MakeMaker defaults the latter to be the same subdirectory of
+INSTALLPRIVLIB as Configure decided for the counterparts in %Config ,
+otherwise it defaults to INSTALLPRIVLIB. The same relationship holds
+for INSTALLSITELIB and INSTALLSITEARCH.
 
-    # special handling for systems which needs a list of all global
-    # symbols exported by a modules to be dynamically linked.
-    if ($Config{'dlsrc'} =~ /^dl_aix/){
-       my($bootfunc);
-       ($bootfunc = $att{NAME}) =~ s/\W/_/g;
-       open EXP, ">$att{BASEEXT}.exp";
-       print EXP "#!\nboot_$bootfunc\n";
-       close EXP;
-    }
-}
+MakeMaker gives you much more freedom than needed to configure
+internal variables and get different results. It is worth to mention,
+that make(1) also lets you configure most of the variables that are
+used in the Makefile. But in the majority of situations this will not
+be necessary, and should only be done if the author of a package
+recommends it (or you know what you're doing).
 
+=head2 Using Attributes and Parameters
 
-# --- Output postprocessing section ---
-#nicetext is included to make VMS support easier
-sub nicetext { # Just return the input - no action needed
-    my($self,$text) = @_;
-    $text;
-}
-# the following keeps AutoSplit happy
-package ExtUtils::MakeMaker;
-1;
+The following attributes may be specified as arguments to WriteMakefile()
+or as NAME=VALUE pairs on the command line.
 
-__END__
+=over 2
+
+=item ABSTRACT
+
+One line description of the module. Will be included in PPD file.
+
+=item ABSTRACT_FROM
+
+Name of the file that contains the package description. MakeMaker looks
+for a line in the POD matching /^($package\s-\s)(.*)/. This is typically
+the first line in the "=head1 NAME" section. $2 becomes the abstract.
+
+=item AUTHOR
+
+String containing name (and email address) of package author(s). Is used
+in PPD (Perl Package Description) files for PPM (Perl Package Manager).
+
+=item BINARY_LOCATION
+
+Used when creating PPD files for binary packages.  It can be set to a
+full or relative path or URL to the binary archive for a particular
+architecture.  For example:
+
+        perl Makefile.PL BINARY_LOCATION=x86/Agent.tar.gz
+
+builds a PPD package that references a binary of the C<Agent> package,
+located in the C<x86> directory relative to the PPD itself.
+
+=item C
+
+Ref to array of *.c file names. Initialised from a directory scan
+and the values portion of the XS attribute hash. This is not
+currently used by MakeMaker but may be handy in Makefile.PLs.
+
+=item CCFLAGS
+
+String that will be included in the compiler call command line between
+the arguments INC and OPTIMIZE.
+
+=item CONFIG
+
+Arrayref. E.g. [qw(archname manext)] defines ARCHNAME & MANEXT from
+config.sh. MakeMaker will add to CONFIG the following values anyway:
+ar
+cc
+cccdlflags
+ccdlflags
+dlext
+dlsrc
+ld
+lddlflags
+ldflags
+libc
+lib_ext
+obj_ext
+ranlib
+sitelibexp
+sitearchexp
+so
+
+=item CONFIGURE
+
+CODE reference. The subroutine should return a hash reference. The
+hash may contain further attributes, e.g. {LIBS =E<gt> ...}, that have to
+be determined by some evaluation method.
+
+=item DEFINE
+
+Something like C<"-DHAVE_UNISTD_H">
+
+=item DESTDIR
+
+This is the root directory into which the code will be installed.  It
+I<prepends itself to the normal prefix>.  For example, if your code
+would normally go into /usr/local/lib/perl you could set DESTDIR=/tmp/
+and installation would go into /tmp/usr/local/lib/perl.
+
+This is primarily of use for people who repackage Perl modules.
 
+NOTE: Due to the nature of make, it is important that you put the trailing
+slash on your DESTDIR.  "/tmp/" not "/tmp".
+
+=item DIR
+
+Ref to array of subdirectories containing Makefile.PLs e.g. [ 'sdbm'
+] in ext/SDBM_File
+
+=item DISTNAME
+
+A safe filename for the package. 
+
+Defaults to NAME above but with :: replaced with -.
+
+For example, Foo::Bar becomes Foo-Bar.
+
+=item DISTVNAME
+
+Your name for distributing the package with the version number
+included.  This is used by 'make dist' to name the resulting archive
+file.
+
+Defaults to DISTNAME-VERSION.
+
+For example, version 1.04 of Foo::Bar becomes Foo-Bar-1.04.
+
+On some OS's where . has special meaning VERSION_SYM may be used in
+place of VERSION.
+
+=item DL_FUNCS
+
+Hashref of symbol names for routines to be made available as universal
+symbols.  Each key/value pair consists of the package name and an
+array of routine names in that package.  Used only under AIX, OS/2,
+VMS and Win32 at present.  The routine names supplied will be expanded
+in the same way as XSUB names are expanded by the XS() macro.
+Defaults to
+
+  {"$(NAME)" => ["boot_$(NAME)" ] }
+
+e.g.
+
+  {"RPC" => [qw( boot_rpcb rpcb_gettime getnetconfigent )],
+   "NetconfigPtr" => [ 'DESTROY'] }
+
+Please see the L<ExtUtils::Mksymlists> documentation for more information
+about the DL_FUNCS, DL_VARS and FUNCLIST attributes.
+
+=item DL_VARS
+
+Array of symbol names for variables to be made available as universal symbols.
+Used only under AIX, OS/2, VMS and Win32 at present.  Defaults to [].
+(e.g. [ qw(Foo_version Foo_numstreams Foo_tree ) ])
+
+=item EXCLUDE_EXT
+
+Array of extension names to exclude when doing a static build.  This
+is ignored if INCLUDE_EXT is present.  Consult INCLUDE_EXT for more
+details.  (e.g.  [ qw( Socket POSIX ) ] )
+
+This attribute may be most useful when specified as a string on the
+command line:  perl Makefile.PL EXCLUDE_EXT='Socket Safe'
+
+=item EXE_FILES
+
+Ref to array of executable files. The files will be copied to the
+INST_SCRIPT directory. Make realclean will delete them from there
+again.
+
+If your executables start with something like #!perl or
+#!/usr/bin/perl MakeMaker will change this to the path of the perl
+'Makefile.PL' was invoked with so the programs will be sure to run
+properly even if perl is not in /usr/bin/perl.
+
+=item FIRST_MAKEFILE
+
+The name of the Makefile to be produced.  This is used for the second
+Makefile that will be produced for the MAP_TARGET.
+
+Defaults to 'Makefile' or 'Descrip.MMS' on VMS.
+
+(Note: we couldn't use MAKEFILE because dmake uses this for something
+else).
+
+=item FULLPERL
+
+Perl binary able to run this extension, load XS modules, etc...
+
+=item FULLPERLRUN
+
+Like PERLRUN, except it uses FULLPERL.
+
+=item FULLPERLRUNINST
+
+Like PERLRUNINST, except it uses FULLPERL.
+
+=item FUNCLIST
+
+This provides an alternate means to specify function names to be
+exported from the extension.  Its value is a reference to an
+array of function names to be exported by the extension.  These
+names are passed through unaltered to the linker options file.
+
+=item H
+
+Ref to array of *.h file names. Similar to C.
+
+=item IMPORTS
+
+This attribute is used to specify names to be imported into the
+extension. Takes a hash ref.
+
+It is only used on OS/2 and Win32.
+
+=item INC
+
+Include file dirs eg: C<"-I/usr/5include -I/path/to/inc">
+
+=item INCLUDE_EXT
+
+Array of extension names to be included when doing a static build.
+MakeMaker will normally build with all of the installed extensions when
+doing a static build, and that is usually the desired behavior.  If
+INCLUDE_EXT is present then MakeMaker will build only with those extensions
+which are explicitly mentioned. (e.g.  [ qw( Socket POSIX ) ])
+
+It is not necessary to mention DynaLoader or the current extension when
+filling in INCLUDE_EXT.  If the INCLUDE_EXT is mentioned but is empty then
+only DynaLoader and the current extension will be included in the build.
+
+This attribute may be most useful when specified as a string on the
+command line:  perl Makefile.PL INCLUDE_EXT='POSIX Socket Devel::Peek'
+
+=item INSTALLARCHLIB
+
+Used by 'make install', which copies files from INST_ARCHLIB to this
+directory if INSTALLDIRS is set to perl.
+
+=item INSTALLBIN
+
+Directory to install binary files (e.g. tkperl) into if
+INSTALLDIRS=perl.
+
+=item INSTALLDIRS
+
+Determines which of the sets of installation directories to choose:
+perl, site or vendor.  Defaults to site.
+
+=item INSTALLMAN1DIR
+
+=item INSTALLMAN3DIR
+
+These directories get the man pages at 'make install' time if
+INSTALLDIRS=perl.  Defaults to $Config{installman*dir}.
+
+If set to 'none', no man pages will be installed.
+
+=item INSTALLPRIVLIB
+
+Used by 'make install', which copies files from INST_LIB to this
+directory if INSTALLDIRS is set to perl.
+
+Defaults to $Config{installprivlib}.
+
+=item INSTALLSCRIPT
+
+Used by 'make install' which copies files from INST_SCRIPT to this
+directory.
+
+=item INSTALLSITEARCH
+
+Used by 'make install', which copies files from INST_ARCHLIB to this
+directory if INSTALLDIRS is set to site (default).
+
+=item INSTALLSITEBIN
+
+Used by 'make install', which copies files from INST_BIN to this
+directory if INSTALLDIRS is set to site (default).
+
+=item INSTALLSITELIB
+
+Used by 'make install', which copies files from INST_LIB to this
+directory if INSTALLDIRS is set to site (default).
+
+=item INSTALLSITEMAN1DIR
+
+=item INSTALLSITEMAN3DIR
+
+These directories get the man pages at 'make install' time if
+INSTALLDIRS=site (default).  Defaults to 
+$(SITEPREFIX)/man/man$(MAN*EXT).
+
+If set to 'none', no man pages will be installed.
+
+=item INSTALLVENDORARCH
+
+Used by 'make install', which copies files from INST_ARCHLIB to this
+directory if INSTALLDIRS is set to vendor.
+
+=item INSTALLVENDORBIN
+
+Used by 'make install', which copies files from INST_BIN to this
+directory if INSTALLDIRS is set to vendor.
+
+=item INSTALLVENDORLIB
+
+Used by 'make install', which copies files from INST_LIB to this
+directory if INSTALLDIRS is set to vendor.
+
+=item INSTALLVENDORMAN1DIR
+
+=item INSTALLVENDORMAN3DIR
+
+These directories get the man pages at 'make install' time if
+INSTALLDIRS=vendor.  Defaults to $(VENDORPREFIX)/man/man$(MAN*EXT).
+
+If set to 'none', no man pages will be installed.
+
+=item INST_ARCHLIB
+
+Same as INST_LIB for architecture dependent files.
+
+=item INST_BIN
+
+Directory to put real binary files during 'make'. These will be copied
+to INSTALLBIN during 'make install'
+
+=item INST_LIB
+
+Directory where we put library files of this extension while building
+it.
+
+=item INST_MAN1DIR
+
+Directory to hold the man pages at 'make' time
+
+=item INST_MAN3DIR
+
+Directory to hold the man pages at 'make' time
+
+=item INST_SCRIPT
+
+Directory, where executable files should be installed during
+'make'. Defaults to "./blib/script", just to have a dummy location during
+testing. make install will copy the files in INST_SCRIPT to
+INSTALLSCRIPT.
+
+=item LD
+
+Program to be used to link libraries for dynamic loading.
+
+Defaults to $Config{ld}.
+
+=item LDDLFLAGS
+
+Any special flags that might need to be passed to ld to create a
+shared library suitable for dynamic loading.  It is up to the makefile
+to use it.  (See L<Config/lddlflags>)
+
+Defaults to $Config{lddlflags}.
+
+=item LDFROM
+
+Defaults to "$(OBJECT)" and is used in the ld command to specify
+what files to link/load from (also see dynamic_lib below for how to
+specify ld flags)
+
+=item LIB
+
+LIB should only be set at C<perl Makefile.PL> time but is allowed as a
+MakeMaker argument. It has the effect of setting both INSTALLPRIVLIB
+and INSTALLSITELIB to that value regardless any explicit setting of
+those arguments (or of PREFIX).  INSTALLARCHLIB and INSTALLSITEARCH
+are set to the corresponding architecture subdirectory.
+
+=item LIBPERL_A
+
+The filename of the perllibrary that will be used together with this
+extension. Defaults to libperl.a.
+
+=item LIBS
+
+An anonymous array of alternative library
+specifications to be searched for (in order) until
+at least one library is found. E.g.
+
+  'LIBS' => ["-lgdbm", "-ldbm -lfoo", "-L/path -ldbm.nfs"]
+
+Mind, that any element of the array
+contains a complete set of arguments for the ld
+command. So do not specify
+
+  'LIBS' => ["-ltcl", "-ltk", "-lX11"]
+
+See ODBM_File/Makefile.PL for an example, where an array is needed. If
+you specify a scalar as in
+
+  'LIBS' => "-ltcl -ltk -lX11"
+
+MakeMaker will turn it into an array with one element.
+
+=item LINKTYPE
+
+'static' or 'dynamic' (default unless usedl=undef in
+config.sh). Should only be used to force static linking (also see
+linkext below).
+
+=item MAKEAPERL
+
+Boolean which tells MakeMaker, that it should include the rules to
+make a perl. This is handled automatically as a switch by
+MakeMaker. The user normally does not need it.
+
+=item MAKEFILE_OLD
+
+When 'make clean' or similar is run, the $(FIRST_MAKEFILE) will be
+backed up at this location.
+
+Defaults to $(FIRST_MAKEFILE).old or $(FIRST_MAKEFILE)_old on VMS.
+
+=item MAN1PODS
+
+Hashref of pod-containing files. MakeMaker will default this to all
+EXE_FILES files that include POD directives. The files listed
+here will be converted to man pages and installed as was requested
+at Configure time.
+
+=item MAN3PODS
+
+Hashref that assigns to *.pm and *.pod files the files into which the
+manpages are to be written. MakeMaker parses all *.pod and *.pm files
+for POD directives. Files that contain POD will be the default keys of
+the MAN3PODS hashref. These will then be converted to man pages during
+C<make> and will be installed during C<make install>.
+
+=item MAP_TARGET
+
+If it is intended, that a new perl binary be produced, this variable
+may hold a name for that binary. Defaults to perl
+
+=item MYEXTLIB
+
+If the extension links to a library that it builds set this to the
+name of the library (see SDBM_File)
+
+=item NAME
+
+Perl module name for this extension (DBD::Oracle). This will default
+to the directory name but should be explicitly defined in the
+Makefile.PL.
+
+=item NEEDS_LINKING
+
+MakeMaker will figure out if an extension contains linkable code
+anywhere down the directory tree, and will set this variable
+accordingly, but you can speed it up a very little bit if you define
+this boolean variable yourself.
+
+=item NOECHO
+
+Command so make does not print the literal commands its running.
+
+By setting it to an empty string you can generate a Makefile that
+prints all commands. Mainly used in debugging MakeMaker itself.
+
+Defaults to C<@>.
+
+=item NORECURS
+
+Boolean.  Attribute to inhibit descending into subdirectories.
+
+=item NO_META
+
+When true, suppresses the generation and addition to the MANIFEST of
+the META.yml module meta-data file during 'make distdir'.
+
+Defaults to false.
+
+=item NO_VC
+
+In general, any generated Makefile checks for the current version of
+MakeMaker and the version the Makefile was built under. If NO_VC is
+set, the version check is neglected. Do not write this into your
+Makefile.PL, use it interactively instead.
+
+=item OBJECT
+
+List of object files, defaults to '$(BASEEXT)$(OBJ_EXT)', but can be a long
+string containing all object files, e.g. "tkpBind.o
+tkpButton.o tkpCanvas.o"
+
+(Where BASEEXT is the last component of NAME, and OBJ_EXT is $Config{obj_ext}.)
+
+=item OPTIMIZE
+
+Defaults to C<-O>. Set it to C<-g> to turn debugging on. The flag is
+passed to subdirectory makes.
+
+=item PERL
+
+Perl binary for tasks that can be done by miniperl
+
+=item PERL_CORE
+
+Set only when MakeMaker is building the extensions of the Perl core
+distribution.
+
+=item PERLMAINCC
+
+The call to the program that is able to compile perlmain.c. Defaults
+to $(CC).
+
+=item PERL_ARCHLIB
+
+Same as for PERL_LIB, but for architecture dependent files.
+
+Used only when MakeMaker is building the extensions of the Perl core
+distribution (because normally $(PERL_ARCHLIB) is automatically in @INC,
+and adding it would get in the way of PERL5LIB).
+
+=item PERL_LIB
+
+Directory containing the Perl library to use.
+
+Used only when MakeMaker is building the extensions of the Perl core
+distribution (because normally $(PERL_LIB) is automatically in @INC,
+and adding it would get in the way of PERL5LIB).
+
+=item PERL_MALLOC_OK
+
+defaults to 0.  Should be set to TRUE if the extension can work with
+the memory allocation routines substituted by the Perl malloc() subsystem.
+This should be applicable to most extensions with exceptions of those
+
+=over 4
+
+=item *
+
+with bugs in memory allocations which are caught by Perl's malloc();
+
+=item *
+
+which interact with the memory allocator in other ways than via
+malloc(), realloc(), free(), calloc(), sbrk() and brk();
+
+=item *
+
+which rely on special alignment which is not provided by Perl's malloc().
+
+=back
+
+B<NOTE.>  Negligence to set this flag in I<any one> of loaded extension
+nullifies many advantages of Perl's malloc(), such as better usage of
+system resources, error detection, memory usage reporting, catchable failure
+of memory allocations, etc.
+
+=item PERLPREFIX
+
+Directory under which core modules are to be installed.
+
+Defaults to $Config{installprefixexp} falling back to
+$Config{installprefix}, $Config{prefixexp} or $Config{prefix} should
+$Config{installprefixexp} not exist.
+
+Overridden by PREFIX.
+
+=item PERLRUN
+
+Use this instead of $(PERL) when you wish to run perl.  It will set up
+extra necessary flags for you.
+
+=item PERLRUNINST
+
+Use this instead of $(PERL) when you wish to run perl to work with
+modules.  It will add things like -I$(INST_ARCH) and other necessary
+flags so perl can see the modules you're about to install.
+
+=item PERL_SRC
+
+Directory containing the Perl source code (use of this should be
+avoided, it may be undefined)
+
+=item PERM_RW
+
+Desired permission for read/writable files. Defaults to C<644>.
+See also L<MM_Unix/perm_rw>.
+
+=item PERM_RWX
+
+Desired permission for executable files. Defaults to C<755>.
+See also L<MM_Unix/perm_rwx>.
+
+=item PL_FILES
+
+Ref to hash of files to be processed as perl programs. MakeMaker
+will default to any found *.PL file (except Makefile.PL) being keys
+and the basename of the file being the value. E.g.
+
+  {'foobar.PL' => 'foobar'}
+
+The *.PL files are expected to produce output to the target files
+themselves. If multiple files can be generated from the same *.PL
+file then the value in the hash can be a reference to an array of
+target file names. E.g.
+
+  {'foobar.PL' => ['foobar1','foobar2']}
+
+=item PM
+
+Hashref of .pm files and *.pl files to be installed.  e.g.
+
+  {'name_of_file.pm' => '$(INST_LIBDIR)/install_as.pm'}
+
+By default this will include *.pm and *.pl and the files found in
+the PMLIBDIRS directories.  Defining PM in the
+Makefile.PL will override PMLIBDIRS.
+
+=item PMLIBDIRS
+
+Ref to array of subdirectories containing library files.  Defaults to
+[ 'lib', $(BASEEXT) ]. The directories will be scanned and I<any> files
+they contain will be installed in the corresponding location in the
+library.  A libscan() method can be used to alter the behaviour.
+Defining PM in the Makefile.PL will override PMLIBDIRS.
+
+(Where BASEEXT is the last component of NAME.)
+
+=item PM_FILTER
+
+A filter program, in the traditional Unix sense (input from stdin, output
+to stdout) that is passed on each .pm file during the build (in the
+pm_to_blib() phase).  It is empty by default, meaning no filtering is done.
+
+Great care is necessary when defining the command if quoting needs to be
+done.  For instance, you would need to say:
+
+  {'PM_FILTER' => 'grep -v \\"^\\#\\"'}
+
+to remove all the leading coments on the fly during the build.  The
+extra \\ are necessary, unfortunately, because this variable is interpolated
+within the context of a Perl program built on the command line, and double
+quotes are what is used with the -e switch to build that command line.  The
+# is escaped for the Makefile, since what is going to be generated will then
+be:
+
+  PM_FILTER = grep -v \"^\#\"
+
+Without the \\ before the #, we'd have the start of a Makefile comment,
+and the macro would be incorrectly defined.
+
+=item POLLUTE
+
+Release 5.005 grandfathered old global symbol names by providing preprocessor
+macros for extension source compatibility.  As of release 5.6, these
+preprocessor definitions are not available by default.  The POLLUTE flag
+specifies that the old names should still be defined:
+
+  perl Makefile.PL POLLUTE=1
+
+Please inform the module author if this is necessary to successfully install
+a module under 5.6 or later.
+
+=item PPM_INSTALL_EXEC
+
+Name of the executable used to run C<PPM_INSTALL_SCRIPT> below. (e.g. perl)
+
+=item PPM_INSTALL_SCRIPT
+
+Name of the script that gets executed by the Perl Package Manager after
+the installation of a package.
+
+=item PREFIX
+
+This overrides all the default install locations.  Man pages,
+libraries, scripts, etc...  MakeMaker will try to make an educated
+guess about where to place things under the new PREFIX based on your
+Config defaults.  Failing that, it will fall back to a structure
+which should be sensible for your platform.
+
+If you specify LIB or any INSTALL* variables they will not be effected
+by the PREFIX.
+
+=item PREREQ_FATAL
+
+Bool. If this parameter is true, failing to have the required modules
+(or the right versions thereof) will be fatal. perl Makefile.PL will die
+with the proper message.
+
+Note: see L<Test::Harness> for a shortcut for stopping tests early if
+you are missing dependencies.
+
+Do I<not> use this parameter for simple requirements, which could be resolved
+at a later time, e.g. after an unsuccessful B<make test> of your module.
+
+It is I<extremely> rare to have to use C<PREREQ_FATAL> at all!
+
+=item PREREQ_PM
+
+Hashref: Names of modules that need to be available to run this
+extension (e.g. Fcntl for SDBM_File) are the keys of the hash and the
+desired version is the value. If the required version number is 0, we
+only check if any version is installed already.
+
+=item PREREQ_PRINT
+
+Bool.  If this parameter is true, the prerequisites will be printed to
+stdout and MakeMaker will exit.  The output format is an evalable hash
+ref.
+
+$PREREQ_PM = {
+               'A::B' => Vers1,
+               'C::D' => Vers2,
+               ...
+             };
+
+=item PRINT_PREREQ
+
+RedHatism for C<PREREQ_PRINT>.  The output format is different, though:
+
+    perl(A::B)>=Vers1 perl(C::D)>=Vers2 ...
+
+=item SITEPREFIX
+
+Like PERLPREFIX, but only for the site install locations.
+
+Defaults to $Config{siteprefixexp}.  Perls prior to 5.6.0 didn't have
+an explicit siteprefix in the Config.  In those cases
+$Config{installprefix} will be used.
+
+Overridable by PREFIX
+
+=item SKIP
+
+Arrayref. E.g. [qw(name1 name2)] skip (do not write) sections of the
+Makefile. Caution! Do not use the SKIP attribute for the negligible
+speedup. It may seriously damage the resulting Makefile. Only use it
+if you really need it.
+
+=item TYPEMAPS
+
+Ref to array of typemap file names.  Use this when the typemaps are
+in some directory other than the current directory or when they are
+not named B<typemap>.  The last typemap in the list takes
+precedence.  A typemap in the current directory has highest
+precedence, even if it isn't listed in TYPEMAPS.  The default system
+typemap has lowest precedence.
+
+=item VENDORPREFIX
+
+Like PERLPREFIX, but only for the vendor install locations.
+
+Defaults to $Config{vendorprefixexp}.
+
+Overridable by PREFIX
+
+=item VERBINST
+
+If true, make install will be verbose
+
+=item VERSION
+
+Your version number for distributing the package.  This defaults to
+0.1.
+
+=item VERSION_FROM
+
+Instead of specifying the VERSION in the Makefile.PL you can let
+MakeMaker parse a file to determine the version number. The parsing
+routine requires that the file named by VERSION_FROM contains one
+single line to compute the version number. The first line in the file
+that contains the regular expression
+
+    /([\$*])(([\w\:\']*)\bVERSION)\b.*\=/
+
+will be evaluated with eval() and the value of the named variable
+B<after> the eval() will be assigned to the VERSION attribute of the
+MakeMaker object. The following lines will be parsed o.k.:
+
+    $VERSION = '1.00';
+    *VERSION = \'1.01';
+    $VERSION = sprintf "%d.%03d", q$Revision: 1.131 $ =~ /(\d+)/g;
+    $FOO::VERSION = '1.10';
+    *FOO::VERSION = \'1.11';
+    our $VERSION = 1.2.3;       # new for perl5.6.0 
+
+but these will fail:
+
+    my $VERSION = '1.01';
+    local $VERSION = '1.02';
+    local $FOO::VERSION = '1.30';
+
+(Putting C<my> or C<local> on the preceding line will work o.k.)
+
+The file named in VERSION_FROM is not added as a dependency to
+Makefile. This is not really correct, but it would be a major pain
+during development to have to rewrite the Makefile for any smallish
+change in that file. If you want to make sure that the Makefile
+contains the correct VERSION macro after any change of the file, you
+would have to do something like
+
+    depend => { Makefile => '$(VERSION_FROM)' }
+
+See attribute C<depend> below.
+
+=item VERSION_SYM
+
+A sanitized VERSION with . replaced by _.  For places where . has
+special meaning (some filesystems, RCS labels, etc...)
+
+=item XS
+
+Hashref of .xs files. MakeMaker will default this.  e.g.
+
+  {'name_of_file.xs' => 'name_of_file.c'}
+
+The .c files will automatically be included in the list of files
+deleted by a make clean.
+
+=item XSOPT
+
+String of options to pass to xsubpp.  This might include C<-C++> or
+C<-extern>.  Do not include typemaps here; the TYPEMAP parameter exists for
+that purpose.
+
+=item XSPROTOARG
+
+May be set to an empty string, which is identical to C<-prototypes>, or
+C<-noprototypes>. See the xsubpp documentation for details. MakeMaker
+defaults to the empty string.
+
+=item XS_VERSION
+
+Your version number for the .xs file of this package.  This defaults
+to the value of the VERSION attribute.
+
+=back
+
+=head2 Additional lowercase attributes
+
+can be used to pass parameters to the methods which implement that
+part of the Makefile.  Parameters are specified as a hash ref but are
+passed to the method as a hash.
+
+=over 2
+
+=item clean
+
+  {FILES => "*.xyz foo"}
+
+=item depend
+
+  {ANY_TARGET => ANY_DEPENDECY, ...}
+
+(ANY_TARGET must not be given a double-colon rule by MakeMaker.)
+
+=item dist
+
+  {TARFLAGS => 'cvfF', COMPRESS => 'gzip', SUFFIX => '.gz',
+  SHAR => 'shar -m', DIST_CP => 'ln', ZIP => '/bin/zip',
+  ZIPFLAGS => '-rl', DIST_DEFAULT => 'private tardist' }
+
+If you specify COMPRESS, then SUFFIX should also be altered, as it is
+needed to tell make the target file of the compression. Setting
+DIST_CP to ln can be useful, if you need to preserve the timestamps on
+your files. DIST_CP can take the values 'cp', which copies the file,
+'ln', which links the file, and 'best' which copies symbolic links and
+links the rest. Default is 'best'.
+
+=item dynamic_lib
+
+  {ARMAYBE => 'ar', OTHERLDFLAGS => '...', INST_DYNAMIC_DEP => '...'}
+
+=item linkext
+
+  {LINKTYPE => 'static', 'dynamic' or ''}
+
+NB: Extensions that have nothing but *.pm files had to say
+
+  {LINKTYPE => ''}
+
+with Pre-5.0 MakeMakers. Since version 5.00 of MakeMaker such a line
+can be deleted safely. MakeMaker recognizes when there's nothing to
+be linked.
+
+=item macro
+
+  {ANY_MACRO => ANY_VALUE, ...}
+
+=item postamble
+
+Anything put here will be passed to MY::postamble() if you have one.
+
+=item realclean
+
+  {FILES => '$(INST_ARCHAUTODIR)/*.xyz'}
+
+=item test
+
+  {TESTS => 't/*.t'}
+
+=item tool_autosplit
+
+  {MAXLEN => 8}
+
+=back
+
+=head2 Overriding MakeMaker Methods
+
+If you cannot achieve the desired Makefile behaviour by specifying
+attributes you may define private subroutines in the Makefile.PL.
+Each subroutine returns the text it wishes to have written to
+the Makefile. To override a section of the Makefile you can
+either say:
+
+        sub MY::c_o { "new literal text" }
+
+or you can edit the default by saying something like:
+
+        package MY; # so that "SUPER" works right
+        sub c_o {
+            my $inherited = shift->SUPER::c_o(@_);
+            $inherited =~ s/old text/new text/;
+            $inherited;
+        }
+
+If you are running experiments with embedding perl as a library into
+other applications, you might find MakeMaker is not sufficient. You'd
+better have a look at ExtUtils::Embed which is a collection of utilities
+for embedding.
+
+If you still need a different solution, try to develop another
+subroutine that fits your needs and submit the diffs to
+F<makemaker@perl.org>
+
+For a complete description of all MakeMaker methods see
+L<ExtUtils::MM_Unix>.
+
+Here is a simple example of how to add a new target to the generated
+Makefile:
+
+    sub MY::postamble {
+        return <<'MAKE_FRAG';
+    $(MYEXTLIB): sdbm/Makefile
+            cd sdbm && $(MAKE) all
+
+    MAKE_FRAG
+    }
+
+=head2 The End Of Cargo Cult Programming
+
+WriteMakefile() now does some basic sanity checks on its parameters to
+protect against typos and malformatted values.  This means some things
+which happened to work in the past will now throw warnings and
+possibly produce internal errors.
+
+Some of the most common mistakes:
+
+=over 2
+
+=item C<<MAN3PODS => ' '>>
+
+This is commonly used to supress the creation of man pages.  MAN3PODS
+takes a hash ref not a string, but the above worked by accident in old
+versions of MakeMaker.
+
+The correct code is C<<MAN3PODS => { }>>.
+
+=back
+
+
+=head2 Hintsfile support
+
+MakeMaker.pm uses the architecture specific information from
+Config.pm. In addition it evaluates architecture specific hints files
+in a C<hints/> directory. The hints files are expected to be named
+like their counterparts in C<PERL_SRC/hints>, but with an C<.pl> file
+name extension (eg. C<next_3_2.pl>). They are simply C<eval>ed by
+MakeMaker within the WriteMakefile() subroutine, and can be used to
+execute commands as well as to include special variables. The rules
+which hintsfile is chosen are the same as in Configure.
+
+The hintsfile is eval()ed immediately after the arguments given to
+WriteMakefile are stuffed into a hash reference $self but before this
+reference becomes blessed. So if you want to do the equivalent to
+override or create an attribute you would say something like
+
+    $self->{LIBS} = ['-ldbm -lucb -lc'];
+
+=head2 Distribution Support
+
+For authors of extensions MakeMaker provides several Makefile
+targets. Most of the support comes from the ExtUtils::Manifest module,
+where additional documentation can be found.
+
+=over 4
+
+=item    make distcheck
+
+reports which files are below the build directory but not in the
+MANIFEST file and vice versa. (See ExtUtils::Manifest::fullcheck() for
+details)
+
+=item    make skipcheck
+
+reports which files are skipped due to the entries in the
+C<MANIFEST.SKIP> file (See ExtUtils::Manifest::skipcheck() for
+details)
+
+=item    make distclean
+
+does a realclean first and then the distcheck. Note that this is not
+needed to build a new distribution as long as you are sure that the
+MANIFEST file is ok.
+
+=item    make manifest
+
+rewrites the MANIFEST file, adding all remaining files found (See
+ExtUtils::Manifest::mkmanifest() for details)
+
+=item    make distdir
+
+Copies all the files that are in the MANIFEST file to a newly created
+directory with the name C<$(DISTNAME)-$(VERSION)>. If that directory
+exists, it will be removed first.
+
+Additionally, it will create a META.yml module meta-data file and add
+this to your MANFIEST.  You can shut this behavior off with the NO_META
+flag.
+
+=item   make disttest
+
+Makes a distdir first, and runs a C<perl Makefile.PL>, a make, and
+a make test in that directory.
+
+=item    make tardist
+
+First does a distdir. Then a command $(PREOP) which defaults to a null
+command, followed by $(TOUNIX), which defaults to a null command under
+UNIX, and will convert files in distribution directory to UNIX format
+otherwise. Next it runs C<tar> on that directory into a tarfile and
+deletes the directory. Finishes with a command $(POSTOP) which
+defaults to a null command.
+
+=item    make dist
+
+Defaults to $(DIST_DEFAULT) which in turn defaults to tardist.
+
+=item    make uutardist
+
+Runs a tardist first and uuencodes the tarfile.
+
+=item    make shdist
+
+First does a distdir. Then a command $(PREOP) which defaults to a null
+command. Next it runs C<shar> on that directory into a sharfile and
+deletes the intermediate directory again. Finishes with a command
+$(POSTOP) which defaults to a null command.  Note: For shdist to work
+properly a C<shar> program that can handle directories is mandatory.
+
+=item    make zipdist
+
+First does a distdir. Then a command $(PREOP) which defaults to a null
+command. Runs C<$(ZIP) $(ZIPFLAGS)> on that directory into a
+zipfile. Then deletes that directory. Finishes with a command
+$(POSTOP) which defaults to a null command.
+
+=item    make ci
+
+Does a $(CI) and a $(RCS_LABEL) on all files in the MANIFEST file.
+
+=back
+
+Customization of the dist targets can be done by specifying a hash
+reference to the dist attribute of the WriteMakefile call. The
+following parameters are recognized:
+
+    CI           ('ci -u')
+    COMPRESS     ('gzip --best')
+    POSTOP       ('@ :')
+    PREOP        ('@ :')
+    TO_UNIX      (depends on the system)
+    RCS_LABEL    ('rcs -q -Nv$(VERSION_SYM):')
+    SHAR         ('shar')
+    SUFFIX       ('.gz')
+    TAR          ('tar')
+    TARFLAGS     ('cvf')
+    ZIP          ('zip')
+    ZIPFLAGS     ('-r')
+
+An example:
+
+    WriteMakefile( 'dist' => { COMPRESS=>"bzip2", SUFFIX=>".bz2" })
+
+
+=head2 Module Meta-Data
+
+Long plaguing users of MakeMaker based modules has been the problem of
+getting basic information about the module out of the sources
+I<without> running the F<Makefile.PL> and doing a bunch of messy
+heuristics on the resulting F<Makefile>.  To this end a simple module
+meta-data file has been introduced, F<META.yml>.
+
+F<META.yml> is a YAML document (see http://www.yaml.org) containing
+basic information about the module (name, version, prerequisites...)
+in an easy to read format.  The format is developed and defined by the
+Module::Build developers (see 
+http://module-build.sourceforge.net/META-spec.html)
+
+MakeMaker will automatically generate a F<META.yml> file for you and
+add it to your F<MANIFEST> as part of the 'distdir' target (and thus
+the 'dist' target).  This is intended to seamlessly and rapidly
+populate CPAN with module meta-data.  If you wish to shut this feature
+off, set the C<NO_META> C<WriteMakefile()> flag to true.
+
+
+=head2 Disabling an extension
+
+If some events detected in F<Makefile.PL> imply that there is no way
+to create the Module, but this is a normal state of things, then you
+can create a F<Makefile> which does nothing, but succeeds on all the
+"usual" build targets.  To do so, use
+
+   ExtUtils::MakeMaker::WriteEmptyMakefile();
+
+instead of WriteMakefile().
+
+This may be useful if other modules expect this module to be I<built>
+OK, as opposed to I<work> OK (say, this system-dependent module builds
+in a subdirectory of some other distribution, or is listed as a
+dependency in a CPAN::Bundle, but the functionality is supported by
+different means on the current architecture).
+
+=head2 Other Handy Functions
+
+=over 4
+
+=item prompt
+
+    my $value = prompt($message);
+    my $value = prompt($message, $default);
+
+The C<prompt()> function provides an easy way to request user input
+used to write a makefile.  It displays the $message as a prompt for
+input.  If a $default is provided it will be used as a default.  The
+function returns the $value selected by the user.
+
+If C<prompt()> detects that it is not running interactively and there
+is nothing on STDIN or if the PERL_MM_USE_DEFAULT environment variable
+is set to true, the $default will be used without prompting.  This
+prevents automated processes from blocking on user input. 
+
+If no $default is provided an empty string will be used instead.
+
+=back
+
+
+=head1 ENVIRONMENT
+
+=over 4
+
+=item PERL_MM_OPT
+
+Command line options used by C<MakeMaker-E<gt>new()>, and thus by
+C<WriteMakefile()>.  The string is split on whitespace, and the result
+is processed before any actual command line arguments are processed.
+
+=item PERL_MM_USE_DEFAULT
+
+If set to a true value then MakeMaker's prompt function will
+always return the default without waiting for user input.
+
+=back
+
+=head1 SEE ALSO
+
+ExtUtils::MM_Unix, ExtUtils::Manifest ExtUtils::Install,
+ExtUtils::Embed
+
+=head1 AUTHORS
+
+Andy Dougherty <F<doughera@lafayette.edu>>, Andreas KE<ouml>nig
+<F<andreas.koenig@mind.de>>, Tim Bunce <F<timb@cpan.org>>.  VMS
+support by Charles Bailey <F<bailey@newman.upenn.edu>>.  OS/2 support
+by Ilya Zakharevich <F<ilya@math.ohio-state.edu>>.
+
+Currently maintained by Michael G Schwern <F<schwern@pobox.com>>
+
+Send patches and ideas to <F<makemaker@perl.org>>.
+
+Send bug reports via http://rt.cpan.org/.  Please send your
+generated Makefile along with your report.
+
+For more up-to-date information, see http://www.makemaker.org.
+
+=head1 LICENSE
+
+This program is free software; you can redistribute it and/or 
+modify it under the same terms as Perl itself.
+
+See F<http://www.perl.com/perl/misc/Artistic.html>
+
+
+=cut