From: Rafael Garcia-Suarez Date: Fri, 20 May 2005 10:49:03 +0000 (+0000) Subject: Upgrade to MakeMaker 6.29 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=41e5fcb0a3c28c92c13b25bc869395d47115a518;p=p5sagit%2Fp5-mst-13.2.git Upgrade to MakeMaker 6.29 p4raw-id: //depot/perl@24510 --- diff --git a/MANIFEST b/MANIFEST index 4d06ca1..1750634 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1387,6 +1387,7 @@ lib/ExtUtils/t/Constant.t See if ExtUtils::Constant works lib/ExtUtils/t/dir_target.t Verify if dir_target() is supported lib/ExtUtils/t/Embed.t See if ExtUtils::Embed and embedding works lib/ExtUtils/testlib.pm Fixes up @INC to use just-built extension +lib/ExtUtils/t/FIRST_MAKEFILE.t See if FIRST_MAKEFILE works lib/ExtUtils/t/hints.t See if hint files are honored. lib/ExtUtils/t/installbase.t Test INSTALLBASE in MakeMaker lib/ExtUtils/t/Installed.t See if ExtUtils::Installed works diff --git a/lib/ExtUtils/Changes b/lib/ExtUtils/Changes index 230ea65..60de6f5 100644 --- a/lib/ExtUtils/Changes +++ b/lib/ExtUtils/Changes @@ -1,3 +1,11 @@ +6.29 Thu May 19 14:15:21 PDT 2005 + * The behavior of PL_FILES is restored to its pre-6.26 behavior as several + CPAN modules depend on this. PL programs run via PL_FILES have + INST_LIB and INST_ARCH in their @INC and so can load any just built + modules. + - Now honors PERL_CORE environment variable. + - Testing to ensure FIRST_MAKEFILE is honored. + 6.28 Tue Apr 12 16:17:07 PDT 2005 - Fix realclean so it cleans up files installed from ext/ in the core - Fix dir_target() so it doesn't warn should any of the INST_* paths diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 34fec38..d8f0564 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -20,7 +20,7 @@ use vars qw($VERSION @ISA use ExtUtils::MakeMaker qw($Verbose neatvalue); -$VERSION = '1.48'; +$VERSION = '1.49'; require ExtUtils::MM_Any; @ISA = qw(ExtUtils::MM_Any); @@ -3051,8 +3051,8 @@ sub processPL { all :: %s $(NOECHO) $(NOOP) -%s :: %s - $(PERLRUN) %s %s +%s :: %s pm_to_blib + $(PERLRUNINST) %s %s MAKE_FRAG } diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm index 5e7f8e5..4998c74 100644 --- a/lib/ExtUtils/MM_Win32.pm +++ b/lib/ExtUtils/MM_Win32.pm @@ -29,7 +29,7 @@ use vars qw(@ISA $VERSION $BORLAND $GCC $DMAKE $NMAKE); require ExtUtils::MM_Any; require ExtUtils::MM_Unix; @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -$VERSION = '1.11'; +$VERSION = '1.12'; $ENV{EMXSHELL} = 'sh'; # to run `commands` diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index a02b259..6bea8cf 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -1,4 +1,4 @@ -# $Id: $ +# $Id: /local/schwern.org/CPAN/ExtUtils-MakeMaker/trunk/lib/ExtUtils/MakeMaker.pm 4531 2005-05-19T21:18:53.053398Z schwern $ package ExtUtils::MakeMaker; BEGIN {require 5.005_03;} @@ -21,8 +21,8 @@ use vars qw( use vars qw($Revision); use strict; -$VERSION = '6.28'; -($Revision = q$Revision: 4409 $) =~ /Revision:\s+(\S+)/; +$VERSION = '6.29'; +($Revision = q$Revision: 4531 $) =~ /Revision:\s+(\S+)/; @ISA = qw(Exporter); @EXPORT = qw(&WriteMakefile &writeMakefile $Verbose &prompt); @@ -1883,7 +1883,7 @@ This behavior can be overridden by supplying your own set of files to search. PL_FILES accepts a hash ref, the key being the file to run and the value is passed in as the first argument when the PL file is run. - PL_FILES => {'bin/foobar.PL' => 'bin/foobar'} + PL_FILES => {'bin/foobar.PL' => 'bin/foobar'} Would run bin/foobar.PL like this: @@ -1891,13 +1891,16 @@ Would run bin/foobar.PL like this: If multiple files from one program are desired an array ref can be used. - PL_FILES => {'bin/foobar.PL' => [qw(bin/foobar1 bin/foobar2)]} + PL_FILES => {'bin/foobar.PL' => [qw(bin/foobar1 bin/foobar2)]} In this case the program will be run multiple times using each target file. perl bin/foobar.PL bin/foobar1 perl bin/foobar.PL bin/foobar2 +PL files are run B pm_to_blib and include INST_LIB and INST_ARCH +in its C<@INC> so the just built modules can be accessed. + =item PM @@ -2083,7 +2086,7 @@ MakeMaker object. The following lines will be parsed o.k.: $VERSION = '1.00'; *VERSION = \'1.01'; - $VERSION = sprintf "%d.%03d", q$Revision: 4409 $ =~ /(\d+)/g; + $VERSION = sprintf "%d.%03d", q$Revision: 4531 $ =~ /(\d+)/g; $FOO::VERSION = '1.10'; *FOO::VERSION = \'1.11'; our $VERSION = 1.2.3; # new for perl5.6.0 @@ -2474,6 +2477,10 @@ is processed before any actual command line arguments are processed. If set to a true value then MakeMaker's prompt function will always return the default without waiting for user input. +=item PERL_CORE + +Same as the PERL_CORE parameter. The parameter overrides this. + =back =head1 SEE ALSO diff --git a/lib/ExtUtils/t/FIRST_MAKEFILE.t b/lib/ExtUtils/t/FIRST_MAKEFILE.t new file mode 100644 index 0000000..320f8af --- /dev/null +++ b/lib/ExtUtils/t/FIRST_MAKEFILE.t @@ -0,0 +1,38 @@ +BEGIN { + if( $ENV{PERL_CORE} ) { + chdir 't' if -d 't'; + @INC = ('../lib', 'lib'); + } + else { + unshift @INC, 't/lib'; + } +} +chdir 't'; + +use strict; +use Test::More 'no_plan'; + +use MakeMaker::Test::Setup::BFD; +use MakeMaker::Test::Utils; + +my $perl = which_perl(); +my $make = make_run(); +perl_lib(); + + +ok( setup_recurs(), 'setup' ); +END { + ok( chdir File::Spec->updir ); + ok( teardown_recurs(), 'teardown' ); +} + +ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy" ) || + diag("chdir failed: $!"); + +my @mpl_out = run(qq{$perl Makefile.PL FIRST_MAKEFILE=jakefile}); +cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || diag @mpl_out; + +ok( -e 'jakefile', 'FIRST_MAKEFILE honored' ); + +ok( grep(/^Writing jakefile for Big::Dummy/, @mpl_out) == 1, + 'Makefile.PL output looks right' ); diff --git a/lib/ExtUtils/t/Installed.t b/lib/ExtUtils/t/Installed.t index 5bdb7bf..ba35deb 100644 --- a/lib/ExtUtils/t/Installed.t +++ b/lib/ExtUtils/t/Installed.t @@ -32,21 +32,21 @@ my $ei = bless( {}, 'ExtUtils::Installed' ); # _is_prefix ok( $ei->_is_prefix('foo/bar', 'foo'), - '_is_prefix() should match valid path prefix' ); + '_is_prefix() should match valid path prefix' ); ok( !$ei->_is_prefix('\foo\bar', '\bar'), - '... should not match wrong prefix' ); + '... should not match wrong prefix' ); # _is_type ok( $ei->_is_type(0, 'all'), '_is_type() should be true for type of "all"' ); foreach my $path (qw( man1dir man3dir )) { -SKIP: { - my $dir = $Config{$path.'exp'}; + SKIP: { + my $dir = $Config{$path.'exp'}; skip("no man directory $path on this system", 2 ) unless $dir; - my $file = $dir . '/foo'; - ok( $ei->_is_type($file, 'doc'), "... should find doc file in $path" ); - ok( !$ei->_is_type($file, 'prog'), "... but not prog file in $path" ); + my $file = $dir . '/foo'; + ok( $ei->_is_type($file, 'doc'), "... should find doc file in $path" ); + ok( !$ei->_is_type($file, 'prog'), "... but not prog file in $path" ); } } @@ -61,16 +61,16 @@ $prefix = VMS::Filespec::unixify($prefix) if $Is_VMS; $prefix = $Config{prefix} if $prefix eq 'p:' && $^O eq 'MSWin32'; ok( $ei->_is_type( File::Spec->catfile($prefix, 'bar'), 'prog'), - "... should find prog file under $prefix" ); + "... should find prog file under $prefix" ); SKIP: { - skip('no man directories on this system', 1) unless $mandirs; - is( $ei->_is_type('bar', 'doc'), 0, - '... should not find doc file outside path' ); + skip('no man directories on this system', 1) unless $mandirs; + is( $ei->_is_type('bar', 'doc'), 0, + '... should not find doc file outside path' ); } ok( !$ei->_is_type('bar', 'prog'), - '... nor prog file outside path' ); + '... nor prog file outside path' ); ok( !$ei->_is_type('whocares', 'someother'), '... nor other type anywhere' ); # _is_under @@ -106,36 +106,36 @@ close FAKEMOD; my $fake_mod_dir = File::Spec->catdir(cwd(), 'auto', 'FakeMod'); %ExtUtils::Installed::Config = ( %Config, - archlibexp => cwd(), - sitearchexp => $fake_mod_dir, + archlibexp => cwd(), + sitearchexp => $fake_mod_dir, ); - # necessary to fool new() - push @INC, $fake_mod_dir; + # necessary to fool new() + push @INC, $fake_mod_dir; - my $realei = ExtUtils::Installed->new(); + my $realei = ExtUtils::Installed->new(); isa_ok( $realei, 'ExtUtils::Installed' ); isa_ok( $realei->{Perl}{packlist}, 'ExtUtils::Packlist' ); is( $realei->{Perl}{version}, $Config{version}, 'new() should set Perl version from %Config' ); - ok( exists $realei->{FakeMod}, 'new() should find modules with .packlists'); - isa_ok( $realei->{FakeMod}{packlist}, 'ExtUtils::Packlist' ); - is( $realei->{FakeMod}{version}, '1.1.1', - '... should find version in modules' ); + ok( exists $realei->{FakeMod}, 'new() should find modules with .packlists'); + isa_ok( $realei->{FakeMod}{packlist}, 'ExtUtils::Packlist' ); + is( $realei->{FakeMod}{version}, '1.1.1', + '... should find version in modules' ); } # modules $ei->{$_} = 1 for qw( abc def ghi ); is( join(' ', $ei->modules()), 'abc def ghi', - 'modules() should return sorted keys' ); + 'modules() should return sorted keys' ); # This didn't work for a long time due to a sort in scalar context oddity. is( $ei->modules, 3, 'modules() in scalar context' ); # files $ei->{goodmod} = { - packlist => { + packlist => { ($Config{man1direxp} ? (File::Spec->catdir($Config{man1direxp}, 'foo') => 1) : ()), @@ -143,8 +143,8 @@ $ei->{goodmod} = { (File::Spec->catdir($Config{man3direxp}, 'bar') => 1) : ()), File::Spec->catdir($prefix, 'foobar') => 1, - foobaz => 1, - }, + foobaz => 1, + }, }; eval { $ei->files('badmod') }; @@ -206,37 +206,37 @@ SKIP: { my $fakepak = Fakepak->new(102); $ei->{yesmod} = { - version => 101, - packlist => $fakepak, + version => 101, + packlist => $fakepak, }; # these should all croak foreach my $sub (qw( validate packlist version )) { - eval { $ei->$sub('nomod') }; - like( $@, qr/nomod is not installed/, - "$sub() should croak when asked about uninstalled module" ); + eval { $ei->$sub('nomod') }; + like( $@, qr/nomod is not installed/, + "$sub() should croak when asked about uninstalled module" ); } # validate is( $ei->validate('yesmod'), 'validated', - 'validate() should return results of packlist validate() call' ); + 'validate() should return results of packlist validate() call' ); # packlist is( ${ $ei->packlist('yesmod') }, 102, - 'packlist() should report installed mod packlist' ); + 'packlist() should report installed mod packlist' ); # version is( $ei->version('yesmod'), 101, - 'version() should report installed mod version' ); + 'version() should report installed mod version' ); package Fakepak; sub new { - my $class = shift; - bless(\(my $scalar = shift), $class); + my $class = shift; + bless(\(my $scalar = shift), $class); } sub validate { - 'validated' + return 'validated' }