From: Rafael Garcia-Suarez Date: Thu, 23 Mar 2006 17:43:26 +0000 (+0000) Subject: Merge changes from CPAN's EU:MM 6.30_01. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2977d345acaba2d25f549b813e6f840a0d225b16;p=p5sagit%2Fp5-mst-13.2.git Merge changes from CPAN's EU:MM 6.30_01. The modules that have local changes have superior version numbers than the CPAN counterparts. p4raw-id: //depot/perl@27590 --- diff --git a/MANIFEST b/MANIFEST index a9357c2..874f79a 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1651,12 +1651,13 @@ 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/INSTALL_BASE.t Test INSTALL_BASE in MakeMaker lib/ExtUtils/t/Installed.t See if ExtUtils::Installed works lib/ExtUtils/t/Install.t See if ExtUtils::Install works 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/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 @@ -1678,6 +1679,7 @@ lib/ExtUtils/t/prereq_print.t See if PREREQ_PRINT works lib/ExtUtils/t/problems.t How MakeMaker reacts to build problems lib/ExtUtils/t/prompt.t See if E::MM::prompt() works lib/ExtUtils/t/recurs.t See if recursive builds work +lib/ExtUtils/t/revision.t See if $Revision is correct lib/ExtUtils/t/split_command.t See if MM's xargs-like function works lib/ExtUtils/t/testlib.t See if ExtUtils::testlib works lib/ExtUtils/t/VERSION_FROM.t See if MakeMaker's VERSION_FROM works diff --git a/lib/ExtUtils/Changes b/lib/ExtUtils/Changes index af4b84c..5b5c8fa 100644 --- a/lib/ExtUtils/Changes +++ b/lib/ExtUtils/Changes @@ -1,3 +1,33 @@ +6.30_01 Tue Aug 16 23:53:27 PDT 2005 + * Fixed compiling modules using an uninstalled Perl on Win32 by using + the proper perl header location for Windows (which is different from + Unix). Looks like a very old bug. [bugs.perl.org 36128] + - $ExtUtils::MakeMaker::Revision accidentally left in a stray "Revision". + [thanks pdx.pm for noticing this] + - Fixed the $VERSION = $Revision$ example in the MakeMaker docs and the + FAQ. [thanks again, pdx.pm] + - Elaborated on the differences between CVS, SVN and others when using + $Revision$ based $VERSIONs. + * ExtUtils::Command, ExtUtils::Install, ExtUtils::Manifest, + ExtUtils::Mkbootstrap, ExtUtils::Mksymlists and ExtUtils::Packlist + are all now considered to be separate distributions. To avoid a + circular dependency, MakeMaker distributes its own versions but CPAN + should not index them and they will not overwrite a newer, installed + version. + * Added EXTRA_META option to allow module authors to append extra + text to the generated META.yml. + * Added a LICENSE field mirroring Module::Build's license. + * META.yml support updated to version 1.1. All required fields + now generated. (NOTE: 1.1 isn't yet complete but we're going with + it anyway. MakeMaker uses "author" instead of "authored_by" as its + expected the former will be used in 1.1 final). + * Non-conforming version_from and installdirs META.yml fields removed. + * META.yml distribution_type field now intelligent enough to guess at + the type rather than hard code 'module'. + * INSTALLBASE changed to INSTALL_BASE to match Module::Build. + * Added a MAKE parameter for Windows users to say if they're using + dmake or nmake. + 6.30 Fri May 20 16:05:38 PDT 2005 * PL_FILES behavior tweak again to restore old behavior. Sometimes its supposed to run before pm_to_blib, sometimes after. diff --git a/lib/ExtUtils/META.yml b/lib/ExtUtils/META.yml index 8ec3ced..623d8cb 100644 --- a/lib/ExtUtils/META.yml +++ b/lib/ExtUtils/META.yml @@ -1,14 +1,19 @@ -# 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.28 -version_from: lib/ExtUtils/MakeMaker.pm -installdirs: perl -requires: +--- #YAML:1.0 +name: ExtUtils-MakeMaker +version: 6.30_01 +abstract: Create a module Makefile +license: perl +generated_by: ExtUtils::MakeMaker version 6.30_01 +author: Michael G Schwern +distribution_type: module +requires: DirHandle: 0 File::Basename: 0 File::Spec: 0.8 Pod::Man: 0 - -distribution_type: module -generated_by: ExtUtils::MakeMaker version 6.28 +meta-spec: + url: ; + version: 1.1 +no_index: + dir: + - inc diff --git a/lib/ExtUtils/MM_Any.pm b/lib/ExtUtils/MM_Any.pm index d5d6309..6235ac9 100644 --- a/lib/ExtUtils/MM_Any.pm +++ b/lib/ExtUtils/MM_Any.pm @@ -2,8 +2,9 @@ package ExtUtils::MM_Any; use strict; use vars qw($VERSION @ISA); -$VERSION = '0.13_01'; +$VERSION = '0.13_02'; +use Carp; use File::Spec; BEGIN { @ISA = qw(File::Spec); } @@ -324,7 +325,28 @@ this is the max size of a shell command line. $self->{_MAX_EXEC_LEN} is set by this method, but only for testing purposes. +=head3 make + my $make = $MM->make; + +Returns the make variant we're generating the Makefile for. This attempts +to do some normalization on the information from %Config or the user. + +=cut + +sub make { + my $self = shift; + + my $make = lc $self->{MAKE}; + + # Truncate anything like foomake6 to just foomake. + $make =~ s/^(\w+make).*/$1/; + + # Turn gnumake into gmake. + $make =~ s/^gnu/g/; + + return $make; +} =head2 Targets @@ -703,22 +725,40 @@ MAKE_FRAG my $prereq_pm = ''; foreach my $mod ( sort { lc $a cmp lc $b } keys %{$self->{PREREQ_PM}} ) { my $ver = $self->{PREREQ_PM}{$mod}; - $prereq_pm .= sprintf " %-30s %s\n", "$mod:", $ver; + $prereq_pm .= sprintf "\n %-30s %s", "$mod:", $ver; } - my $meta = <{DISTNAME} -version: $self->{VERSION} -version_from: $self->{VERSION_FROM} -installdirs: $self->{INSTALLDIRS} -requires: -$prereq_pm -distribution_type: module -generated_by: ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION + # Use a list to preserve order. + my @meta_to_mm = ( + name => $self->{DISTNAME}, + version => $self->{VERSION}, + abstract => $self->{ABSTRACT}, + license => $self->{LICENSE} || 'unknown', + generated_by => + "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION", + author => $self->{AUTHOR}, + distribution_type => $self->{PM} ? 'module' : 'script', + ); + + my $meta = "--- #YAML:1.0\n"; + + while( @meta_to_mm ) { + my($key, $val) = splice @meta_to_mm, 0, 2; + + $val = '~' unless defined $val; + + $meta .= sprintf "%-20s %s\n", "$key:", $val; + }; + + $meta .= <; + version: 1.1 YAML + $meta .= $self->{EXTRA_META} if $self->{EXTRA_META}; + my @write_meta = $self->echo($meta, 'META_new.yml'); return sprintf <<'MAKE_FRAG', join("\n\t", @write_meta); @@ -938,6 +978,28 @@ MAKE_FRAG Methods which help initialize the MakeMaker object and macros. +=head3 init_ABSTRACT + + $mm->init_ABSTRACT + +=cut + +sub init_ABSTRACT { + my $self = shift; + + if( $self->{ABSTRACT_FROM} and $self->{ABSTRACT} ) { + warn "Both ABSTRACT_FROM and ABSTRACT are set. ". + "Ignoring ABSTRACT_FROM.\n"; + return; + } + + if ($self->{ABSTRACT_FROM}){ + $self->{ABSTRACT} = $self->parse_abstract($self->{ABSTRACT_FROM}) or + carp "WARNING: Setting ABSTRACT via file ". + "'$self->{ABSTRACT_FROM}' failed\n"; + } +} + =head3 init_INST $mm->init_INST; @@ -1000,12 +1062,12 @@ INSTALLDIRS) and *PREFIX. sub init_INSTALL { my($self) = shift; - if( $self->{ARGS}{INSTALLBASE} and $self->{ARGS}{PREFIX} ) { - die "Only one of PREFIX or INSTALLBASE can be given. Not both.\n"; + if( $self->{ARGS}{INSTALL_BASE} and $self->{ARGS}{PREFIX} ) { + die "Only one of PREFIX or INSTALL_BASE can be given. Not both.\n"; } - if( $self->{ARGS}{INSTALLBASE} ) { - $self->init_INSTALL_from_INSTALLBASE; + if( $self->{ARGS}{INSTALL_BASE} ) { + $self->init_INSTALL_from_INSTALL_BASE; } else { $self->init_INSTALL_from_PREFIX; @@ -1231,9 +1293,9 @@ sub init_INSTALL_from_PREFIX { } -=head3 init_from_INSTALLBASE +=head3 init_from_INSTALL_BASE - $mm->init_from_INSTALLBASE + $mm->init_from_INSTALL_BASE =cut @@ -1246,11 +1308,11 @@ my %map = ( ); $map{script} = $map{bin}; -sub init_INSTALL_from_INSTALLBASE { +sub init_INSTALL_from_INSTALL_BASE { my $self = shift; @{$self}{qw(PREFIX VENDORPREFIX SITEPREFIX PERLPREFIX)} = - '$(INSTALLBASE)'; + '$(INSTALL_BASE)'; my %install; foreach my $thing (keys %map) { @@ -1259,7 +1321,7 @@ sub init_INSTALL_from_INSTALLBASE { my $key = "INSTALL".$dir.$uc_thing; $install{$key} ||= - $self->catdir('$(INSTALLBASE)', @{$map{$thing}}); + $self->catdir('$(INSTALL_BASE)', @{$map{$thing}}); } } @@ -1317,9 +1379,8 @@ sub init_VERSION { if ($self->{VERSION_FROM}){ $self->{VERSION} = $self->parse_version($self->{VERSION_FROM}); if( $self->{VERSION} eq 'undef' ) { - require Carp; - Carp::carp("WARNING: Setting VERSION via file ". - "'$self->{VERSION_FROM}' failed\n"); + carp("WARNING: Setting VERSION via file ". + "'$self->{VERSION_FROM}' failed\n"); } } @@ -1372,8 +1433,7 @@ Defines at least these macros. MAKEFILE_OLD MAKE_APERL_FILE File used by MAKE_APERL - SHELL Program used to run - shell commands + SHELL Program used to run shell commands ECHO Print text adding a newline on the end RM_F Remove a file @@ -1446,7 +1506,19 @@ sub init_platform { } +=head3 init_MAKE + + $mm->init_MAKE +Initialize MAKE from either a MAKE environment variable or $Config{make}. + +=cut + +sub init_MAKE { + my $self = shift; + + $self->{MAKE} ||= $ENV{MAKE} || $Config{make}; +} =head2 Tools diff --git a/lib/ExtUtils/MM_NW5.pm b/lib/ExtUtils/MM_NW5.pm index 6d9c492..0ce4f32 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.08'; +$VERSION = '2.08_01'; require ExtUtils::MM_Win32; @ISA = qw(ExtUtils::MM_Win32); @@ -34,7 +34,6 @@ $ENV{EMXSHELL} = 'sh'; # to run `commands` my $BORLAND = $Config{'cc'} =~ /^bcc/i; my $GCC = $Config{'cc'} =~ /^gcc/i; -my $DMAKE = $Config{'make'} =~ /^dmake/i; =item os_flavor diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 7884328..1b4822b 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -4,7 +4,6 @@ require 5.005_03; # Maybe further back, dunno use strict; -use Exporter (); use Carp; use ExtUtils::MakeMaker::Config; use File::Basename qw(basename dirname); @@ -14,7 +13,6 @@ use vars qw($VERSION @ISA $Is_OS2 $Is_VMS $Is_Win32 $Is_Dos $Is_OSF $Is_IRIX $Is_NetBSD $Is_BSD $Is_SunOS4 $Is_Solaris $Is_SunOS $Is_Interix - $Verbose %pm %Config_Override ); @@ -375,7 +373,7 @@ sub constants { INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB INST_MAN1DIR INST_MAN3DIR MAN1EXT MAN3EXT - INSTALLDIRS INSTALLBASE DESTDIR PREFIX + INSTALLDIRS INSTALL_BASE DESTDIR PREFIX PERLPREFIX SITEPREFIX VENDORPREFIX ), (map { ("INSTALL".$_, @@ -1049,7 +1047,7 @@ WARNING print "Using PERL=$abs\n" if $trace; return $abs; } elsif ($trace >= 2) { - print "Result: '$val'\n"; + print "Result: '$val' ".($? >> 8)."\n"; } } } @@ -1230,8 +1228,8 @@ sub has_link_code { =item init_dirscan -Scans the directory structure and initializes DIR, XS, XS_FILES, PM, -C, C_FILES, O_FILES, H, H_FILES, PL_FILES, MAN*PODS, EXE_FILES. +Scans the directory structure and initializes DIR, XS, XS_FILES, +C, C_FILES, O_FILES, H, H_FILES, PL_FILES, EXE_FILES. Called by init_main. @@ -1239,8 +1237,7 @@ Called by init_main. sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc) my($self) = @_; - my($name, %dir, %xs, %c, %h, %pl_files, %manifypods); - my %pm; + my($name, %dir, %xs, %c, %h, %pl_files, %pm); my %ignore = map {( $_ => 1 )} qw(Makefile.PL Build.PL test.pl t); @@ -1284,6 +1281,145 @@ sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc) } } + $self->{PL_FILES} ||= \%pl_files; + $self->{DIR} ||= [sort keys %dir]; + $self->{XS} ||= \%xs; + $self->{C} ||= [sort keys %c]; + $self->{H} ||= [sort keys %h]; + $self->{PM} ||= \%pm; + + my @o_files = @{$self->{C}}; + $self->{O_FILES} = [grep s/\.c(pp|xx|c)?\z/$self->{OBJ_EXT}/i, @o_files]; +} + + +=item init_MANPODS + +Determines if man pages should be generated and initializes MAN1PODS +and MAN3PODS as appropriate. + +=cut + +sub init_MANPODS { + my $self = shift; + + # Set up names of manual pages to generate from pods + foreach my $man (qw(MAN1 MAN3)) { + $self->{"BUILD${man}PODS"} = 1; + + unless ($self->{"${man}PODS"}) { + $self->{"${man}PODS"} = {}; + $self->{"BUILD${man}PODS"} = 0 if + $self->{"INSTALL${man}DIR"} =~ /^(none|\s*)$/; + } + } + + $self->init_MAN1PODS() if $self->{BUILDMAN1PODS}; + $self->init_MAN3PODS() if $self->{BUILDMAN3PODS}; +} + + +sub _has_pod { + my($self, $file) = @_; + + local *FH; + my($ispod)=0; + if (open(FH,"<$file")) { + while () { + if (/^=(?:head\d+|item|pod)\b/) { + $ispod=1; + last; + } + } + close FH; + } else { + # If it doesn't exist yet, we assume, it has pods in it + $ispod = 1; + } + + return $ispod; +} + + +=item init_MAN1PODS + +Initializes MAN1PODS from the list of EXE_FILES. + +=cut + +sub init_MAN1PODS { + my($self) = @_; + + if ( exists $self->{EXE_FILES} ) { + foreach my $name (@{$self->{EXE_FILES}}) { + next unless $self->_has_pod($name); + + $self->{MAN1PODS}->{$name} = + $self->catfile("\$(INST_MAN1DIR)", + basename($name).".\$(MAN1EXT)"); + } + } +} + + +=item init_MAN3PODS + +Initializes MAN3PODS from the list of PM files. + +=cut + +sub init_MAN3PODS { + my $self = shift; + + my %manifypods = (); # we collect the keys first, i.e. the files + # we have to convert to pod + + foreach my $name (keys %{$self->{PM}}) { + if ($name =~ /\.pod\z/ ) { + $manifypods{$name} = $self->{PM}{$name}; + } elsif ($name =~ /\.p[ml]\z/ ) { + if( $self->_has_pod($name) ) { + $manifypods{$name} = $self->{PM}{$name}; + } + } + } + + my $parentlibs_re = join '|', @{$self->{PMLIBPARENTDIRS}}; + + # Remove "Configure.pm" and similar, if it's not the only pod listed + # To force inclusion, just name it "Configure.pod", or override + # MAN3PODS + foreach my $name (keys %manifypods) { + if ($self->{PERL_CORE} and $name =~ /(config|setup).*\.pm/is) { + delete $manifypods{$name}; + next; + } + my($manpagename) = $name; + $manpagename =~ s/\.p(od|m|l)\z//; + # everything below lib is ok + unless($manpagename =~ s!^\W*($parentlibs_re)\W+!!s) { + $manpagename = $self->catfile( + split(/::/,$self->{PARENT_NAME}),$manpagename + ); + } + $manpagename = $self->replace_manpage_separator($manpagename); + $self->{MAN3PODS}->{$name} = + $self->catfile("\$(INST_MAN3DIR)", "$manpagename.\$(MAN3EXT)"); + } +} + + +=item init_PM + +Initializes PMLIBDIRS and PM from PMLIBDIRS. + +=cut + +sub init_PM { + my $self = shift; + + my $pm = $self->{PM}; + # Some larger extensions often wish to install a number of *.pm/pl # files into the library in various locations. @@ -1325,12 +1461,16 @@ sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc) # Avoid $_ wherever possible: # @{$self->{PMLIBDIRS}} = grep -d && !$dir{$_}, @{$self->{PMLIBDIRS}}; my (@pmlibdirs) = @{$self->{PMLIBDIRS}}; - my ($pmlibdir); @{$self->{PMLIBDIRS}} = (); - foreach $pmlibdir (@pmlibdirs) { + my %dir = map { ($_ => $_) } @{$self->{DIR}}; + foreach my $pmlibdir (@pmlibdirs) { -d $pmlibdir && !$dir{$pmlibdir} && push @{$self->{PMLIBDIRS}}, $pmlibdir; } + unless( $self->{PMLIBPARENTDIRS} ) { + @{$self->{PMLIBPARENTDIRS}} = ('lib'); + } + if (@{$self->{PMLIBDIRS}}){ print "Searching PMLIBDIRS: @{$self->{PMLIBDIRS}}\n" if ($Verbose >= 2); @@ -1350,116 +1490,22 @@ sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc) my $prefix = $self->{INST_LIBDIR}; my $striplibpath; + my $parentlibs_re = join '|', @{$self->{PMLIBPARENTDIRS}}; $prefix = $self->{INST_LIB} - if ($striplibpath = $path) =~ s:^(\W*)lib\W:$1:i; + if ($striplibpath = $path) =~ s{^(\W*)($parentlibs_re)\W} + {$1}i; my($inst) = $self->catfile($prefix,$striplibpath); local($_) = $inst; # for backwards compatibility $inst = $self->libscan($inst); print "libscan($path) => '$inst'\n" if ($Verbose >= 2); return unless $inst; - $pm{$path} = $inst; + $pm->{$path} = $inst; }, @{$self->{PMLIBDIRS}}); } - - $self->{PM} ||= \%pm; - $self->{PL_FILES} ||= \%pl_files; - - $self->{DIR} ||= [sort keys %dir]; - - $self->{XS} ||= \%xs; - $self->{C} ||= [sort keys %c]; - my @o_files = @{$self->{C}}; - $self->{O_FILES} = [grep s/\.c(pp|xx|c)?\z/$self->{OBJ_EXT}/i, @o_files]; - - $self->{H} ||= [sort keys %h]; - - # Set up names of manual pages to generate from pods - my %pods; - foreach my $man (qw(MAN1 MAN3)) { - unless ($self->{"${man}PODS"}) { - $self->{"${man}PODS"} = {}; - $pods{$man} = 1 unless - $self->{"INSTALL${man}DIR"} =~ /^(none|\s*)$/; - } - } - - if ($pods{MAN1}) { - if ( exists $self->{EXE_FILES} ) { - foreach $name (@{$self->{EXE_FILES}}) { - local *FH; - my($ispod)=0; - if (open(FH,"<$name")) { - while () { - if (/^=(?:head\d+|item|pod)\b/) { - $ispod=1; - last; - } - } - close FH; - } else { - # If it doesn't exist yet, we assume, it has pods in it - $ispod = 1; - } - next unless $ispod; - if ($pods{MAN1}) { - $self->{MAN1PODS}->{$name} = - $self->catfile("\$(INST_MAN1DIR)", basename($name).".\$(MAN1EXT)"); - } - } - } - } - if ($pods{MAN3}) { - my %manifypods = (); # we collect the keys first, i.e. the files - # we have to convert to pod - foreach $name (keys %{$self->{PM}}) { - if ($name =~ /\.pod\z/ ) { - $manifypods{$name} = $self->{PM}{$name}; - } elsif ($name =~ /\.p[ml]\z/ ) { - local *FH; - my($ispod)=0; - if (open(FH,"<$name")) { - while () { - if (/^=head1\s+\w+/) { - $ispod=1; - last; - } - } - close FH; - } else { - $ispod = 1; - } - if( $ispod ) { - $manifypods{$name} = $self->{PM}{$name}; - } - } - } - - # Remove "Configure.pm" and similar, if it's not the only pod listed - # To force inclusion, just name it "Configure.pod", or override - # MAN3PODS - foreach $name (keys %manifypods) { - if ($self->{PERL_CORE} and $name =~ /(config|setup).*\.pm/is) { - delete $manifypods{$name}; - next; - } - my($manpagename) = $name; - $manpagename =~ s/\.p(od|m|l)\z//; - # everything below lib is ok - unless($manpagename =~ s!^\W*lib\W+!!s) { - $manpagename = $self->catfile( - split(/::/,$self->{PARENT_NAME}),$manpagename - ); - } - if ($pods{MAN3}) { - $manpagename = $self->replace_manpage_separator($manpagename); - $self->{MAN3PODS}->{$name} = - $self->catfile("\$(INST_MAN3DIR)", "$manpagename.\$(MAN3EXT)"); - } - } - } } + =item init_DIRFILESEP Using / for Unix. Called by init_main. @@ -1604,15 +1650,18 @@ from the perl source tree. and not $old){ # Maybe somebody tries to build an extension with an # uninstalled Perl outside of Perl build tree - my $found; + my $lib; for my $dir (@INC) { - $found = $dir, last if -e $self->catdir($dir, "Config.pm"); + $lib = $dir, last if -e $self->catdir($dir, "Config.pm"); } - if ($found) { - my $inc = dirname $found; + if ($lib) { + # Win32 puts its header files in /perl/src/lib/CORE. + # Unix leaves them in /perl/src. + my $inc = $Is_Win32 ? $self->catdir($lib, "CORE" ) + : dirname $lib; if (-e $self->catdir($inc, "perl.h")) { - $self->{PERL_LIB} = $found; - $self->{PERL_ARCHLIB} = $found; + $self->{PERL_LIB} = $lib; + $self->{PERL_ARCHLIB} = $lib; $self->{PERL_INC} = $inc; $self->{UNINSTALLED_PERL} = 1; print STDOUT <{$key}; @@ -2900,12 +2949,6 @@ for a binary distribution. sub ppd { my($self) = @_; - if ($self->{ABSTRACT_FROM}){ - $self->{ABSTRACT} = $self->parse_abstract($self->{ABSTRACT_FROM}) or - carp "WARNING: Setting ABSTRACT via file ". - "'$self->{ABSTRACT_FROM}' failed\n"; - } - my ($pack_ver) = join ",", (split (/\./, $self->{VERSION}), (0)x4)[0..3]; my $abstract = $self->{ABSTRACT} || ''; @@ -3143,7 +3186,7 @@ sub oneliner { $switches = join ' ', @$switches; - return qq{\$(ABSPERLRUN) $switches -e $cmd}; + return qq{\$(ABSPERLRUN) $switches -e $cmd --}; } diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm index cb3efad..c61f5b0 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.73'; +$VERSION = '5.73_02'; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; @@ -1732,7 +1732,7 @@ sub oneliner { # Switches must be quoted else they will be lowercased. $switches = join ' ', map { qq{"$_"} } @$switches; - return qq{\$(ABSPERLRUN) $switches -e $cmd}; + return qq{\$(ABSPERLRUN) $switches -e $cmd --}; } diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm index 4998c74..f800367 100644 --- a/lib/ExtUtils/MM_Win32.pm +++ b/lib/ExtUtils/MM_Win32.pm @@ -24,19 +24,17 @@ use File::Basename; use File::Spec; use ExtUtils::MakeMaker qw( neatvalue ); -use vars qw(@ISA $VERSION $BORLAND $GCC $DMAKE $NMAKE); +use vars qw(@ISA $VERSION); require ExtUtils::MM_Any; require ExtUtils::MM_Unix; @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -$VERSION = '1.12'; +$VERSION = '1.12_01'; $ENV{EMXSHELL} = 'sh'; # to run `commands` -$BORLAND = 1 if $Config{'cc'} =~ /^bcc/i; -$GCC = 1 if $Config{'cc'} =~ /^gcc/i; -$DMAKE = 1 if $Config{'make'} =~ /^dmake/i; -$NMAKE = 1 if $Config{'make'} =~ /^nmake/i; +my $BORLAND = 1 if $Config{'cc'} =~ /^bcc/i; +my $GCC = 1 if $Config{'cc'} =~ /^gcc/i; =head2 Overridden methods @@ -130,10 +128,12 @@ Using \ for Windows. sub init_DIRFILESEP { my($self) = shift; + my $make = $self->make; + # The ^ makes sure its not interpreted as an escape in nmake - $self->{DIRFILESEP} = $NMAKE ? '^\\' : - $DMAKE ? '\\\\' - : '\\'; + $self->{DIRFILESEP} = $make eq 'nmake' ? '^\\' : + $make eq 'dmake' ? '\\\\' + : '\\'; } =item B @@ -236,7 +236,7 @@ sub special_targets { my $make_frag = $self->SUPER::special_targets; - $make_frag .= <<'MAKE_FRAG' if $DMAKE; + $make_frag .= <<'MAKE_FRAG' if $self->make eq 'dmake'; .USESHELL : MAKE_FRAG @@ -331,7 +331,8 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP). } elsif ($BORLAND) { push(@m, q{ $(LD) $(LDDLFLAGS) $(OTHERLDFLAGS) }.$ldfrom.q{,$@,,} - .($DMAKE ? q{$(PERL_ARCHIVE:s,/,\,) $(LDLOADLIBS:s,/,\,) } + .($self->make eq 'dmake' + ? q{$(PERL_ARCHIVE:s,/,\,) $(LDLOADLIBS:s,/,\,) } .q{$(MYEXTLIB:s,/,\,),$(EXPORT_LIST:s,/,\,)} : q{$(subst /,\,$(PERL_ARCHIVE)) $(subst /,\,$(LDLOADLIBS)) } .q{$(subst /,\,$(MYEXTLIB)),$(subst /,\,$(EXPORT_LIST))}) @@ -410,7 +411,7 @@ banner. sub pasthru { my($self) = shift; - return "PASTHRU = " . ($NMAKE ? "-nologo" : ""); + return "PASTHRU = " . ($self->make eq 'nmake' ? "-nologo" : ""); } @@ -434,7 +435,7 @@ sub oneliner { $switches = join ' ', @$switches; - return qq{\$(ABSPERLRUN) $switches -e $cmd}; + return qq{\$(ABSPERLRUN) $switches -e $cmd --}; } @@ -449,7 +450,7 @@ sub quote_literal { # quotes; however it transforms {{ into { either inside and outside double # quotes. It also translates }} into }. The escaping below is not # 100% correct. - if( $DMAKE ) { + if( $self->make eq 'dmake' ) { $text =~ s/{/{{/g; $text =~ s/}}/}}}/g; } @@ -486,7 +487,7 @@ what MakeMaker needs. sub cd { my($self, $dir, @cmds) = @_; - return $self->SUPER::cd($dir, @cmds) unless $NMAKE; + return $self->SUPER::cd($dir, @cmds) unless $self->make eq 'nmake'; my $cmd = join "\n\t", map "$_", @cmds; diff --git a/lib/ExtUtils/MM_Win95.pm b/lib/ExtUtils/MM_Win95.pm index 003f810..7f20ab9 100644 --- a/lib/ExtUtils/MM_Win95.pm +++ b/lib/ExtUtils/MM_Win95.pm @@ -1,7 +1,7 @@ package ExtUtils::MM_Win95; use vars qw($VERSION @ISA); -$VERSION = '0.04'; +$VERSION = '0.04_01'; require ExtUtils::MM_Win32; @ISA = qw(ExtUtils::MM_Win32); diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index d7aa75d..3e7da37 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -1,4 +1,4 @@ -# $Id: /local/schwern.org/CPAN/ExtUtils-MakeMaker/trunk/lib/ExtUtils/MakeMaker.pm 4535 2005-05-20T23:08:34.937906Z schwern $ +# $Id: /local/svn.schwern.org/CPAN/ExtUtils-MakeMaker/trunk/lib/ExtUtils/MakeMaker.pm 2539 2005-08-17T06:53:55.009300Z schwern $ package ExtUtils::MakeMaker; BEGIN {require 5.005_03;} @@ -21,8 +21,8 @@ use vars qw( use vars qw($Revision); use strict; -$VERSION = '6.30_01'; -($Revision = q$Revision: 4535 $) =~ /Revision:\s+(\S+)/; +$VERSION = '6.30_02'; +$Revision = (q$Revision: 2539 $) =~ /Revision:\s+(\S+)/; @ISA = qw(Exporter); @EXPORT = qw(&WriteMakefile &writeMakefile $Verbose &prompt); @@ -85,6 +85,7 @@ my %Special_Sigs = ( PL_FILES => 'hash', PM => 'hash', PMLIBDIRS => 'array', + PMLIBPARENTDIRS => 'array', PREREQ_PM => 'hash', SKIP => 'array', TYPEMAPS => 'array', @@ -208,13 +209,13 @@ 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 + EXCLUDE_EXT EXE_FILES EXTRA_META FIRST_MAKEFILE FULLPERL FULLPERLRUN FULLPERLRUNINST FUNCLIST H IMPORTS INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB INST_MAN1DIR INST_MAN3DIR INSTALLDIRS - DESTDIR PREFIX INSTALLBASE + DESTDIR PREFIX INSTALL_BASE PERLPREFIX SITEPREFIX VENDORPREFIX INSTALLPRIVLIB INSTALLSITELIB INSTALLVENDORLIB INSTALLARCHLIB INSTALLSITEARCH INSTALLVENDORARCH @@ -226,12 +227,12 @@ sub full_setup { PERL_LIB PERL_ARCHLIB SITELIBEXP SITEARCHEXP - INC INCLUDE_EXT LDFROM LIB LIBPERL_A LIBS - LINKTYPE MAKEAPERL MAKEFILE MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET + INC INCLUDE_EXT LDFROM LIB LIBPERL_A LIBS LICENSE + LINKTYPE MAKE MAKEAPERL MAKEFILE MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET MYEXTLIB NAME NEEDS_LINKING NOECHO NO_META NORECURS NO_VC OBJECT OPTIMIZE PERL_MALLOC_OK PERL PERLMAINCC PERLRUN PERLRUNINST PERL_CORE PERL_SRC PERM_RW PERM_RWX - PL_FILES PM PM_FILTER PMLIBDIRS POLLUTE PPM_INSTALL_EXEC + PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE PPM_INSTALL_EXEC PPM_INSTALL_SCRIPT PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ SIGN SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG XS_VERSION clean depend dist dynamic_lib linkext macro realclean @@ -281,7 +282,10 @@ sub full_setup { push @Overridable, qw[ libscan makeaperl needs_linking perm_rw perm_rwx - subdir_x test_via_harness test_via_script init_PERL + subdir_x test_via_harness test_via_script + + init_VERSION init_dist init_INST init_INSTALL init_DEST init_dirscan + init_PM init_MANPODS init_xs init_PERL init_DIRFILESEP init_linker ]; push @MM_Sections, qw[ @@ -300,9 +304,9 @@ sub full_setup { # we will use all these variables in the Makefile @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 full_ar + ar cc cccdlflags ccdlflags dlext dlsrc exe_ext full_ar ld + lddlflags ldflags libc lib_ext obj_ext osname osvers ranlib + sitelibexp sitearchexp so ); # 5.5.3 doesn't have any concept of vendor libs @@ -491,6 +495,7 @@ sub new { ($self->{NAME_SYM} = $self->{NAME}) =~ s/\W+/_/g; + $self->init_MAKE; $self->init_main; $self->init_VERSION; $self->init_dist; @@ -498,10 +503,13 @@ sub new { $self->init_INSTALL; $self->init_DEST; $self->init_dirscan; + $self->init_PM; + $self->init_MANPODS; $self->init_xs; $self->init_PERL; $self->init_DIRFILESEP; $self->init_linker; + $self->init_ABSTRACT; if (! $self->{PERL_SRC} ) { require VMS::Filespec if $Is_VMS; @@ -1452,6 +1460,10 @@ If your executables start with something like #!perl or 'Makefile.PL' was invoked with so the programs will be sure to run properly even if perl is not in /usr/bin/perl. +=item EXTRA_META + +Extra text to be appended to the generated META.yml. + =item FIRST_MAKEFILE The name of the Makefile to be produced. This is used for the second @@ -1689,12 +1701,35 @@ you specify a scalar as in MakeMaker will turn it into an array with one element. +=item LICENSE + +The licensing terms of your distribution. Generally its "perl" for the +same license as Perl itself. + +See L for the list of options. + +Defaults to "unknown". + =item LINKTYPE 'static' or 'dynamic' (default unless usedl=undef in config.sh). Should only be used to force static linking (also see linkext below). +=item MAKE + +Variant of make you intend to run the generated Makefile with. This +parameter lets Makefile.PL know what make quirks to account for when +generating the Makefile. + +MakeMaker also honors the MAKE environment variable. This parameter +takes precedent. + +Currently the only significant values are 'dmake' and 'nmake' for Windows +users. + +Defaults to $Config{make}. + =item MAKEAPERL Boolean which tells MakeMaker, that it should include the rules to @@ -2100,7 +2135,7 @@ MakeMaker object. The following lines will be parsed o.k.: $VERSION = '1.00'; *VERSION = \'1.01'; - $VERSION = sprintf "%d.%03d", q$Revision: 4535 $ =~ /(\d+)/g; + $VERSION = (q$Revision: 2539 $) =~ /(\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/FAQ.pod b/lib/ExtUtils/MakeMaker/FAQ.pod index facc42c..6d17ff5 100644 --- a/lib/ExtUtils/MakeMaker/FAQ.pod +++ b/lib/ExtUtils/MakeMaker/FAQ.pod @@ -1,7 +1,7 @@ package ExtUtils::MakeMaker::FAQ; use vars qw($VERSION); -$VERSION = '1.11'; +$VERSION = '1.11_01'; 1; __END__ @@ -116,16 +116,19 @@ Simplest way to do it automatically is to use your version control system's revision number (you are using version control, right?). In CVS, RCS and SVN you use $Revision$ (see the documentation of your -version control system for details) writing it like so: +version control system for details). Every time the file is checked +in the $Revision$ will be updated, updating your $VERSION. - $VERSION = sprintf "%d.%03d", q$Revision$ =~ /(\d+)/g; +SVN uses a simple integer for $Revision$ so you can adapt it for your +$VERSION like so: -Every time the file is checked in the $Revision$ will be updated, -updating your $VERSION. + $VERSION = (q$Revision$) =~ /(\d+)/g; -In CVS version 1.9 is followed by 1.10. Since CPAN compares version -numbers numerically we use a sprintf() to convert 1.9 to 1.009 and -1.10 to 1.010 which compare properly. +In CVS and RCS version 1.9 is followed by 1.10. Since CPAN compares +version numbers numerically we use a sprintf() to convert 1.9 to 1.009 +and 1.10 to 1.010 which compare properly. + + $VERSION = sprintf "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/g; If branches are involved (ie. $Revision: 1.5.3.4$) its a little more complicated. @@ -133,6 +136,15 @@ complicated. # must be all on one line or MakeMaker will get confused. $VERSION = do { my @r = (q$Revision$ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r }; +In SVN, $Revision$ should be the same for every file in the project so +they would all have the same $VERSION. CVS and RCS have a different +$Revision$ per file so each file will have a differnt $VERSION. +Distributed version control systems, such as SVK, may have a different +$Revision$ based on who checks out the file leading to a different $VERSION +on each machine! Finally, some distributed version control systems, such +as darcs, have no concept of revision number at all. + + =item What's this F thing and how did it get in my F?! F is a module meta-data file pioneered by Module::Build and diff --git a/lib/ExtUtils/PATCHING b/lib/ExtUtils/PATCHING index 30cb21f..e4b9cb2 100644 --- a/lib/ExtUtils/PATCHING +++ b/lib/ExtUtils/PATCHING @@ -1,3 +1,8 @@ +"The easy way is always mined. + The important things are always simple. + The simple things are always hard." + -- Some of Murphy's Laws of Combat + This is a short set of guidelines for those patching ExtUtils::MakeMaker. Its not an iron-clad set of rules, but just things which make life easier when reading and integrating a patch. @@ -127,12 +132,20 @@ Cross-Platform Compatibility - Use $(NOECHO) instead of @. +- Use - to tell make to ignore the exit code of a command. (Unfortunately, + some make variants don't honor an $(IGNORE) macro). + - Always put a space between $(NOECHO) and the command. - Always put a space between - (ignore) and the command. - Always put $(NOECHO) and - together, no space between them. + # Right + -$(NOECHO) command + $(NOECHO) command + - command + - Often when you patch ExtUtils::MM_Unix, similar patches must be done to the other MM_* modules. If you can, please do this extra work otherwise I have to. If you can't, that's ok. We can help. diff --git a/lib/ExtUtils/t/Command.t b/lib/ExtUtils/t/Command.t index 22eabe5..92b61bf 100644 --- a/lib/ExtUtils/t/Command.t +++ b/lib/ExtUtils/t/Command.t @@ -58,7 +58,7 @@ BEGIN { ok( test_f(), 'testing non-existent file' ); @ARGV = ( $Testfile ); - cmp_ok( ! test_f(), '==', defined (-f $Testfile), 'testing non-existent file' ); + cmp_ok( ! test_f(), '==', (-f $Testfile), 'testing non-existent file' ); # these are destructive, have to keep setting @ARGV @ARGV = ( $Testfile ); diff --git a/lib/ExtUtils/t/FIRST_MAKEFILE.t b/lib/ExtUtils/t/FIRST_MAKEFILE.t index 00e6082..731dd34 100644 --- a/lib/ExtUtils/t/FIRST_MAKEFILE.t +++ b/lib/ExtUtils/t/FIRST_MAKEFILE.t @@ -36,5 +36,5 @@ 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, +ok( grep(/^Writing jakefile for Big::Dummy/, @mpl_out) == 1, 'Makefile.PL output looks right' ); diff --git a/lib/ExtUtils/t/installbase.t b/lib/ExtUtils/t/INSTALL_BASE.t similarity index 95% rename from lib/ExtUtils/t/installbase.t rename to lib/ExtUtils/t/INSTALL_BASE.t index e22c3de..cac65f2 100644 --- a/lib/ExtUtils/t/installbase.t +++ b/lib/ExtUtils/t/INSTALL_BASE.t @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -# Tests INSTALLBASE +# Tests INSTALL_BASE BEGIN { if( $ENV{PERL_CORE} ) { @@ -35,7 +35,7 @@ END { ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy") || diag("chdir failed; $!"); -my @mpl_out = run(qq{$perl Makefile.PL "INSTALLBASE=../dummy-install"}); +my @mpl_out = run(qq{$perl Makefile.PL "INSTALL_BASE=../dummy-install"}); END { rmtree '../dummy-install'; } cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || diff --git a/lib/ExtUtils/t/MM_NW5.t b/lib/ExtUtils/t/MM_NW5.t index 13359d1..f8a3635 100644 --- a/lib/ExtUtils/t/MM_NW5.t +++ b/lib/ExtUtils/t/MM_NW5.t @@ -16,7 +16,7 @@ use Test::More; BEGIN { if ($^O =~ /NetWare/i) { - plan tests => 40; + plan tests => 39; } else { plan skip_all => 'This is not NW5'; } @@ -254,21 +254,6 @@ unlink "${script_name}$script_ext" if -f "${script_name}$script_ext"; 'tool_autosplit()' ); } -# tools_other() -{ - ( my $mm_w32 = bless { }, 'MM' )->init_others(); - - my $bin_sh = ( $Config{make} =~ /^dmake/i - ? "" : ($Config{sh} || 'cmd /c') . "\n" ); - $bin_sh = "SHELL = $bin_sh" if $bin_sh; - - my $tools = join "\n", map "$_ = $mm_w32->{ $_ }" - => qw(CHMOD CP LD MV NOOP RM_F RM_RF TEST_F TOUCH UMASK_NULL DEV_NULL); - - like( $mm_w32->tools_other(), - qr/^\Q$bin_sh$tools/m, - 'tools_other()' ); -}; # xs_o() should look into that # top_targets() should look into that diff --git a/lib/ExtUtils/t/MM_Win32.t b/lib/ExtUtils/t/MM_Win32.t index 7acde33..ca870d5 100644 --- a/lib/ExtUtils/t/MM_Win32.t +++ b/lib/ExtUtils/t/MM_Win32.t @@ -163,10 +163,15 @@ delete $ENV{PATHEXT} unless $had_pathext; } # path() +my $had_path = exists $ENV{PATH}; { - ok( eq_array( [ $MM->path() ], [ File::Spec->path ] ), + my @path_eg = ( qw( . .. ), 'C:\\Program Files' ); + local $ENV{PATH} = join ';', @path_eg; + ok( eq_array( [ $MM->path() ], [ @path_eg ] ), 'path() [preset]' ); } +# Bug in Perl. local $ENV{FOO} will not delete key afterwards. +delete $ENV{PATH} unless $had_path; # static_lib() should look into that # dynamic_bs() should look into that diff --git a/lib/ExtUtils/t/Manifest.t b/lib/ExtUtils/t/Manifest.t index 47e555b..396789e 100644 --- a/lib/ExtUtils/t/Manifest.t +++ b/lib/ExtUtils/t/Manifest.t @@ -100,7 +100,7 @@ is( $res, 'bar', 'bar reported as new' ); ($res, $warn) = do { local $ExtUtils::Manifest::Quiet = 1; catch_warning( \&skipcheck ) }; -ok( ! defined $warn, 'disabled warnings' ); +cmp_ok( $warn, 'eq', '', 'disabled warnings' ); # add a skip file with a rule to skip itself (and the nonexistent glob '*baz*') add_file( 'MANIFEST.SKIP', "baz\n.SKIP" ); @@ -150,16 +150,8 @@ is_deeply( [sort map { lc } @copies], [sort map { lc } keys %$files] ); foreach my $orig (@copies) { my $copy = "copy/$orig"; ok( -r $copy, "$copy: must be readable" ); - - SKIP: { - skip " original was not writable", 1 unless -w $orig; - ok(-w $copy, " writable if original was" ); - } - - SKIP: { - skip " original was not executable", 1 unless -x $orig; - ok(-x $copy, " executable if original was" ); - } + is( -w $copy, -w $orig, " writable if original was" ); + is( -x $copy, -x $orig, " executable if original was" ); } rmtree('copy'); diff --git a/lib/ExtUtils/t/basic.t b/lib/ExtUtils/t/basic.t index 2788b6e..ba47687 100644 --- a/lib/ExtUtils/t/basic.t +++ b/lib/ExtUtils/t/basic.t @@ -25,14 +25,11 @@ use File::Path; # 'make disttest' sets a bunch of environment variables which interfere # with our testing. -delete @ENV{qw(PREFIX LIB MAKEFLAGS MAKE_JOBS_FIFO)}; +delete @ENV{qw(PREFIX LIB MAKEFLAGS)}; my $perl = which_perl(); my $Is_VMS = $^O eq 'VMS'; -# GNV logical interferes with testing -$ENV{'bin'} = '[.bin]' if $Is_VMS; - chdir 't'; perl_lib; diff --git a/lib/ExtUtils/t/make.t b/lib/ExtUtils/t/make.t new file mode 100644 index 0000000..3a16260 --- /dev/null +++ b/lib/ExtUtils/t/make.t @@ -0,0 +1,24 @@ +#!/usr/bin/perl -w + +BEGIN { + if( $ENV{PERL_CORE} ) { + chdir 't'; + @INC = ('../lib', 'lib/'); + } + else { + unshift @INC, 't/lib/'; + } +} + +use Test::More tests => 3; + +use ExtUtils::MakeMaker; + +my $MM = bless { MAKE => "nmake6" }, "MM"; +is $MM->make, 'nmake'; + +$MM->{MAKE} = 'GNUmake'; +is $MM->make, 'gmake'; + +$MM->{MAKE} = 'MMS'; +is $MM->make, 'mms'; diff --git a/lib/ExtUtils/t/revision.t b/lib/ExtUtils/t/revision.t new file mode 100644 index 0000000..64a8a91 --- /dev/null +++ b/lib/ExtUtils/t/revision.t @@ -0,0 +1,21 @@ +#!/usr/bin/perl -w + +BEGIN { + if( $ENV{PERL_CORE} ) { + chdir 't' if -d 't'; + @INC = ('../lib', 'lib'); + } + else { + unshift @INC, 't/lib'; + } +} + +use Test::More tests => 4; + +BEGIN { + use_ok 'ExtUtils::MakeMaker'; + use_ok 'ExtUtils::MM_VMS'; +} + +like $ExtUtils::MakeMaker::Revision, qr/^(\d)+$/; +like $ExtUtils::MM_VMS::Revision, qr/^(\d)+$/;