diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-18 08:34:00 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-18 08:34:00 +0000 |
commit | 2c91f887f15419ab4d5271c3d098f5e3c98ff314 (patch) | |
tree | 7bd1eca85e04951c7dabcce628846ec924445b98 /lib | |
parent | 33869856bc668ad896e517e1aa0c9d977d5b2676 (diff) | |
download | perl-2c91f887f15419ab4d5271c3d098f5e3c98ff314.tar.gz |
Upgrade to ExtUtils::MakeMaker 6.16.
p4raw-id: //depot/perl@20754
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ExtUtils/Changes | 11 | ||||
-rw-r--r-- | lib/ExtUtils/Installed.pm | 8 | ||||
-rw-r--r-- | lib/ExtUtils/MANIFEST.SKIP | 4 | ||||
-rw-r--r-- | lib/ExtUtils/META.yml | 4 | ||||
-rw-r--r-- | lib/ExtUtils/MM_Win32.pm | 4 | ||||
-rw-r--r-- | lib/ExtUtils/MM_Win95.pm | 13 | ||||
-rw-r--r-- | lib/ExtUtils/MakeMaker.pm | 12 | ||||
-rw-r--r-- | lib/ExtUtils/Manifest.pm | 11 | ||||
-rw-r--r-- | lib/ExtUtils/t/00setup_dummy.t | 3 | ||||
-rw-r--r-- | lib/ExtUtils/t/Manifest.t | 21 | ||||
-rw-r--r-- | lib/ExtUtils/t/prereq_print.t | 66 |
11 files changed, 125 insertions, 32 deletions
diff --git a/lib/ExtUtils/Changes b/lib/ExtUtils/Changes index f7d921610e..4e0ed06692 100644 --- a/lib/ExtUtils/Changes +++ b/lib/ExtUtils/Changes @@ -1,3 +1,14 @@ +6.16 Mon Aug 18 01:39:51 PDT 2003 + * Fixing the max exec length for Windows to account for old + versions of nmake (the one you can download for free from MS). + - Hack to normalize //foo//bar paths in ExtUtils::Installed. + [Sreeji K Das] + * Adding Module::Build utility files to MANIFEST.SKIP + - PREREQ_PRINT is supposed to exit after dumping. (Wolfgang Friebel + bleadperl@20530) + - maniadd() was trying to open the MANIFEST even if it didn't need to + causing unnecessary errors for read-only MANIFESTs (rt.cpan.org 3180) + 6.15 Sun Aug 3 16:41:05 PDT 2003 - Make FIXIN on Win32 use the new pl2bat rather than an already installed one when building the core (Mattia Barbon) diff --git a/lib/ExtUtils/Installed.pm b/lib/ExtUtils/Installed.pm index 619b14158a..8b0c53c481 100644 --- a/lib/ExtUtils/Installed.pm +++ b/lib/ExtUtils/Installed.pm @@ -16,7 +16,7 @@ my $DOSISH = ($^O =~ /^(MSWin\d\d|os2|dos|mint)$/); require VMS::Filespec if $Is_VMS; use vars qw($VERSION); -$VERSION = '0.07'; +$VERSION = '0.08'; sub _is_prefix { my ($self, $path, $prefix) = @_; @@ -26,8 +26,10 @@ sub _is_prefix { $prefix = VMS::Filespec::unixify($prefix); $path = VMS::Filespec::unixify($path); } - $prefix =~ m!/+! && $prefix =~ s!/+!/!g; - $path =~ m!/+! && $path =~ s!/+!/!g; + + # Sloppy Unix path normalization. + $prefix =~ s{/+}{/}g; + $path =~ s{/+}{/}g; return 1 if substr($path, 0, length($prefix)) eq $prefix; diff --git a/lib/ExtUtils/MANIFEST.SKIP b/lib/ExtUtils/MANIFEST.SKIP index a916b62a9d..41f89ae707 100644 --- a/lib/ExtUtils/MANIFEST.SKIP +++ b/lib/ExtUtils/MANIFEST.SKIP @@ -11,6 +11,10 @@ \bMakeMaker-\d \bpm_to_blib$ +# Avoid Module::Build generated and utility files. +\bBuild$ +\b_build/ + # Avoid temp and backup files. ~$ \.old$ diff --git a/lib/ExtUtils/META.yml b/lib/ExtUtils/META.yml index 0f08ff3627..c1ae878cd7 100644 --- a/lib/ExtUtils/META.yml +++ b/lib/ExtUtils/META.yml @@ -1,7 +1,7 @@ # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: ExtUtils-MakeMaker -version: 6.15 +version: 6.16 version_from: lib/ExtUtils/MakeMaker.pm installdirs: perl requires: @@ -11,4 +11,4 @@ requires: Pod::Man: 0 distribution_type: module -generated_by: ExtUtils::MakeMaker version 6.15 +generated_by: ExtUtils::MakeMaker version 6.16 diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm index d05c87054b..be9de22d26 100644 --- a/lib/ExtUtils/MM_Win32.pm +++ b/lib/ExtUtils/MM_Win32.pm @@ -490,14 +490,14 @@ sub escape_newlines { =item max_exec_len -Using 31K, a safe number gotten from Windows 2000. +nmake 1.50 limits command length to 2048 characters. =cut sub max_exec_len { my $self = shift; - return $self->{_MAX_EXEC_LEN} ||= 31 * 1024; + return $self->{_MAX_EXEC_LEN} ||= 2 * 1024; } diff --git a/lib/ExtUtils/MM_Win95.pm b/lib/ExtUtils/MM_Win95.pm index 47aef7f16b..e6e56239d9 100644 --- a/lib/ExtUtils/MM_Win95.pm +++ b/lib/ExtUtils/MM_Win95.pm @@ -192,19 +192,6 @@ RCLEAN } -=item max_exec_len - -Setting to 2500, a value obtained by experimentation. - -=cut - -sub max_exec_len { - my $self = shift; - - return $self->{_MAX_EXEC_LEN} ||= 2500; -} - - =item os_flavor Win95 and Win98 and WinME are collectively Win9x and Win32 diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index dbfc81a861..f9dade3f1b 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -2,8 +2,8 @@ package ExtUtils::MakeMaker; BEGIN {require 5.005_03;} -$VERSION = '6.15'; -($Revision) = q$Revision: 1.130 $ =~ /Revision:\s+(\S+)/; +$VERSION = '6.16'; +($Revision) = q$Revision: 1.131 $ =~ /Revision:\s+(\S+)/; require Exporter; use Config; @@ -359,7 +359,8 @@ sub new { # PRINT_PREREQ is RedHatism. if ("@ARGV" =~ /\bPRINT_PREREQ\b/) { - print join(" ", map { "perl($_)>=$self->{PREREQ_PM}->{$_} " } sort keys %{$self->{PREREQ_PM}}), "\n"; + print join(" ", map { "perl($_)>=$self->{PREREQ_PM}->{$_} " } + sort keys %{$self->{PREREQ_PM}}), "\n"; exit 0; } @@ -1966,7 +1967,8 @@ 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 +stdout and MakeMaker will exit. The output format is an evalable hash +ref. $PREREQ_PM = { 'A::B' => Vers1, @@ -2039,7 +2041,7 @@ MakeMaker object. The following lines will be parsed o.k.: $VERSION = '1.00'; *VERSION = \'1.01'; - $VERSION = sprintf "%d.%03d", q$Revision: 1.130 $ =~ /(\d+)/g; + $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 diff --git a/lib/ExtUtils/Manifest.pm b/lib/ExtUtils/Manifest.pm index 9965e5d92e..819e72cbc8 100644 --- a/lib/ExtUtils/Manifest.pm +++ b/lib/ExtUtils/Manifest.pm @@ -12,7 +12,7 @@ use vars qw($VERSION @ISA @EXPORT_OK $Is_MacOS $Is_VMS $Debug $Verbose $Quiet $MANIFEST $DEFAULT_MSKIP); -$VERSION = 1.39; +$VERSION = 1.41; @ISA=('Exporter'); @EXPORT_OK = qw(mkmanifest manicheck filecheck fullcheck skipcheck @@ -175,7 +175,7 @@ sub manifind { checks if all the files within a C<MANIFEST> in the current directory really do exist. If C<MANIFEST> and the tree below the current -directory are in sync it exits silently, returning an empty list. +directory are in sync it silently returns an empty list. Otherwise it returns a list of files which are listed in the C<MANIFEST> but missing from the directory, and by default also outputs these names to STDERR. @@ -539,14 +539,17 @@ sub maniadd { _fix_manifest($MANIFEST); my $manifest = maniread(); - open(MANIFEST, ">>$MANIFEST") or die "Could not open $MANIFEST: $!"; + my $is_open; foreach my $file (_sort keys %$additions) { next if exists $manifest->{$file}; + $is_open++ or open(MANIFEST, ">>$MANIFEST") or + die "Could not open $MANIFEST: $!"; + my $comment = $additions->{$file} || ''; printf MANIFEST "%-40s%s\n", $file, $comment; } - close MANIFEST; + close MANIFEST if $is_open; } diff --git a/lib/ExtUtils/t/00setup_dummy.t b/lib/ExtUtils/t/00setup_dummy.t index 2e6ea262cc..0b9e58d056 100644 --- a/lib/ExtUtils/t/00setup_dummy.t +++ b/lib/ExtUtils/t/00setup_dummy.t @@ -51,7 +51,8 @@ END 'Big-Dummy/Makefile.PL' => <<'END', use ExtUtils::MakeMaker; -printf "Current package is: %s\n", __PACKAGE__; +# This will interfere with the PREREQ_PRINT tests. +printf "Current package is: %s\n", __PACKAGE__ unless "@ARGV" =~ /PREREQ/; WriteMakefile( NAME => 'Big::Dummy', diff --git a/lib/ExtUtils/t/Manifest.t b/lib/ExtUtils/t/Manifest.t index 0bea89ba06..50cf8697c7 100644 --- a/lib/ExtUtils/t/Manifest.t +++ b/lib/ExtUtils/t/Manifest.t @@ -14,7 +14,7 @@ chdir 't'; use strict; # these files help the test run -use Test::More tests => 39; +use Test::More tests => 41; use Cwd; # these files are needed for the module itself @@ -200,8 +200,25 @@ my %expect = ( 'makefile.pl' => '', ); is_deeply( $files, \%expect, 'maniadd() vs MANIFEST without trailing newline'); +SKIP: { + chmod( 0400, 'MANIFEST' ); + skip "Can't make MANIFEST read-only", 2 if -w 'MANIFEST'; + + eval { + maniadd({ 'META.yml' => 'hock' }); + }; + is( $@, '', "maniadd() won't open MANIFEST if it doesn't need to" ); + + eval { + maniadd({ 'grrrwoof' => 'yippie' }); + }; + like( $@, qr/^Could not open MANIFEST/, + "maniadd() dies if it can't open the MANIFEST" ); + +} + + END { - # the args are evaluated in scalar context is( unlink( keys %Files ), keys %Files, 'remove all added files' ); remove_dir( 'moretest', 'copy' ); diff --git a/lib/ExtUtils/t/prereq_print.t b/lib/ExtUtils/t/prereq_print.t new file mode 100644 index 0000000000..78dc6e8e1f --- /dev/null +++ b/lib/ExtUtils/t/prereq_print.t @@ -0,0 +1,66 @@ +#!/usr/bin/perl -w + +BEGIN { + if( $ENV{PERL_CORE} ) { + chdir 't' if -d 't'; + @INC = ('../lib', 'lib'); + } + else { + unshift @INC, 't/lib'; + } +} + +use strict; +use Config; + +use Test::More tests => 8; +use MakeMaker::Test::Utils; + +# 'make disttest' sets a bunch of environment variables which interfere +# with our testing. +delete @ENV{qw(PREFIX LIB MAKEFLAGS)}; + +my $Perl = which_perl(); +my $Makefile = makefile_name(); +my $Is_VMS = $^O eq 'VMS'; + +chdir($Is_VMS ? 'BFD_TEST_ROOT:[t]' : 't'); +perl_lib; + +$| = 1; + +ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy" ) || + diag("chdir failed: $!"); + +unlink $Makefile; +my $prereq_out = run(qq{$Perl Makefile.PL "PREREQ_PRINT=1"}); +ok( !-r $Makefile, "PREREQ_PRINT produces no $Makefile" ); +is( $?, 0, ' exited normally' ); +{ + package _Prereq::Print; + no strict; + $PREREQ_PM = undef; # shut up "used only once" warning. + eval $prereq_out; + ::is_deeply( $PREREQ_PM, { strict => 0 }, 'prereqs dumped' ); + ::is( $@, '', ' without error' ); +} + + +$prereq_out = run(qq{$Perl Makefile.PL "PRINT_PREREQ=1"}); +ok( !-r $Makefile, "PRINT_PREREQ produces no $Makefile" ); +is( $?, 0, ' exited normally' ); +::like( $prereq_out, qr/^perl\(strict\) \s* >= \s* 0 \s*$/x, + 'prereqs dumped' ); + + +# Currently a bug. +#my $prereq_out = run(qq{$Perl Makefile.PL "PREREQ_PRINT=0"}); +#ok( -r $Makefile, "PREREQ_PRINT=0 produces a $Makefile" ); +#is( $?, 0, ' exited normally' ); +#unlink $Makefile; + +# Currently a bug. +#my $prereq_out = run(qq{$Perl Makefile.PL "PRINT_PREREQ=1"}); +#ok( -r $Makefile, "PRINT_PREREQ=0 produces a $Makefile" ); +#is( $?, 0, ' exited normally' ); +#unlink $Makefile; |