From: Rafael Garcia-Suarez Date: Sun, 9 Dec 2007 00:18:32 +0000 (+0000) Subject: Upgrade to ExtUtils::MakeMaker 6.42 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6d6be53e5cf68dd14a1fce5f754d4f875bdaba05;hp=44ddc0720838c134bcecfee722279a483a169b18;p=p5sagit%2Fp5-mst-13.2.git Upgrade to ExtUtils::MakeMaker 6.42 p4raw-id: //depot/perl@32600 --- diff --git a/MANIFEST b/MANIFEST index 1057739..810f749 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1805,6 +1805,7 @@ lib/ExtUtils/t/INST_PREFIX.t See if MakeMaker can apply PREFIXs lib/ExtUtils/t/INST.t Check MakeMaker INST_* macros lib/ExtUtils/t/Liblist.t See if ExtUtils::Liblist works lib/ExtUtils/t/make.t See if make detection works +lib/ExtUtils/t/maketext_filter.t See if maketext_filter works lib/ExtUtils/t/Manifest.t See if ExtUtils::Manifest works lib/ExtUtils/t/Mkbootstrap.t See if ExtUtils::Mkbootstrap works lib/ExtUtils/t/MM_Any.t See if ExtUtils::MM_Any works diff --git a/lib/ExtUtils/Changes b/lib/ExtUtils/Changes index badf5bf..c4c37c8 100644 --- a/lib/ExtUtils/Changes +++ b/lib/ExtUtils/Changes @@ -1,3 +1,13 @@ +6.42 Fri Dec 7 17:00:14 PST 2007 + Bug Fixes + - 6.33 moved PREREQ_FATAL to happen after CONFIGURE. This meant if + your CONFIGURE use a prereq it would fail and no PREREQ_FATAL + message would be displayed. + - Put the "nicetext" functionality back, VMS needs it to deal with + other people's custom make. But rename it to the more + accurate maketext_filter(), test it and fix a bug where it would + stop processing if it saw a macro declaration. + 6.40 Thu Dec 6 03:00:47 PST 2007 Bug Fixes - Remove the dubious nicetext() Makefile formatting hack to account for diff --git a/lib/ExtUtils/Command/MM.pm b/lib/ExtUtils/Command/MM.pm index 3f71319..48a66ce 100644 --- a/lib/ExtUtils/Command/MM.pm +++ b/lib/ExtUtils/Command/MM.pm @@ -9,7 +9,7 @@ use vars qw($VERSION @ISA @EXPORT); @EXPORT = qw(test_harness pod2man perllocal_install uninstall warn_if_old_packlist); -$VERSION = '6.40'; +$VERSION = '6.42'; my $Is_VMS = $^O eq 'VMS'; diff --git a/lib/ExtUtils/Liblist.pm b/lib/ExtUtils/Liblist.pm index c31f7aa..2991149 100644 --- a/lib/ExtUtils/Liblist.pm +++ b/lib/ExtUtils/Liblist.pm @@ -3,7 +3,7 @@ package ExtUtils::Liblist; use strict; use vars qw($VERSION @ISA); -$VERSION = '6.40'; +$VERSION = '6.42'; use File::Spec; require ExtUtils::Liblist::Kid; diff --git a/lib/ExtUtils/Liblist/Kid.pm b/lib/ExtUtils/Liblist/Kid.pm index e4d792a..bef182b 100644 --- a/lib/ExtUtils/Liblist/Kid.pm +++ b/lib/ExtUtils/Liblist/Kid.pm @@ -10,7 +10,7 @@ use 5.00503; use strict; use vars qw($VERSION); -$VERSION = 6.40; +$VERSION = 6.42; use Config; use Cwd 'cwd'; diff --git a/lib/ExtUtils/MM.pm b/lib/ExtUtils/MM.pm index 5c72278..546b76d 100644 --- a/lib/ExtUtils/MM.pm +++ b/lib/ExtUtils/MM.pm @@ -3,7 +3,7 @@ package ExtUtils::MM; use strict; use ExtUtils::MakeMaker::Config; use vars qw(@ISA $VERSION); -$VERSION = '6.40'; +$VERSION = '6.42'; require ExtUtils::Liblist; require ExtUtils::MakeMaker; diff --git a/lib/ExtUtils/MM_AIX.pm b/lib/ExtUtils/MM_AIX.pm index c45ad11..f847303 100644 --- a/lib/ExtUtils/MM_AIX.pm +++ b/lib/ExtUtils/MM_AIX.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_AIX; use strict; use vars qw($VERSION @ISA); -$VERSION = '6.40'; +$VERSION = '6.42'; require ExtUtils::MM_Unix; @ISA = qw(ExtUtils::MM_Unix); diff --git a/lib/ExtUtils/MM_Any.pm b/lib/ExtUtils/MM_Any.pm index 7c12b4f..b3d0d0f 100644 --- a/lib/ExtUtils/MM_Any.pm +++ b/lib/ExtUtils/MM_Any.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_Any; use strict; use vars qw($VERSION @ISA); -$VERSION = '6.40'; +$VERSION = '6.42'; use Carp; use File::Spec; @@ -236,6 +236,24 @@ sub wraplist { } +=head3 maketext_filter + + my $filter_make_text = $mm->maketext_filter($make_text); + +The text of the Makefile is run through this method before writing to +disk. It allows systems a chance to make portability fixes to the +Makefile. + +By default it does nothing. + +This method is protected and not intended to be called outside of +MakeMaker. + +=cut + +sub maketext_filter { return $_[1] } + + =head3 cd I my $subdir_cmd = $MM->cd($subdir, @cmds); diff --git a/lib/ExtUtils/MM_BeOS.pm b/lib/ExtUtils/MM_BeOS.pm index ffaa021..d7812b3 100644 --- a/lib/ExtUtils/MM_BeOS.pm +++ b/lib/ExtUtils/MM_BeOS.pm @@ -27,7 +27,7 @@ require ExtUtils::MM_Unix; use vars qw(@ISA $VERSION); @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -$VERSION = '6.40'; +$VERSION = '6.42'; =item os_flavor diff --git a/lib/ExtUtils/MM_Cygwin.pm b/lib/ExtUtils/MM_Cygwin.pm index bec9fcb..ca4d58d 100644 --- a/lib/ExtUtils/MM_Cygwin.pm +++ b/lib/ExtUtils/MM_Cygwin.pm @@ -10,7 +10,7 @@ require ExtUtils::MM_Any; require ExtUtils::MM_Unix; @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -$VERSION = '6.40'; +$VERSION = '6.42'; =head1 NAME diff --git a/lib/ExtUtils/MM_DOS.pm b/lib/ExtUtils/MM_DOS.pm index 963cc8e..f47a72d 100644 --- a/lib/ExtUtils/MM_DOS.pm +++ b/lib/ExtUtils/MM_DOS.pm @@ -3,7 +3,7 @@ package ExtUtils::MM_DOS; use strict; use vars qw($VERSION @ISA); -$VERSION = 6.40; +$VERSION = 6.42; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; diff --git a/lib/ExtUtils/MM_MacOS.pm b/lib/ExtUtils/MM_MacOS.pm index 1330dd6..32d5ffe 100644 --- a/lib/ExtUtils/MM_MacOS.pm +++ b/lib/ExtUtils/MM_MacOS.pm @@ -3,7 +3,7 @@ package ExtUtils::MM_MacOS; use strict; use vars qw($VERSION); -$VERSION = 6.40; +$VERSION = 6.42; sub new { die <<'UNSUPPORTED'; diff --git a/lib/ExtUtils/MM_NW5.pm b/lib/ExtUtils/MM_NW5.pm index d5bbb75..222008a 100644 --- a/lib/ExtUtils/MM_NW5.pm +++ b/lib/ExtUtils/MM_NW5.pm @@ -23,7 +23,7 @@ use ExtUtils::MakeMaker::Config; use File::Basename; use vars qw(@ISA $VERSION); -$VERSION = '6.40'; +$VERSION = '6.42'; require ExtUtils::MM_Win32; @ISA = qw(ExtUtils::MM_Win32); diff --git a/lib/ExtUtils/MM_OS2.pm b/lib/ExtUtils/MM_OS2.pm index 354f17b..7d14ac7 100644 --- a/lib/ExtUtils/MM_OS2.pm +++ b/lib/ExtUtils/MM_OS2.pm @@ -6,7 +6,7 @@ use vars qw($VERSION @ISA); use ExtUtils::MakeMaker qw(neatvalue); use File::Spec; -$VERSION = '6.40'; +$VERSION = '6.42'; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; diff --git a/lib/ExtUtils/MM_QNX.pm b/lib/ExtUtils/MM_QNX.pm index c6bfd9e..98009bf 100644 --- a/lib/ExtUtils/MM_QNX.pm +++ b/lib/ExtUtils/MM_QNX.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_QNX; use strict; use vars qw($VERSION @ISA); -$VERSION = '6.40'; +$VERSION = '6.42'; require ExtUtils::MM_Unix; @ISA = qw(ExtUtils::MM_Unix); diff --git a/lib/ExtUtils/MM_UWIN.pm b/lib/ExtUtils/MM_UWIN.pm index 8d41325..6be7930 100644 --- a/lib/ExtUtils/MM_UWIN.pm +++ b/lib/ExtUtils/MM_UWIN.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_UWIN; use strict; use vars qw($VERSION @ISA); -$VERSION = 6.40; +$VERSION = 6.42; require ExtUtils::MM_Unix; @ISA = qw(ExtUtils::MM_Unix); diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 8107535..2960572 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -18,7 +18,7 @@ use vars qw($VERSION @ISA use ExtUtils::MakeMaker qw($Verbose neatvalue); -$VERSION = '6.40'; +$VERSION = '6.42'; require ExtUtils::MM_Any; @ISA = qw(ExtUtils::MM_Any); diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm index 65ace84..3b47470 100644 --- a/lib/ExtUtils/MM_VMS.pm +++ b/lib/ExtUtils/MM_VMS.pm @@ -18,7 +18,7 @@ use File::Basename; # $Revision can't be on the same line or SVN/K gets confused use vars qw($Revision $VERSION @ISA); -$VERSION = '6.40'; +$VERSION = '6.42'; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; @@ -1572,6 +1572,22 @@ map_clean : join '', @m; } +# --- Output postprocessing section --- + +=item maketext_filter (override) + +Insure that colons marking targets are preceded by space, in order +to distinguish the target delimiter from a colon appearing as +part of a filespec. + +=cut + +sub maketext_filter { + my($self, $text) = @_; + + $text =~ s/^([^\s:=]+)(:+\s)/$1 $2/mg; + return $text; +} =item prefixify (override) diff --git a/lib/ExtUtils/MM_VOS.pm b/lib/ExtUtils/MM_VOS.pm index 55e9d2d..171a8b7 100644 --- a/lib/ExtUtils/MM_VOS.pm +++ b/lib/ExtUtils/MM_VOS.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_VOS; use strict; use vars qw($VERSION @ISA); -$VERSION = '6.40'; +$VERSION = '6.42'; require ExtUtils::MM_Unix; @ISA = qw(ExtUtils::MM_Unix); diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm index 997829b..8975e31 100644 --- a/lib/ExtUtils/MM_Win32.pm +++ b/lib/ExtUtils/MM_Win32.pm @@ -29,7 +29,7 @@ use vars qw(@ISA $VERSION); require ExtUtils::MM_Any; require ExtUtils::MM_Unix; @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -$VERSION = '6.40'; +$VERSION = '6.42'; $ENV{EMXSHELL} = 'sh'; # to run `commands` diff --git a/lib/ExtUtils/MM_Win95.pm b/lib/ExtUtils/MM_Win95.pm index dc898e1..7dbdee6 100644 --- a/lib/ExtUtils/MM_Win95.pm +++ b/lib/ExtUtils/MM_Win95.pm @@ -3,7 +3,7 @@ package ExtUtils::MM_Win95; use strict; use vars qw($VERSION @ISA); -$VERSION = '6.40'; +$VERSION = '6.42'; require ExtUtils::MM_Win32; @ISA = qw(ExtUtils::MM_Win32); diff --git a/lib/ExtUtils/MY.pm b/lib/ExtUtils/MY.pm index 914d26d..d8de9aa 100644 --- a/lib/ExtUtils/MY.pm +++ b/lib/ExtUtils/MY.pm @@ -4,7 +4,7 @@ use strict; require ExtUtils::MM; use vars qw(@ISA $VERSION); -$VERSION = 6.40; +$VERSION = 6.42; @ISA = qw(ExtUtils::MM); { diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index 3694780..dd2e235 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -1,4 +1,4 @@ -# $Id: /local/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm 41130 2007-12-06T11:04:43.533533Z schwern $ +# $Id: /mirror/svn.schwern.org/CPAN/ExtUtils-MakeMaker/trunk/lib/ExtUtils/MakeMaker.pm 41145 2007-12-08T01:01:11.051959Z schwern $ package ExtUtils::MakeMaker; BEGIN {require 5.005_03;} @@ -21,8 +21,8 @@ use vars qw( use vars qw($Revision); use strict; -$VERSION = '6.40'; -($Revision) = q$Revision: 41130 $ =~ /Revision:\s+(\S+)/; +$VERSION = '6.42'; +($Revision) = q$Revision: 41145 $ =~ /Revision:\s+(\S+)/; @ISA = qw(Exporter); @EXPORT = qw(&WriteMakefile &writeMakefile $Verbose &prompt); @@ -425,6 +425,18 @@ sub new { $self->{PREREQ_PM}->{$prereq} : 'unknown version' ; } } + + if (%unsatisfied && $self->{PREREQ_FATAL}){ + my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"} + sort { $a cmp $b } keys %unsatisfied; + die <<"END"; +MakeMaker FATAL: prerequisites not found. +$failedprereqs + +Please install these modules first and rerun 'perl Makefile.PL'. +END + } + if (defined $self->{CONFIGURE}) { if (ref $self->{CONFIGURE} eq 'CODE') { %configure_att = %{&{$self->{CONFIGURE}}}; @@ -494,16 +506,6 @@ sub new { } else { parse_args($self,split(' ', $ENV{PERL_MM_OPT} || ''),@ARGV); } - if (%unsatisfied && $self->{PREREQ_FATAL}){ - my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"} - sort { $a cmp $b } keys %unsatisfied; - die <<"END"; -MakeMaker FATAL: prerequisites not found. -$failedprereqs - -Please install these modules first and rerun 'perl Makefile.PL'. -END - } $self->{NAME} ||= $self->guess_name; @@ -635,7 +637,9 @@ END my(%a) = %{$self->{$section} || {}}; push @{$self->{RESULT}}, "\n# --- MakeMaker $section section:"; push @{$self->{RESULT}}, "# " . join ", ", %a if $Verbose && %a; - push @{$self->{RESULT}}, $self->$method( %a ); + push @{$self->{RESULT}}, $self->maketext_filter( + $self->$method( %a ) + ); } } @@ -2188,7 +2192,7 @@ MakeMaker object. The following lines will be parsed o.k.: $VERSION = '1.00'; *VERSION = \'1.01'; - ($VERSION) = q$Revision: 41130 $ =~ /(\d+)/g; + ($VERSION) = q$Revision: 41145 $ =~ /(\d+)/g; $FOO::VERSION = '1.10'; *FOO::VERSION = \'1.11'; our $VERSION = 1.2.3; # new for perl5.6.0 diff --git a/lib/ExtUtils/MakeMaker/Config.pm b/lib/ExtUtils/MakeMaker/Config.pm index 523e1d8..65f9d47 100644 --- a/lib/ExtUtils/MakeMaker/Config.pm +++ b/lib/ExtUtils/MakeMaker/Config.pm @@ -1,6 +1,6 @@ package ExtUtils::MakeMaker::Config; -$VERSION = '6.40'; +$VERSION = '6.42'; use strict; use Config (); diff --git a/lib/ExtUtils/MakeMaker/bytes.pm b/lib/ExtUtils/MakeMaker/bytes.pm index 8097c37..41ae207 100644 --- a/lib/ExtUtils/MakeMaker/bytes.pm +++ b/lib/ExtUtils/MakeMaker/bytes.pm @@ -3,7 +3,7 @@ package ExtUtils::MakeMaker::bytes; use strict; use vars qw($VERSION); -$VERSION = 6.40; +$VERSION = 6.42; my $Have_Bytes = eval q{require bytes; 1;}; diff --git a/lib/ExtUtils/MakeMaker/vmsish.pm b/lib/ExtUtils/MakeMaker/vmsish.pm index b78864c..f3d0ac8 100644 --- a/lib/ExtUtils/MakeMaker/vmsish.pm +++ b/lib/ExtUtils/MakeMaker/vmsish.pm @@ -3,7 +3,7 @@ package ExtUtils::MakeMaker::vmsish; use strict; use vars qw($VERSION); -$VERSION = 6.40; +$VERSION = 6.42; my $IsVMS = $^O eq 'VMS'; diff --git a/lib/ExtUtils/Mkbootstrap.pm b/lib/ExtUtils/Mkbootstrap.pm index f1380de..b358709 100644 --- a/lib/ExtUtils/Mkbootstrap.pm +++ b/lib/ExtUtils/Mkbootstrap.pm @@ -4,7 +4,7 @@ package ExtUtils::Mkbootstrap; use strict 'refs'; use vars qw($VERSION @ISA @EXPORT); -$VERSION = '6.40'; +$VERSION = '6.42'; require Exporter; @ISA = ('Exporter'); diff --git a/lib/ExtUtils/Mksymlists.pm b/lib/ExtUtils/Mksymlists.pm index 4a4e8aa..49fd6b2 100644 --- a/lib/ExtUtils/Mksymlists.pm +++ b/lib/ExtUtils/Mksymlists.pm @@ -11,7 +11,7 @@ use Config; use vars qw(@ISA @EXPORT $VERSION); @ISA = 'Exporter'; @EXPORT = '&Mksymlists'; -$VERSION = '6.40'; +$VERSION = '6.42'; sub Mksymlists { my(%spec) = @_; diff --git a/lib/ExtUtils/t/maketext_filter.t b/lib/ExtUtils/t/maketext_filter.t new file mode 100644 index 0000000..ed3a44d --- /dev/null +++ b/lib/ExtUtils/t/maketext_filter.t @@ -0,0 +1,65 @@ +#!/usr/bin/perl -w + +BEGIN { + if( $ENV{PERL_CORE} ) { + chdir 't' if -d 't'; + @INC = '../lib'; + } + else { + unshift @INC, 't/lib'; + } +} +chdir 't'; + +use Test::More tests => 6; + +use ExtUtils::MakeMaker; +use ExtUtils::MM_VMS; + +sub test_filter { + my($text, $vms_text) = @_; + + local $Test::Builder::Level = $Test::Builder::Level + 1; + is( ExtUtils::MM_Any->maketext_filter($text), $text, 'default filter' ); + is( ExtUtils::MM_VMS->maketext_filter($text), $vms_text, 'VMS filter' ); +} + + +# VMS filter puts a space after the target +test_filter(<<'END', <<'VMS'); +foo: bar + thing: splat +END +foo : bar + thing: splat +VMS + + +# And it does it for all targets +test_filter(<<'END', <<'VMS'); +foo: bar + thing: splat + +up: down + yes +END +foo : bar + thing: splat + +up : down + yes +VMS + + +# And it doesn't mess with macros +test_filter(<<'END', <<'VMS'); +CLASS=Foo: Bar + +target: stuff + $(PROGRAM) And::Stuff +END +CLASS=Foo: Bar + +target : stuff + $(PROGRAM) And::Stuff +VMS diff --git a/lib/ExtUtils/t/prereq.t b/lib/ExtUtils/t/prereq.t index 486fee9..c690a55 100644 --- a/lib/ExtUtils/t/prereq.t +++ b/lib/ExtUtils/t/prereq.t @@ -14,7 +14,7 @@ BEGIN { } use strict; -use Test::More tests => 11; +use Test::More tests => 13; use TieOut; use MakeMaker::Test::Utils; @@ -107,4 +107,27 @@ MakeMaker FATAL: prerequisites not found. Please install these modules first and rerun 'perl Makefile.PL'. END + + $warnings = ''; + eval { + WriteMakefile( + NAME => 'Big::Dummy', + PREREQ_PM => { + "I::Do::Not::Exist" => 0, + }, + CONFIGURE => sub { + require I::Do::Not::Exist; + }, + PREREQ_FATAL => 1, + ); + }; + + is $warnings, ''; + is $@, <<'END', "PREREQ_FATAL happens before CONFIGURE"; +MakeMaker FATAL: prerequisites not found. + I::Do::Not::Exist not installed + +Please install these modules first and rerun 'perl Makefile.PL'. +END + } diff --git a/lib/ExtUtils/testlib.pm b/lib/ExtUtils/testlib.pm index 9608c02..972b1b9 100644 --- a/lib/ExtUtils/testlib.pm +++ b/lib/ExtUtils/testlib.pm @@ -3,7 +3,7 @@ package ExtUtils::testlib; use strict; use vars qw($VERSION); -$VERSION = 6.40; +$VERSION = 6.42; use Cwd; use File::Spec;