diff options
38 files changed, 409 insertions, 106 deletions
@@ -3496,6 +3496,7 @@ t/lib/MakeMaker/Test/Setup/BFD.pm MakeMaker test utilities t/lib/MakeMaker/Test/Setup/PL_FILES.pm MakeMaker test utilities t/lib/MakeMaker/Test/Setup/Problem.pm MakeMaker test utilities t/lib/MakeMaker/Test/Setup/Recurs.pm MakeMaker test utilities +t/lib/MakeMaker/Test/Setup/XS.pm MakeMaker test utilities t/lib/MakeMaker/Test/Utils.pm MakeMaker test utilities t/lib/Math/BigFloat/Subclass.pm Empty subclass of BigFloat for test t/lib/Math/BigInt/BareCalc.pm Bigint's simulation of Calc diff --git a/lib/ExtUtils/Changes b/lib/ExtUtils/Changes index e50f30276e..ab04dc166d 100644 --- a/lib/ExtUtils/Changes +++ b/lib/ExtUtils/Changes @@ -1,3 +1,124 @@ +6.37_02 Sun Nov 25 23:33:14 PST 2007 + Test Improvements + - Added a test for a basic XS build. + + Bug Fixes + - A refactoring in 6.37_01 broke XS compilation. + +6.37_01 Sun Nov 25 17:05:53 PST 2007 + Improvements + - Upgraded the META.yml to version 1.3 of the spec (which really + doesn't change anything). Thanks bdfoy. + - MakeMaker now always includes the required 'author' field in + the META.yml even if it's undef to comply with the META.yml spec. + - Updated ExtUtils-Install to latest version (1.44) + - Unified the version numbers of all modules. + + Test Fixes + - cd() test on VMS used non-native paths. [bleadperl 31534] + - Removed uses of "no_plan" in tests to remain compatible with + old versions of Test::Harness. + - writemakefile_args.t had the wrong test count if version.pm isn't + installed. + + Bug Fixes + - $VERSION detection code would be confused by "sub version" + [rt.cpan.org 30747] + - LINKTYPE=static will now be propagated to child builds. + [bleadperl 31761] + + Portability Fixes + - Add "dragonfly" to the list of BSDish operating systems + - BSD detection code would not pick up bsdos or internix + - Fix detection of shared libperl on NetBSD [bleadperl 31526] + + +6.36 Tue Jul 3 01:06:40 PDT 2007 + Test Fixes + - version.pm prior to 0.7203 caused Foo->VERSION to reformat + $Foo::VERSION. This caused prereq.t to fail. + +6.35 Sun Jul 1 20:53:38 PDT 2007 + New Features + * MakeMaker will now try to "use version" before parsing $VERSION. + This allows "$VERSION = qv(1.2.3)" to work. + + Test Fixes + - writemakefile_args.t now works with older versions of version.pm + +6.34 Sat Jun 30 11:06:54 CDT 2007 + Test Fixes + - Accidentally hard coded the version of strict.pm [rt.cpan.org 27838] + +6.33 Fri Jun 29 17:15:34 CDT 2007 + New Features + * VERSION now accepts version objects without warning. + [rt.cpan.org 26075] + + Bug Fixes + - Properly not installing MANIFEST.SKIP when ExtUtils::Manifest is not + being installed. [rt.cpan.org 21318] + - fixin() no longer clobbers $/ [rt.cpan.org 26234] + - Fixed bug finding cross-compiled perls [bleadperl 31404] + - Looking up to 8 levels up to find uninstalled perls + [bleadperl 30932] + * A test failure in a sub-project would not cause "make test" to + fail. [rt.cpan.org 27804] + + Windows + - Embed manifest files in EXEs and DLLs when building with VC++ 8.x + [bleadperl #29266] [rt.cpan.org 26208] + - Improved the subdir command code so DIR can do more than one level + down. [rt.cpan.org 25180] + - Fix static builds on Win32 by using -DPERLDLL [bleadperl 31229] + + VMS + - Use linker flags rather than compiler flags to determine if the + perl sharable image was linked debug. This keeps OPTIMIZE from + confusing things. [rt.cpan.org 25268] + - Accidental use of $\ in a regex. [bleadperl 30521] + + BSD + - If calling perl causes MakeMaker to emit warnings, then it + cannot find the location of its binary. [rt.cpan.org 23178] + + Doc Improvements + - Typo fixes. $(TOUNIX) -> $(TO_UNIX). [rt.cpan.org 23495] + - The example for setting $VERSION from $Revision$ in SVN was + incorrect. (Thanks to ROBERTMAY@cpan.org) [rt.cpan.org 26995] + - Document what's wrong with PREFIX and what to use instead. + [rt.cpan.org 12919] + - Improve the PREREQ_FATAL docs to make it really clear that you + do NOT want to use this! + + Misc + - Provide information during the install about whether we're using the + installed or provided dependency (ie. ExtUtils::Command). + - Updated included versions of ExtUtils::Manifest and Command. + - Add .bak and .old to veryclean [rt.cpan.org 21284] + - Improved the PREREQ_FATAL message. + +6.32 Wed Feb 21 07:59:57 PST 2007 + New Features + - WriteEmptyMakefile() is now exportable upon request. + + Bug Fixes + - Set binmode() when writing to files in Command.t for operating + systems which need that sort of thing. [bleadperl #29578] + - Fixed a minor duplication in manifypod_target(). [rt.cpan.org 22149] + + Test Fixes + - The build_man.t test would fail if your Perl is configured to not + generate man pages ($Config{installman3dir} is set to none). + + Doc Improvements + - Made the home dir install examples a little more friendly to non-Unix + folks. + + Misc + - miniperl no longer has the Win32 functions. + - Turn on "use strict" where it was missing. + 6.31 Mon Oct 9 16:54:47 PDT 2006 - Update our META.yml to version 1.2 of the spec. * Update the SEE ALSO to mention Module::Build, Module::Install, diff --git a/lib/ExtUtils/Command/MM.pm b/lib/ExtUtils/Command/MM.pm index 9bd3eb825b..c11afba0de 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 = '0.07'; +$VERSION = '6.37_02'; my $Is_VMS = $^O eq 'VMS'; diff --git a/lib/ExtUtils/Liblist.pm b/lib/ExtUtils/Liblist.pm index 35966218b4..c31508c004 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 = '1.03'; +$VERSION = '6.37_02'; use File::Spec; require ExtUtils::Liblist::Kid; diff --git a/lib/ExtUtils/Liblist/Kid.pm b/lib/ExtUtils/Liblist/Kid.pm index 28d2a854b5..8564c14fe9 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 = 1.33; +$VERSION = 6.37_02; use Config; use Cwd 'cwd'; diff --git a/lib/ExtUtils/MM.pm b/lib/ExtUtils/MM.pm index 2c6af6b21f..367d532f38 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 = '0.07'; +$VERSION = '6.37_02'; require ExtUtils::Liblist; require ExtUtils::MakeMaker; @@ -43,18 +43,19 @@ away. sub DESTROY {} } +sub _is_win95 { + # miniperl might not have the Win32 functions available and we need + # to run in miniperl. + return defined &Win32::IsWin95 ? Win32::IsWin95() + : ! defined $ENV{SYSTEMROOT}; +} + my %Is = (); $Is{VMS} = $^O eq 'VMS'; $Is{OS2} = $^O eq 'os2'; $Is{MacOS} = $^O eq 'MacOS'; if( $^O eq 'MSWin32' ) { - if (defined &DynaLoader::boot_DynaLoader) { - Win32::IsWin95() ? $Is{Win95} = 1 : $Is{Win32} = 1; - } - else { - # Can't use Win32::* with miniperl - !(defined $ENV{SYSTEMROOT}) ? $Is{Win95} = 1 : $Is{Win32} = 1; - } + _is_win95() ? $Is{Win95} = 1 : $Is{Win32} = 1; } $Is{UWIN} = $^O =~ /^uwin(-nt)?$/; $Is{Cygwin} = $^O eq 'cygwin'; diff --git a/lib/ExtUtils/MM_AIX.pm b/lib/ExtUtils/MM_AIX.pm index 7bdaf7a7eb..9bdbb8f961 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 = '0.05'; +$VERSION = '6.37_02'; require ExtUtils::MM_Unix; @ISA = qw(ExtUtils::MM_Unix); diff --git a/lib/ExtUtils/MM_Any.pm b/lib/ExtUtils/MM_Any.pm index 48cec1863f..79155aef45 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 = '0.15'; +$VERSION = '6.37_02'; use Carp; use File::Spec; @@ -721,12 +721,17 @@ MAKE_FRAG $prereq_pm .= sprintf "\n %-30s %s", "$mod:", $ver; } + my $author_value = defined $self->{AUTHOR} + ? "\n - $self->{AUTHOR}" + : undef; + # Use a list to preserve order. my @meta_to_mm = ( name => $self->{DISTNAME}, version => $self->{VERSION}, abstract => $self->{ABSTRACT}, license => $self->{LICENSE}, + author => $author_value, generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION", distribution_type => $self->{PM} ? 'module' : 'script', @@ -745,13 +750,8 @@ MAKE_FRAG $meta .= <<"YAML"; requires: $prereq_pm meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.2.html - version: 1.2 -YAML - - $meta .= <<"YAML" if defined $self->{AUTHOR}; -author: - - $self->{AUTHOR} + url: http://module-build.sourceforge.net/META-spec-v1.3.html + version: 1.3 YAML $meta .= $self->{EXTRA_META} if $self->{EXTRA_META}; diff --git a/lib/ExtUtils/MM_BeOS.pm b/lib/ExtUtils/MM_BeOS.pm index 5304731d3d..718ae3c03b 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 = '1.07'; +$VERSION = '6.37_02'; =item os_flavor diff --git a/lib/ExtUtils/MM_Cygwin.pm b/lib/ExtUtils/MM_Cygwin.pm index 648dcad25d..fe31655baf 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 = '1.1'; +$VERSION = '6.37_02'; =head1 NAME diff --git a/lib/ExtUtils/MM_DOS.pm b/lib/ExtUtils/MM_DOS.pm index e4d6dd8325..629ede84a1 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 = 0.04; +$VERSION = 6.37_02; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; diff --git a/lib/ExtUtils/MM_MacOS.pm b/lib/ExtUtils/MM_MacOS.pm index 79ecc4ed14..0ebcc5180e 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 = 1.1; +$VERSION = 6.37_02; sub new { die <<'UNSUPPORTED'; diff --git a/lib/ExtUtils/MM_NW5.pm b/lib/ExtUtils/MM_NW5.pm index ca71cd0ca3..a757d28763 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 = '2.1'; +$VERSION = '6.37_02'; require ExtUtils::MM_Win32; @ISA = qw(ExtUtils::MM_Win32); diff --git a/lib/ExtUtils/MM_OS2.pm b/lib/ExtUtils/MM_OS2.pm index 5026e2c345..9bc3ae6a6e 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 = '1.07'; +$VERSION = '6.37_02'; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; diff --git a/lib/ExtUtils/MM_QNX.pm b/lib/ExtUtils/MM_QNX.pm index 2205b925bf..ffd6cb4ccc 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 = '0.04'; +$VERSION = '6.37_02'; require ExtUtils::MM_Unix; @ISA = qw(ExtUtils::MM_Unix); diff --git a/lib/ExtUtils/MM_UWIN.pm b/lib/ExtUtils/MM_UWIN.pm index 42a7eeedaa..d1576071fc 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 = 0.04; +$VERSION = 6.37_02; require ExtUtils::MM_Unix; @ISA = qw(ExtUtils::MM_Unix); diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 0f1048d563..4d1f6048ca 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 = '1.54_02'; +$VERSION = '6.37_02'; require ExtUtils::MM_Any; @ISA = qw(ExtUtils::MM_Any); @@ -35,7 +35,9 @@ BEGIN { $Is_SunOS4 = $^O eq 'sunos'; $Is_Solaris = $^O eq 'solaris'; $Is_SunOS = $Is_SunOS4 || $Is_Solaris; - $Is_BSD = $^O =~ /^(?:(?:free|net|open)bsd|bsdos|interix|dragonfly)$/; + $Is_BSD = ($^O =~ /^(?:free|net|open)bsd$/ or + grep( $^O eq $_, qw(bsdos interix dragonfly) ) + ); } BEGIN { @@ -128,37 +130,42 @@ sub c_o { my($self) = shift; return '' unless $self->needs_linking(); my(@m); + + my $command = '$(CCCMD)'; + my $flags = '$(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE)'; + if (my $cpp = $Config{cpprun}) { my $cpp_cmd = $self->const_cccmd; $cpp_cmd =~ s/^CCCMD\s*=\s*\$\(CC\)/$cpp/; - push @m, ' + push @m, qq{ .c.i: - '. $cpp_cmd . ' $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c > $*.i -'; + $cpp_cmd $flags \$*.c > \$*.i +}; } - push @m, ' + + push @m, qq{ .c.s: - $(CCCMD) -S $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c -'; - push @m, ' -.c$(OBJ_EXT): - $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c -'; - push @m, ' -.C$(OBJ_EXT): - $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.C -' if !$Is_OS2 and !$Is_Win32 and !$Is_Dos; #Case-specific - push @m, ' -.cpp$(OBJ_EXT): - $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cpp + $command -S $flags \$*.c -.cxx$(OBJ_EXT): - $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cxx +.c\$(OBJ_EXT): + $command $flags \$*.c -.cc$(OBJ_EXT): - $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cc -'; - join "", @m; +.cpp\$(OBJ_EXT): + $command $flags \$*.cpp + +.cxx\$(OBJ_EXT): + $command $flags \$*.cxx + +.cc\$(OBJ_EXT): + $command $flags \$*.cc +}; + + push @m, qq{ +.C\$(OBJ_EXT): + $command \$*.C +} if !$Is_OS2 and !$Is_Win32 and !$Is_Dos; #Case-specific + + return join "", @m; } =item cflags (o) @@ -2707,27 +2714,32 @@ sub parse_version { open(FH,$parsefile) or die "Could not open '$parsefile': $!"; my $inpod = 0; while (<FH>) { - $inpod = /^=(?!cut)/ ? 1 : /^=cut/ ? 0 : $inpod; - next if $inpod || /^\s*#/; - chop; - next unless /(?<!\\)([\$*])(([\w\:\']*)\bVERSION)\b.*\=/; - my $eval = qq{ - package ExtUtils::MakeMaker::_version; - no strict; - BEGIN { eval { - require version; - "version"->import; - } } - - local $1$2; - \$$2=undef; do { - $_ - }; \$$2 - }; + $inpod = /^=(?!cut)/ ? 1 : /^=cut/ ? 0 : $inpod; + next if $inpod || /^\s*#/; + chop; + next unless /(?<!\\)([\$*])(([\w\:\']*)\bVERSION)\b.*\=/; + my $eval = qq{ + package ExtUtils::MakeMaker::_version; + no strict; + BEGIN { eval { + # Ensure any version() routine which might have leaked + # into this package has been deleted. Interferes with + # version->import() + undef *version; + require version; + "version"->import; + } } + + local $1$2; + \$$2=undef; + do { + $_ + }; \$$2 + }; local $^W = 0; - $result = eval($eval); - warn "Could not eval '$eval' in $parsefile: $@" if $@; - last; + $result = eval($eval); + warn "Could not eval '$eval' in $parsefile: $@" if $@; + last; } close FH; diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm index 2f7d90ec6c..bd70053c2f 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 = '5.76'; +$VERSION = '6.37_02'; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; diff --git a/lib/ExtUtils/MM_VOS.pm b/lib/ExtUtils/MM_VOS.pm index 137437d5f7..d0aa96b6e4 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 = '0.04'; +$VERSION = '6.37_02'; require ExtUtils::MM_Unix; @ISA = qw(ExtUtils::MM_Unix); diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm index 553ad988a7..fe650077dd 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 = '1.15'; +$VERSION = '6.37_02'; $ENV{EMXSHELL} = 'sh'; # to run `commands` diff --git a/lib/ExtUtils/MM_Win95.pm b/lib/ExtUtils/MM_Win95.pm index 9098bae594..607058f6fa 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 = '0.06'; +$VERSION = '6.37_02'; require ExtUtils::MM_Win32; @ISA = qw(ExtUtils::MM_Win32); diff --git a/lib/ExtUtils/MY.pm b/lib/ExtUtils/MY.pm index 26e351f81d..1a0acc3be9 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 = 0.03; +$VERSION = 6.37_02; @ISA = qw(ExtUtils::MM); { diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index eba3308188..af3da88287 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -1,4 +1,4 @@ -# $Id: /mirror/svn.schwern.org/CPAN/ExtUtils-MakeMaker/trunk/lib/ExtUtils/MakeMaker.pm 32261 2007-07-03T08:08:29.826721Z schwern $ +# $Id: /local/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm 40883 2007-11-26T07:33:12.936163Z schwern $ package ExtUtils::MakeMaker; BEGIN {require 5.005_03;} @@ -21,8 +21,8 @@ use vars qw( use vars qw($Revision); use strict; -$VERSION = '6.36_01'; -($Revision) = q$Revision: 32261 $ =~ /Revision:\s+(\S+)/; +$VERSION = '6.37_02'; +($Revision) = q$Revision: 40883 $ =~ /Revision:\s+(\S+)/; @ISA = qw(Exporter); @EXPORT = qw(&WriteMakefile &writeMakefile $Verbose &prompt); @@ -2188,7 +2188,7 @@ MakeMaker object. The following lines will be parsed o.k.: $VERSION = '1.00'; *VERSION = \'1.01'; - ($VERSION) = q$Revision: 32261 $ =~ /(\d+)/g; + ($VERSION) = q$Revision: 40883 $ =~ /(\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 efb1c3a4d9..057404812e 100644 --- a/lib/ExtUtils/MakeMaker/Config.pm +++ b/lib/ExtUtils/MakeMaker/Config.pm @@ -1,6 +1,6 @@ package ExtUtils::MakeMaker::Config; -$VERSION = '0.04'; +$VERSION = '6.37_02'; use strict; use Config (); diff --git a/lib/ExtUtils/MakeMaker/bytes.pm b/lib/ExtUtils/MakeMaker/bytes.pm index 1cebaa506d..dd4d78a641 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 = 0.03; +$VERSION = 6.37_02; my $Have_Bytes = eval q{require bytes; 1;}; diff --git a/lib/ExtUtils/MakeMaker/vmsish.pm b/lib/ExtUtils/MakeMaker/vmsish.pm index 44ca1923a0..519458962e 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 = 0.03; +$VERSION = 6.37_02; my $IsVMS = $^O eq 'VMS'; diff --git a/lib/ExtUtils/Mkbootstrap.pm b/lib/ExtUtils/Mkbootstrap.pm index 09b5bd6617..dfb2b82896 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 = '1.17'; +$VERSION = '6.37_02'; require Exporter; @ISA = ('Exporter'); diff --git a/lib/ExtUtils/Mksymlists.pm b/lib/ExtUtils/Mksymlists.pm index fe28b9fbfc..a3f7aa35ad 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 = '1.21'; +$VERSION = '6.37_02'; sub Mksymlists { my(%spec) = @_; diff --git a/lib/ExtUtils/PATCHING b/lib/ExtUtils/PATCHING index e4b9cb207d..eed536a994 100644 --- a/lib/ExtUtils/PATCHING +++ b/lib/ExtUtils/PATCHING @@ -106,7 +106,7 @@ Backwards Compatibility - MakeMaker must be backwards compatible to 5.5.4 (5.005_04). Avoid any obvious 5.6-isms (threads, warnings.pm, Unicode, our, v1.2.3, attributes - open my $fh, lvalue subroutines, any new core modules, etc...). + open my $fh, lvalue subroutines, qr//, any new core modules, etc...). - MakeMaker should avoid having module dependencies. Avoid using modules which didn't come with 5.5.4 and avoid using features from newer @@ -126,7 +126,7 @@ Cross-Platform Compatibility and MMK to name the most common. Keep your make code as simple as possible. -- Avoid special variables (even $@). +- Avoid special make variables (even $@). - Format targets as "target : dependency", the spacing is important. diff --git a/lib/ExtUtils/t/MM_Unix.t b/lib/ExtUtils/t/MM_Unix.t index 1930e35cef..f9b07f8c0c 100644 --- a/lib/ExtUtils/t/MM_Unix.t +++ b/lib/ExtUtils/t/MM_Unix.t @@ -37,9 +37,7 @@ my $os = ($ExtUtils::MM_Unix::Is_OS2 || 0) + ($ExtUtils::MM_Unix::Is_VMS || 0); ok ( $os <= 1, 'There can be only one (or none)'); -my $version = $ExtUtils::MM_Unix::VERSION; - $version =~ s/_//g; -cmp_ok ($version, '>=', '1.12606', 'Should be at least version 1.12606'); +cmp_ok ($ExtUtils::MM_Unix::VERSION, '>=', '1.12606', 'Should be at least version 1.12606'); # when the following calls like canonpath, catdir etc are replaced by # File::Spec calls, the test's become a bit pointless diff --git a/lib/ExtUtils/t/WriteEmptyMakefile.t b/lib/ExtUtils/t/WriteEmptyMakefile.t index e9db02b881..a5de6f16c9 100644 --- a/lib/ExtUtils/t/WriteEmptyMakefile.t +++ b/lib/ExtUtils/t/WriteEmptyMakefile.t @@ -15,7 +15,7 @@ BEGIN { chdir 't'; use strict; -use Test::More 'no_plan'; +use Test::More tests => 5; use ExtUtils::MakeMaker qw(WriteEmptyMakefile); use TieOut; diff --git a/lib/ExtUtils/t/basic.t b/lib/ExtUtils/t/basic.t index 6b9002a5c1..64352d85cb 100644 --- a/lib/ExtUtils/t/basic.t +++ b/lib/ExtUtils/t/basic.t @@ -15,6 +15,7 @@ BEGIN { use strict; use Config; +use ExtUtils::MakeMaker; use Test::More tests => 83; use MakeMaker::Test::Utils; @@ -250,10 +251,26 @@ ok( -f $meta_yml, 'META.yml written to dist dir' ); ok( !-e "META_new.yml", 'temp META.yml file not left around' ); ok open META, $meta_yml or diag $!; -my @meta = <META>; -like $meta[-1], '/\n$/', "META.yml ends with a newline"; +my $meta = join '', <META>; ok close META; +is $meta, <<"END"; +--- #YAML:1.0 +name: Big-Dummy +version: 0.01 +abstract: Try "our" hot dog's +license: ~ +author: + - Michael G Schwern <schwern\@pobox.com> +generated_by: ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION +distribution_type: module +requires: + strict: 0 +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.3.html + version: 1.3 +END + my $manifest = maniread("$distdir/MANIFEST"); # VMS is non-case preserving, so we can't know what the MANIFEST will # look like. :( diff --git a/lib/ExtUtils/t/parse_version.t b/lib/ExtUtils/t/parse_version.t index 78ba52e3a8..488e855064 100644 --- a/lib/ExtUtils/t/parse_version.t +++ b/lib/ExtUtils/t/parse_version.t @@ -14,6 +14,9 @@ chdir 't'; use Test::More; use ExtUtils::MakeMaker; +my $Has_Version = eval 'require version; "version"->import'; +my $Has_Our = eval 'our $foo'; + my %versions = (q[$VERSION = '1.00'] => '1.00', q[*VERSION = \'1.01'] => '1.01', q[($VERSION) = q$Revision: 32208 $ =~ /(\d+)/g;] => 32208, @@ -29,25 +32,43 @@ my %versions = (q[$VERSION = '1.00'] => '1.00', q[local $FOO::VERSION = '1.30'] => 'undef', ); -if( eval 'our $foo' ) { +if( $Has_Our ) { $versions{q[our $VERSION = '1.23';]} = '1.23', } -if( eval 'require version; "version"->import' ) { +if( $Has_Version ) { $versions{q[use version; $VERSION = qv(1.2.3);]} = qv(1.2.3); $versions{q[$VERSION = qv(1.2.3)]} = qv(1.2.3); } -plan tests => 2 * keys %versions; +plan tests => (2 * keys %versions) + 4; while( my($code, $expect) = each %versions ) { + is( parse_version_string($code), $expect, $code ); +} + + +sub parse_version_string { + my $code = shift; + open(FILE, ">VERSION.tmp") || die $!; print FILE "$code\n"; close FILE; $_ = 'foo'; - is( MM->parse_version('VERSION.tmp'), $expect, $code ); + my $version = MM->parse_version('VERSION.tmp'); is( $_, 'foo', '$_ not leaked by parse_version' ); - + unlink "VERSION.tmp"; + + return $version; +} + + +SKIP: { + skip "need version.pm", 2 unless $Has_Version; + is parse_version_string(q[ $VERSION = '1.00'; sub version { $VERSION } ]), + '1.00'; + is parse_version_string(q[ use version; $VERSION = version->new(1.23) ]), + '1.23'; } diff --git a/lib/ExtUtils/t/prereq.t b/lib/ExtUtils/t/prereq.t index e450f089d1..486fee9ebe 100644 --- a/lib/ExtUtils/t/prereq.t +++ b/lib/ExtUtils/t/prereq.t @@ -14,7 +14,7 @@ BEGIN { } use strict; -use Test::More 'no_plan'; +use Test::More tests => 11; use TieOut; use MakeMaker::Test::Utils; diff --git a/lib/ExtUtils/t/writemakefile_args.t b/lib/ExtUtils/t/writemakefile_args.t index e7b2db5ec2..da274d6cc7 100644 --- a/lib/ExtUtils/t/writemakefile_args.t +++ b/lib/ExtUtils/t/writemakefile_args.t @@ -14,7 +14,7 @@ BEGIN { } use strict; -use Test::More 'no_plan'; +use Test::More tests => 28; use TieOut; use MakeMaker::Test::Utils; @@ -164,7 +164,7 @@ VERIFY SKIP: { - skip("Can't test version objects",2) unless eval { require version }; + skip("Can't test version objects",6) unless eval { require version }; version->import; my $version = version->new("1.2.3"); diff --git a/lib/ExtUtils/t/xs.t b/lib/ExtUtils/t/xs.t index 62d29eae79..1cadc109b7 100644 --- a/lib/ExtUtils/t/xs.t +++ b/lib/ExtUtils/t/xs.t @@ -13,12 +13,49 @@ chdir 't'; use Test::More; use MakeMaker::Test::Utils; +use MakeMaker::Test::Setup::XS; +use File::Find; +use File::Spec; +use File::Path; if( have_compiler() ) { - plan tests => 1; + plan tests => 7; } else { plan skip_all => "ExtUtils::CBuilder not installed or couldn't find a compiler"; } -pass("You have a compiler, isn't that great?"); +my $Is_VMS = $^O eq 'VMS'; +my $perl = which_perl(); + +# GNV logical interferes with testing +$ENV{'bin'} = '[.bin]' if $Is_VMS; + +chdir 't'; + +perl_lib; + +$| = 1; + +ok( setup_xs(), 'setup' ); +END { + ok( chdir File::Spec->updir ); + ok( teardown_xs(), 'teardown' ); +} + +ok( chdir('XS-Test'), "chdir'd to XS-Test" ) || + diag("chdir failed: $!"); + +my @mpl_out = run(qq{$perl Makefile.PL}); + +cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || + diag(@mpl_out); + +my $make = make_run(); +my $make_out = run("$make"); +is( $?, 0, ' make exited normally' ) || + diag $make_out; + +my $test_out = run("$make"); +is( $?, 0, ' make test exited normally' ) || + diag $test_out; diff --git a/lib/ExtUtils/testlib.pm b/lib/ExtUtils/testlib.pm index 976ad54879..b7ac58167c 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 = 1.17; +$VERSION = 6.37_02; use Cwd; use File::Spec; diff --git a/t/lib/MakeMaker/Test/Setup/XS.pm b/t/lib/MakeMaker/Test/Setup/XS.pm new file mode 100644 index 0000000000..33121a90aa --- /dev/null +++ b/t/lib/MakeMaker/Test/Setup/XS.pm @@ -0,0 +1,95 @@ +package MakeMaker::Test::Setup::XS; + +@ISA = qw(Exporter); +require Exporter; +@EXPORT = qw(setup_xs teardown_xs); + +use strict; +use File::Path; +use File::Basename; +use MakeMaker::Test::Utils; + +my $Is_VMS = $^O eq 'VMS'; + +my %Files = ( + 'XS-Test/lib/XS/Test.pm' => <<'END', +package XS::Test; + +require Exporter; +require DynaLoader; + +$VERSION = 1.01; +@ISA = qw(Exporter DynaLoader); +@EXPORT = qw(is_even); + +bootstrap XS::Test $VERSION; + +1; +END + + 'XS-Test/Makefile.PL' => <<'END', +use ExtUtils::MakeMaker; + +WriteMakefile( + NAME => 'XS::Test', + VERSION_FROM => 'lib/XS/Test.pm', +); +END + + 'XS-Test/Test.xs' => <<'END', +#include "EXTERN.h"; +#include "perl.h"; +#include "XSUB.h"; + +MODULE = XS::Test PACKAGE = XS::Test + +int +is_even(input) + int input + CODE: + RETVAL = (input % 2 == 0); + OUTPUT: + RETVAL +END + + 'XS-Test/t/is_even.t' => <<'END', +#!/usr/bin/perl -w + +use Test::More tests => 3; + +use_ok "XS::Test"; +ok !is_even(1); +ok is_even(2); +END + ); + + +sub setup_xs { + setup_mm_test_root(); + chdir 'MM_TEST_ROOT:[t]' if $Is_VMS; + + while(my($file, $text) = each %Files) { + # Convert to a relative, native file path. + $file = File::Spec->catfile(File::Spec->curdir, split m{\/}, $file); + + my $dir = dirname($file); + mkpath $dir; + open(FILE, ">$file") || die "Can't create $file: $!"; + print FILE $text; + close FILE; + } + + return 1; +} + +sub teardown_xs { + foreach my $file (keys %Files) { + my $dir = dirname($file); + if( -e $dir ) { + rmtree($dir) || return; + } + } + return 1; +} + +1;
\ No newline at end of file |