Re: [ID 20000121.007] XXX documentation in man ExtUtils::MakeMaker
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / MakeMaker.pm
index 7afa4f3..c8c559c 100644 (file)
@@ -2,7 +2,7 @@ BEGIN {require 5.002;} # MakeMaker 5.17 was the last MakeMaker that was compatib
 
 package ExtUtils::MakeMaker;
 
-$VERSION = "5.4302";
+$VERSION = "5.45";
 $Version_OK = "5.17";  # Makefiles older than $Version_OK will die
                        # (Will be checked from MakeMaker version 4.13 onwards)
 ($Revision = substr(q$Revision: 1.222 $, 10)) =~ s/\s+$//;
@@ -17,7 +17,7 @@ use Carp ();
 use vars qw(
 
            @ISA @EXPORT @EXPORT_OK $AUTOLOAD
-           $ISA_TTY $Is_Mac $Is_OS2 $Is_VMS $Revision $Setup_done
+           $ISA_TTY $Is_Mac $Is_OS2 $Is_VMS $Revision
            $VERSION $Verbose $Version_OK %Config %Keep_after_flush
            %MM_Sections %Prepend_dot_dot %Recognized_Att_Keys
            @Get_from_Config @MM_Sections @Overridable @Parent
@@ -70,7 +70,7 @@ $Is_VMS   = $^O eq 'VMS';
 $Is_OS2   = $^O eq 'os2';
 $Is_Mac   = $^O eq 'MacOS';
 $Is_Win32 = $^O eq 'MSWin32';
-$Is_Cygwin= $^O =~ /cygwin/i;
+$Is_Cygwin= $^O eq 'cygwin';
 
 require ExtUtils::MM_Unix;
 
@@ -82,7 +82,7 @@ if ($Is_OS2) {
     require ExtUtils::MM_OS2;
 }
 if ($Is_Mac) {
-    require ExtUtils::MM_Mac;
+    require ExtUtils::MM_MacOS;
 }
 if ($Is_Win32) {
     require ExtUtils::MM_Win32;
@@ -91,35 +91,11 @@ if ($Is_Cygwin) {
     require ExtUtils::MM_Cygwin;
 }
 
-# The SelfLoader would bring a lot of overhead for MakeMaker, because
-# we know for sure we will use most of the autoloaded functions once
-# we have to use one of them. So we write our own loader
-
-sub AUTOLOAD {
-    my $code;
-    if (defined fileno(DATA)) {
-       my $fh = select DATA;
-       my $o = $/;                     # For future reads from the file.
-       $/ = "\n__END__\n";
-       $code = <DATA>;
-       $/ = $o;
-       select $fh;
-       close DATA;
-       eval $code;
-       if ($@) {
-           $@ =~ s/ at .*\n//;
-           Carp::croak $@;
-       }
-    } else {
-       warn "AUTOLOAD called unexpectedly for $AUTOLOAD"; 
-    }
-    defined(&$AUTOLOAD) or die "Myloader inconsistency error";
-    goto &$AUTOLOAD;
-}
+full_setup();
 
-# The only subroutine we do not SelfLoad is Version_Check because it's
-# called so often. Loading this minimum still requires 1.2 secs on my
-# Indy :-(
+# The use of the Version_check target has been dropped between perl
+# 5.5.63 and 5.5.64. We must keep the subroutine for a while so that
+# old Makefiles can satisfy the Version_check target.
 
 sub Version_check {
     my($checkversion) = @_;
@@ -140,38 +116,10 @@ sub warnhandler {
     warn @_;
 }
 
-sub ExtUtils::MakeMaker::eval_in_subdirs ;
-sub ExtUtils::MakeMaker::eval_in_x ;
-sub ExtUtils::MakeMaker::full_setup ;
-sub ExtUtils::MakeMaker::writeMakefile ;
-sub ExtUtils::MakeMaker::new ;
-sub ExtUtils::MakeMaker::check_manifest ;
-sub ExtUtils::MakeMaker::parse_args ;
-sub ExtUtils::MakeMaker::check_hints ;
-sub ExtUtils::MakeMaker::mv_all_methods ;
-sub ExtUtils::MakeMaker::skipcheck ;
-sub ExtUtils::MakeMaker::flush ;
-sub ExtUtils::MakeMaker::mkbootstrap ;
-sub ExtUtils::MakeMaker::mksymlists ;
-sub ExtUtils::MakeMaker::neatvalue ;
-sub ExtUtils::MakeMaker::selfdocument ;
-sub ExtUtils::MakeMaker::WriteMakefile ;
-sub ExtUtils::MakeMaker::prompt ($;$) ;
-
-1;
-
-__DATA__
-
-package ExtUtils::MakeMaker;
-
 sub WriteMakefile {
     Carp::croak "WriteMakefile: Need even number of args" if @_ % 2;
     local $SIG{__WARN__} = \&warnhandler;
 
-    unless ($Setup_done++){
-       full_setup();
-       undef &ExtUtils::MakeMaker::full_setup; #safe memory
-    }
     my %att = @_;
     MM->new(\%att)->flush;
 }
@@ -232,7 +180,6 @@ sub eval_in_x {
 
 sub full_setup {
     $Verbose ||= 0;
-    $^W=1;
 
     # package name for the classes into which the first object will be blessed
     $PACKNAME = "PACK000";
@@ -242,7 +189,7 @@ sub full_setup {
     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 FUNCLIST H 
-    HTMLLIBPODS HTMLSCRIPTPOD IMPORTS
+    HTMLLIBPODS HTMLSCRIPTPODS IMPORTS
     INC INCLUDE_EXT INSTALLARCHLIB INSTALLBIN INSTALLDIRS INSTALLHTMLPRIVLIBDIR
     INSTALLHTMLSCRIPTDIR INSTALLHTMLSITELIBDIR INSTALLMAN1DIR
     INSTALLMAN3DIR INSTALLPRIVLIB INSTALLSCRIPT INSTALLSITEARCH
@@ -312,7 +259,8 @@ sub full_setup {
     @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
+          lib_ext obj_ext osname osvers ranlib sitelibexp sitearchexp so
+          exe_ext full_ar
          );
 
     my $item;
@@ -388,7 +336,7 @@ sub ExtUtils::MakeMaker::new {
        if ($@) {
            warn "Warning: prerequisite $prereq failed to load: $@";
        }
-       else if ($prereq->VERSION < $self->{PREREQ_PM}->{$prereq} ){
+       elsif ($prereq->VERSION < $self->{PREREQ_PM}->{$prereq} ){
            warn "Warning: prerequisite $prereq $self->{PREREQ_PM}->{$prereq} not found";
 # Why is/was this 'delete' here?  We need PREREQ_PM later to make PPDs.
 #      } else {
@@ -1046,8 +994,8 @@ $Config{install*} values.
 
 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 
-XXX
+PREFIX and the various INSTALL* arguments are resolved such that 
+INSTALL* takes precedence.
 
 If the user has superuser privileges, and is not working on AFS
 (Andrew File System) or relatives, then the defaults for