From: Michael G. Schwern Date: Sat, 30 Mar 2002 06:41:56 +0000 (-0500) Subject: MM & Encode fixes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=75e2e5517808856c2615c78c5ca3267b18bff381;p=p5sagit%2Fp5-mst-13.2.git MM & Encode fixes Message-ID: <20020330114156.GA16533@blackrider> p4raw-id: //depot/perl@15623 --- diff --git a/MANIFEST b/MANIFEST index 9ac877c..e397b3d 100644 --- a/MANIFEST +++ b/MANIFEST @@ -962,10 +962,10 @@ lib/ExtUtils/MY.pm MakeMaker user override class lib/ExtUtils/Packlist.pm Manipulates .packlist files lib/ExtUtils/t/Big-Fat-Dummy/lib/Big/Fat/Dummy.pm MakeMaker dummy module lib/ExtUtils/t/Big-Fat-Dummy/Makefile.PL MakeMaker dummy module -lib/ExtUtils/t/Big-Fat-Dummy/t/compile.t MakeMaker dummy module lib/ExtUtils/t/Command.t See if ExtUtils::Command works (Win32 only) lib/ExtUtils/t/Constant.t See if ExtUtils::Constant works lib/ExtUtils/t/Embed.t See if ExtUtils::Embed and embedding works +lib/ExtUtils/t/basic.t See if MakeMaker can build a module lib/ExtUtils/t/hints.t See if hint files are honored. lib/ExtUtils/t/Installed.t See if ExtUtils::Installed works lib/ExtUtils/t/Manifest.t See if ExtUtils::Manifest works diff --git a/lib/ExtUtils/Changes b/lib/ExtUtils/Changes index 62c4575..e344887 100644 --- a/lib/ExtUtils/Changes +++ b/lib/ExtUtils/Changes @@ -1,3 +1,17 @@ +5.54_01 Sat Mar 30 02:32:44 EST 2002 + [[ New Features ]] + * Added FULLPERLRUN and FULLPERLRUNINST + + [[ Bug Fixes ]] + - hint files were made a little too noisy in 5.53_01 + + [[ Test Fixes ]] + - mtime appears to be broken on Tru64 5.6.0 + - basic.t was finding the wrong perl in the core + +5.53_02 Fri Mar 29 04:47:44 EST 2002 + - Adjusted for Perl core. Synced into bleadperl. + 5.53_01 Fri Mar 29 00:13:02 EST 2002 [[ Bug Fixes ]] - Removed duplicate NAME macro definition @@ -147,7 +161,7 @@ 5.48_04 Mon Jan 21 19:28:38 EST 2002 - No longer requiring Test::More - Now tested to work with a clean 5.6.1 - - Stripped out $Revision: 1.25 $ based $VERSIONs. + - Stripped out $Revision: 1.27 $ based $VERSIONs. - Rolled in patches from p5p, vmsperl & VOS (14325, 14338, 14360, 14364) * hint files now run in a safer context. Only $self is available. - ExtUtils::testlib now provides absolute paths into @INC. diff --git a/lib/ExtUtils/MM_Cygwin.pm b/lib/ExtUtils/MM_Cygwin.pm index 8e8d99c..3d72aec 100644 --- a/lib/ExtUtils/MM_Cygwin.pm +++ b/lib/ExtUtils/MM_Cygwin.pm @@ -60,7 +60,7 @@ qq[POD2MAN = \$(PERL) -we '%m=\@ARGV;for (keys %m){' \\\n], q[-e 'next if -e $$m{$$_} && -M $$m{$$_} < -M $$_ && -M $$m{$$_} < -M "], $self->{MAKEFILE}, q[";' \\ -e 'print "Manifying $$m{$$_}\n"; $$m{$$_} =~ s/::/./g;' \\ --e 'system(qq[$$^X ].q["-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" $(POD2MAN_EXE) ].qq[$$_>$$m{$$_}])==0 or warn "Couldn\\047t install $$m{$$_}\n";' \\ +-e 'system(qq[$(PERLRUN) $(POD2MAN_EXE) ].qq[$$_>$$m{$$_}])==0 or warn "Couldn\\047t install $$m{$$_}\n";' \\ -e 'chmod(oct($(PERM_RW))), $$m{$$_} or warn "chmod $(PERM_RW) $$m{$$_}: $$!\n";}' ]; push @m, "\nmanifypods : pure_all "; diff --git a/lib/ExtUtils/MM_NW5.pm b/lib/ExtUtils/MM_NW5.pm index 9a3834c..fa3469c 100644 --- a/lib/ExtUtils/MM_NW5.pm +++ b/lib/ExtUtils/MM_NW5.pm @@ -94,8 +94,8 @@ sub constants { PERL_ARCHLIB SITELIBEXP SITEARCHEXP LIBPERL_A MYEXTLIB FIRST_MAKEFILE MAKE_APERL_FILE PERLMAINCC PERL_SRC PERL_INC PERL FULLPERL LIBPTH BASE_IMPORT PERLRUN - PERLRUNINST TEST_LIBS FULL_AR PERL_CORE - NLM_VERSION MPKTOOL TOOLPATH + FULLPERLRUN PERLRUNINST FULLPERLRUNINST TEST_LIBS + FULL_AR PERL_CORE NLM_VERSION MPKTOOL TOOLPATH / ) { next unless defined $self->{$tmp}; diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index ecfe831..c6c2c93 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -16,7 +16,7 @@ use vars qw($VERSION @ISA use ExtUtils::MakeMaker qw($Verbose neatvalue); -$VERSION = '1.17_01'; +$VERSION = '1.18_01'; require ExtUtils::MM_Any; @ISA = qw(ExtUtils::MM_Any); @@ -482,7 +482,8 @@ sub constants { INSTALLSITEARCH INSTALLBIN INSTALLSCRIPT PERL_LIB PERL_ARCHLIB SITELIBEXP SITEARCHEXP LIBPERL_A MYEXTLIB FIRST_MAKEFILE MAKE_APERL_FILE PERLMAINCC PERL_SRC - PERL_INC PERL FULLPERL PERLRUN PERLRUNINST TEST_LIBS + PERL_INC PERL FULLPERL PERLRUN FULLPERLRUN PERLRUNINST + FULLPERLRUNINST TEST_LIBS FULL_AR PERL_CORE NOOP NOECHO / ) { @@ -1455,10 +1456,11 @@ sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc) =item init_main Initializes AR, AR_STATIC_ARGS, BASEEXT, CONFIG, DISTNAME, DLBASE, -EXE_EXT, FULLEXT, FULLPERL, INST_*, INSTALL*, INSTALLDIRS, LD, -LIB_EXT, LIBPERL_A, MAP_TARGET, NAME, OBJ_EXT, PARENT_NAME, PERL, -PERL_ARCHLIB, PERL_INC, PERL_LIB, PERL_SRC, PERLRUN, PERLRUNINST, -PREFIX, TEST_LIBS, VERSION, VERSION_FROM, VERSION_SYM, XS_VERSION. +EXE_EXT, FULLEXT, FULLPERL, FULLPERLRUN, FULLPERLRUNINST, INST_*, +INSTALL*, INSTALLDIRS, LD, LIB_EXT, LIBPERL_A, MAP_TARGET, NAME, +OBJ_EXT, PARENT_NAME, PERL, PERL_ARCHLIB, PERL_INC, PERL_LIB, +PERL_SRC, PERLRUN, PERLRUNINST, PREFIX, TEST_LIBS, VERSION, +VERSION_FROM, VERSION_SYM, XS_VERSION. =cut @@ -1833,64 +1835,14 @@ usually solves this kind of problem. # XS_VERSION macro that defaults to VERSION: $self->{XS_VERSION} ||= $self->{VERSION}; - # --- Initialize Perl Binary Locations - - # Find Perl 5. The only contract here is that both 'PERL' and 'FULLPERL' - # will be working versions of perl 5. - my ($component,@defpath); - foreach $component ($self->{PERL_SRC}, $self->path(), - $Config::Config{binexp}) - { - push @defpath, $component if defined $component; - } - - # Build up a set of file names (not command names). - my $thisperl = File::Spec->canonpath($^X); - $thisperl .= $Config{exe_ext} unless $thisperl =~ m/$Config{exe_ext}$/i; - my @perls = ('perl', 'perl5', "perl$Config{version}"); - @perls = ($thisperl, (map $_.=$Config{exe_ext}, @perls)); - - # miniperl has priority over all but the cannonical perl when in the - # core. Otherwise its a last resort. - my $miniperl = "miniperl$Config{exe_ext}"; - if( $self->{PERL_CORE} ) { - splice @perls, 1, 0, $miniperl; - } - else { - push @perls, $miniperl; - } - - $self->{PERL} ||= - $self->find_perl(5.0, \@perls, \@defpath, $Verbose ); - # don't check if perl is executable, maybe they have decided to - # supply switches with perl - - # Define 'FULLPERL' to be a non-miniperl (used in test: target) - ($self->{FULLPERL} = $self->{PERL}) =~ s/miniperl/perl/i - unless ($self->{FULLPERL}); - - # Are we building the core? - $self->{PERL_CORE} = 0 unless exists $self->{PERL_CORE}; - - # How do we run perl? - $self->{PERLRUN} = $self->{PERL_CORE} ? $self->{PERL} : $self->{FULLPERL}; - $self->{PERLRUN} .= qq{ "-I\$(PERL_LIB)"} if $self->{UNINSTALLED_PERL}; - - # How do we run perl when installing libraries? - $self->{PERLRUNINST} = qq{$self->{PERLRUN} "-I\$(INST_ARCHLIB)" "-I\$(INST_LIB)"}; - # What extra library dirs do we need when running the tests? # Make sure these are absolute paths in case the test chdirs. - $self->{TEST_LIBS} .= join '', - map { ' "-I'.File::Spec->rel2abs($_).'"' } - $self->{INST_ARCHLIB}, $self->{INST_LIB}; + $self->{TEST_LIBS} .= join '', + map { ' "-I'.File::Spec->rel2abs($_).'"' } + $self->{INST_ARCHLIB}, $self->{INST_LIB}; - # When building the core, we need to add some helper libs since - # perl's @INC won't work (we're not installed yet). - foreach my $targ (qw(PERLRUN PERLRUNINST TEST_LIBS)) { - $self->{$targ} .= ' "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)"' - if $self->{PERL_CORE}; - } + # --- Initialize Perl Binary Locations + $self->init_PERL; } =item init_others @@ -1963,6 +1915,79 @@ sub init_others { # --- Initialize Other Attributes $self->{DEV_NULL} ||= "> /dev/null 2>&1"; } +=item init_PERL + + $self->init_PERL; + +Called by init_main. Sets up PERL, FULLPERL, PERLRUN, PERLRUNINST, +FULLPERLRUN and FULLPERLRUNINST. + + PERL is allowed to be miniperl + FULLPERL must be a complete perl + + *PERLRUN contains everything necessary to run perl, find it's + libraries, etc... + + *PERLRUNINST is *PERLRUN + everything necessary to find the + modules being built. + +=cut + +sub init_PERL { + my($self) = shift; + + my @defpath = (); + foreach my $component ($self->{PERL_SRC}, $self->path(), + $Config::Config{binexp}) + { + push @defpath, $component if defined $component; + } + + # Build up a set of file names (not command names). + my $thisperl = File::Spec->canonpath($^X); + $thisperl .= $Config{exe_ext} unless $thisperl =~ m/$Config{exe_ext}$/i; + my @perls = ($thisperl); + push @perls, map { "$_$Config{exe_ext}" } + ('perl', 'perl5', "perl$Config{version}"); + + # miniperl has priority over all but the cannonical perl when in the + # core. Otherwise its a last resort. + my $miniperl = "miniperl$Config{exe_ext}"; + if( $self->{PERL_CORE} ) { + splice @perls, 1, 0, $miniperl; + } + else { + push @perls, $miniperl; + } + + $self->{PERL} ||= + $self->find_perl(5.0, \@perls, \@defpath, $Verbose ); + # don't check if perl is executable, maybe they have decided to + # supply switches with perl + + # Define 'FULLPERL' to be a non-miniperl (used in test: target) + ($self->{FULLPERL} = $self->{PERL}) =~ s/miniperl/perl/i + unless $self->{FULLPERL}; + + # Are we building the core? + $self->{PERL_CORE} = 0 unless exists $self->{PERL_CORE}; + + # How do we run perl? + foreach my $perl (qw(PERL FULLPERL)) { + $self->{$perl.'RUN'} = "\$($perl)"; + + # Make sure perl can find itself before it's installed. + $self->{$perl.'RUN'} .= q{ "-I$(PERL_LIB)" "-I$(PERL_ARCHLIB)"} + if $self->{UNINSTALLED_PERL} || $self->{PERL_CORE}; + + $self->{$perl.'RUNINST'} = + q{$(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"}; + } + + return 1; +} + + =item install (o) Defines the install target. @@ -3298,12 +3323,15 @@ test :: \$(TEST_TYPE) push(@m, "\n"); push(@m, "test_dynamic :: pure_all\n"); - push(@m, $self->test_via_harness('$(PERLRUN)', '$(TEST_FILES)')) if $tests; - push(@m, $self->test_via_script('$(PERLRUN)', '$(TEST_FILE)')) if -f "test.pl"; + push(@m, $self->test_via_harness('$(FULLPERLRUN)', '$(TEST_FILES)')) + if $tests; + push(@m, $self->test_via_script('$(FULLPERLRUN)', '$(TEST_FILE)')) + if -f "test.pl"; push(@m, "\n"); push(@m, "testdb_dynamic :: pure_all\n"); - push(@m, $self->test_via_script('$(PERLRUN) $(TESTDB_SW)', '$(TEST_FILE)')); + push(@m, $self->test_via_script('$(FULLPERLRUN) $(TESTDB_SW)', + '$(TEST_FILE)')); push(@m, "\n"); # Occasionally we may face this degenerate target: diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm index 6cbb652..881b8a9 100644 --- a/lib/ExtUtils/MM_VMS.pm +++ b/lib/ExtUtils/MM_VMS.pm @@ -14,7 +14,7 @@ use VMS::Filespec; use File::Basename; use File::Spec; use vars qw($Revision @ISA $VERSION); -($VERSION) = $Revision = '5.61_01'; +($VERSION) = $Revision = '5.62_01'; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; @@ -348,7 +348,7 @@ sub init_others { $self->{MAKEFILE} ||= $self->{FIRST_MAKEFILE}; $self->{NOECHO} ||= '@ '; $self->{RM_F} = '$(PERL) -e "foreach (@ARGV) { 1 while ( -d $_ ? rmdir $_ : unlink $_)}"'; - $self->{RM_RF} = '$(PERL) "-I$(PERL_LIB)" -e "use File::Path; @dirs = map(VMS::Filespec::unixify($_),@ARGV); rmtree(\@dirs,0,0)"'; + $self->{RM_RF} = '$(PERLRUN) -e "use File::Path; @dirs = map(VMS::Filespec::unixify($_),@ARGV); rmtree(\@dirs,0,0)"'; $self->{TOUCH} = '$(PERL) -e "$t=time; foreach (@ARGV) { -e $_ ? utime($t,$t,@ARGV) : (open(F,qq(>$_)),close F)}"'; $self->{CHMOD} = '$(PERL) -e "chmod @ARGV"'; # expect Unix syntax from MakeMaker $self->{CP} = 'Copy/NoConfirm'; @@ -429,8 +429,8 @@ sub constants { INSTALLSITEARCH INSTALLBIN INSTALLSCRIPT PERL_LIB PERL_ARCHLIB SITELIBEXP SITEARCHEXP LIBPERL_A MYEXTLIB FIRST_MAKEFILE MAKE_APERL_FILE PERLMAINCC PERL_SRC PERL_VMS - PERL_INC PERL FULLPERL PERLRUN PERLRUNINST TEST_LIBS - PERL_CORE NOECHO NOOP + PERL_INC PERL FULLPERL PERLRUN FULLPERLRUN PERLRUNINST + FULLPERLRUNINST TEST_LIBS PERL_CORE NOECHO NOOP / ) { next unless defined $self->{$macro}; push @m, "$macro = $self->{$macro}\n"; @@ -727,7 +727,7 @@ pm_to_blib.ts : $(TO_INST_PM) } push(@m,"\t\$(NOECHO) \$(PERL) -e \"print '$line'\" >>.MM_tmp\n") if $line; - push(@m,q[ $(PERL) "-I$(PERL_LIB)" "-MExtUtils::Install" -e "pm_to_blib({split(' ',)},'].$autodir.q[','$(PM_FILTER)')" <.MM_tmp]); + push(@m,q[ $(PERLRUN) "-MExtUtils::Install" -e "pm_to_blib({split(' ',)},'].$autodir.q[','$(PM_FILTER)')" <.MM_tmp]); push(@m,qq[ \$(NOECHO) Delete/NoLog/NoConfirm .MM_tmp; \$(NOECHO) \$(TOUCH) pm_to_blib.ts @@ -829,7 +829,7 @@ sub xsubpp_version # first try the -v flag, introduced in 1.921 & 2.000a2 - my $command = "$self->{PERL} \"-I$self->{PERL_LIB}\" $xsubpp -v"; + my $command = qq{$self->{PERL} "-I$self->{PERL_LIB}" $xsubpp -v}; print "Running: $command\n" if $Verbose; $version = `$command` ; if ($?) { @@ -859,7 +859,7 @@ EOM close F ; - $command = "$self->{PERL} $xsubpp $file"; + $command = "$self->{PERLRUN} $xsubpp $file"; print "Running: $command\n" if $Verbose; my $text = `$command` ; if ($?) { @@ -912,9 +912,9 @@ MKPATH = Create/Directory EQUALIZE_TIMESTAMP = \$(PERL) -we "open F,qq{>\$ARGV[1]};close F;utime(0,(stat(\$ARGV[0]))[9]+1,\$ARGV[1])" !. ($self->{PARENT} ? '' : qq!WARN_IF_OLD_PACKLIST = \$(PERL) -e "if (-f \$ARGV[0]){print qq[WARNING: Old package found (\$ARGV[0]); please check for collisions\\n]}" -MOD_INSTALL = \$(PERL) "-I\$(PERL_LIB)" "-MExtUtils::Install" -e "install({split(' ',)},1);" +MOD_INSTALL = \$(PERLRUN) "-MExtUtils::Install" -e "install({split(' ',)},1);" DOC_INSTALL = \$(PERL) -e "\@ARGV=split(/\\|/,);print '=head2 ',scalar(localtime),': C<',shift,qq[>\\n\\n=over 4\\n\\n];while(\$key=shift && \$val=shift){print qq[=item *\\n\\nC<\$key: \$val>\\n\\n];}print qq[=back\\n\\n]" -UNINSTALL = \$(PERL) "-I\$(PERL_LIB)" "-MExtUtils::Install" -e "uninstall(\$ARGV[0],1,1);" +UNINSTALL = \$(PERLRUN) "-MExtUtils::Install" -e "uninstall(\$ARGV[0],1,1);" !); } @@ -1275,8 +1275,8 @@ END my(@m); push @m, qq[POD2MAN_EXE = $pod2man_exe\n], -q[POD2MAN = $(PERL) -we "%m=@ARGV;for (keys %m){" - --e "system(qq/MCR $^X ""-I$(PERL_ARCHLIB)"" ""-I$(PERL_LIB)"" $(POD2MAN_EXE) $_ >$m{$_}/);}" +q[POD2MAN = $(PERLRUN) "-MPod::Man" -we "%m=@ARGV;for(keys %m){" - +-e "Pod::Man->new->parse_from_file($_,$m{$_}) }" ]; push @m, "\nmanifypods : \$(MAN1PODS) \$(MAN3PODS)\n"; if (%{$self->{MAN1PODS}} || %{$self->{MAN3PODS}}) { @@ -1637,8 +1637,8 @@ doc__install : doc_site_install # This hack brought to you by DCL's 255-character command line limit pure_perl_install :: - $(NOECHO) $(PERL) "-MFile::Spec" -e "print 'read '.File::Spec->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist') " >.MM_tmp - $(NOECHO) $(PERL) "-MFile::Spec" -e "print 'write '.File::Spec->catfile('$(INSTALLARCHLIB)','auto','$(FULLEXT)','.packlist') " >>.MM_tmp + $(NOECHO) $(PERLRUN) "-MFile::Spec" -e "print 'read '.File::Spec->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist') " >.MM_tmp + $(NOECHO) $(PERLRUN) "-MFile::Spec" -e "print 'write '.File::Spec->catfile('$(INSTALLARCHLIB)','auto','$(FULLEXT)','.packlist') " >>.MM_tmp $(NOECHO) $(PERL) -e "print '$(INST_LIB) $(INSTALLPRIVLIB) '" >>.MM_tmp $(NOECHO) $(PERL) -e "print '$(INST_ARCHLIB) $(INSTALLARCHLIB) '" >>.MM_tmp $(NOECHO) $(PERL) -e "print '$(INST_BIN) $(INSTALLBIN) '" >>.MM_tmp @@ -1651,8 +1651,8 @@ pure_perl_install :: # Likewise pure_site_install :: - $(NOECHO) $(PERL) "-MFile::Spec" -e "print 'read '.File::Spec->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist') " >.MM_tmp - $(NOECHO) $(PERL) "-MFile::Spec" -e "print 'write '.File::Spec->catfile('$(INSTALLSITEARCH)','auto','$(FULLEXT)','.packlist') " >>.MM_tmp + $(NOECHO) $(PERLRUN) "-MFile::Spec" -e "print 'read '.File::Spec->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist') " >.MM_tmp + $(NOECHO) $(PERLRUN) "-MFile::Spec" -e "print 'write '.File::Spec->catfile('$(INSTALLSITEARCH)','auto','$(FULLEXT)','.packlist') " >>.MM_tmp $(NOECHO) $(PERL) -e "print '$(INST_LIB) $(INSTALLSITELIB) '" >>.MM_tmp $(NOECHO) $(PERL) -e "print '$(INST_ARCHLIB) $(INSTALLSITEARCH) '" >>.MM_tmp $(NOECHO) $(PERL) -e "print '$(INST_BIN) $(INSTALLBIN) '" >>.MM_tmp @@ -1843,13 +1843,13 @@ testdb :: testdb_\$(LINKTYPE) push(@m, "\n"); push(@m, "test_dynamic :: pure_all\n"); - push(@m, $self->test_via_harness('$(PERLRUN)', $tests)) if $tests; - push(@m, $self->test_via_script('$(PERLRUN)', 'test.pl')) if -f "test.pl"; + push(@m, $self->test_via_harness('$(FULLPERLRUN)', $tests)) if $tests; + push(@m, $self->test_via_script('$(FULLPERLRUN)', 'test.pl')) if -f "test.pl"; push(@m, "\t\$(NOECHO) \$(NOOP)\n") if (!$tests && ! -f "test.pl"); push(@m, "\n"); push(@m, "testdb_dynamic :: pure_all\n"); - push(@m, $self->test_via_script('$(FULLPERL) "$(TESTDB_SW)"', '$(TEST_FILE)')); + push(@m, $self->test_via_script('$(FULLPERLRUN) "$(TESTDB_SW)"', '$(TEST_FILE)')); push(@m, "\n"); # Occasionally we may face this degenerate target: diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm index 396cd11..d8c7367 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 $PERLMAKE); require ExtUtils::MM_Any; require ExtUtils::MM_Unix; @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -$VERSION = '1.03_01'; +$VERSION = '1.04_01'; $ENV{EMXSHELL} = 'sh'; # to run `commands` @@ -190,8 +190,8 @@ sub constants { INSTALLSITEARCH INSTALLBIN INSTALLSCRIPT PERL_LIB PERL_ARCHLIB SITELIBEXP SITEARCHEXP LIBPERL_A MYEXTLIB FIRST_MAKEFILE MAKE_APERL_FILE PERLMAINCC PERL_SRC - PERL_INC PERL FULLPERL PERLRUN PERLRUNINST TEST_LIBS - FULL_AR PERL_CORE + PERL_INC PERL FULLPERL PERLRUN FULLPERLRUN PERLRUNINST + FULLPERLRUNINST TEST_LIBS FULL_AR PERL_CORE / ) { next unless defined $self->{$tmp}; diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index a9c78f2..a505b15 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -2,10 +2,10 @@ BEGIN {require 5.004;} package ExtUtils::MakeMaker; -$VERSION = "5.53_01"; +$VERSION = "5.54_01"; $Version_OK = "5.49"; # Makefiles older than $Version_OK will die # (Will be checked from MakeMaker version 4.13 onwards) -($Revision = substr(q$Revision: 1.19 $, 10)) =~ s/\s+$//; +($Revision = substr(q$Revision: 1.23 $, 10)) =~ s/\s+$//; require Exporter; use Config; @@ -117,8 +117,9 @@ 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 FULLPERL FUNCLIST H - IMPORTS + EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE + FULLPERL FULLPERLRUN FULLPERLRUNINST + FUNCLIST H IMPORTS INC INCLUDE_EXT INSTALLARCHLIB INSTALLBIN INSTALLDIRS INSTALLMAN1DIR INSTALLMAN3DIR INSTALLPRIVLIB INSTALLSCRIPT INSTALLSITEARCH @@ -171,7 +172,7 @@ sub full_setup { push @Overridable, qw[ dir_target libscan makeaperl needs_linking perm_rw perm_rwx - subdir_x test_via_harness test_via_script + subdir_x test_via_harness test_via_script init_PERL ]; push @MM_Sections, qw[ @@ -616,11 +617,12 @@ sub _run_hintfile { local($self) = shift; # make $self available to the hint file. my($hint_file) = shift; + local $@; print STDERR "Processing hints file $hint_file\n"; - local($!, $@); - do "./$hint_file"; - print STDERR "Couldn't open hint file: $!" if $!; - print STDERR $@ if $@; + my $ret = do "./$hint_file"; + unless( defined $ret ) { + print STDERR $@ if $@; + } } sub mv_all_methods { @@ -1254,7 +1256,15 @@ that will be produced for the MAP_TARGET. =item FULLPERL -Perl binary able to run this extension. +Perl binary able to run this extension, load XS modules, etc... + +=item FULLPERLRUN + +Like PERLRUN, except it uses FULLPERL. + +=item FULLPERLRUNINST + +Like PERLRUNINST, except it uses FULLPERL. =item FUNCLIST @@ -1555,14 +1565,14 @@ of memory allocations, etc. =item PERLRUN -Use this instead of $(PERL) or $(FULLPERL) when you wish to run perl. -It will set up extra necessary flags for you. +Use this instead of $(PERL) when you wish to run perl. It will set up +extra necessary flags for you. =item PERLRUNINST -Use this instead of $(PERL) or $(FULLPERL) when you wish to run -perl to work with modules. It will add things like -I$(INST_ARCH) -and other necessary flags. +Use this instead of $(PERL) when you wish to run perl to work with +modules. It will add things like -I$(INST_ARCH) and other necessary +flags so perl can see the modules you're about to install. =item PERL_SRC @@ -1751,7 +1761,7 @@ MakeMaker object. The following lines will be parsed o.k.: $VERSION = '1.00'; *VERSION = \'1.01'; - ( $VERSION ) = '$Revision: 1.19 $ ' =~ /\$Revision:\s+([^\s]+)/; + ( $VERSION ) = '$Revision: 1.23 $ ' =~ /\$Revision:\s+([^\s]+)/; $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 f276a1f..fa5a0b4 100644 --- a/lib/ExtUtils/Manifest.pm +++ b/lib/ExtUtils/Manifest.pm @@ -22,7 +22,8 @@ $Is_VMS = $^O eq 'VMS'; require VMS::Filespec if $Is_VMS; $Debug = $ENV{PERL_MM_MANIFEST_DEBUG} || 0; -$Verbose = 1; +$Verbose = defined $ENV{PERL_MM_MANIFEST_VERBOSE} ? + $ENV{PERL_MM_MANIFEST_VERBOSE} : 1; $Quiet = 0; $MANIFEST = 'MANIFEST'; $DEFAULT_MSKIP = (splitpath($INC{"ExtUtils/Manifest.pm"}))[1]."$MANIFEST.SKIP"; diff --git a/lib/ExtUtils/t/Big-Fat-Dummy/t/compile.t b/lib/ExtUtils/t/Big-Fat-Dummy/t/compile.t deleted file mode 100644 index 0f3b90d..0000000 --- a/lib/ExtUtils/t/Big-Fat-Dummy/t/compile.t +++ /dev/null @@ -1,8 +0,0 @@ -BEGIN { - @INC = '../lib/ExtUtils/t/Big-Fat-Dummy/lib' -} - -print "1..2\n"; - -print eval "use Big::Fat::Dummy; 1;" ? "ok 1\n" : "not ok 1\n"; -print "ok 2 - TEST_VERBOSE\n"; diff --git a/lib/ExtUtils/t/basic.t b/lib/ExtUtils/t/basic.t new file mode 100644 index 0000000..966aa10 --- /dev/null +++ b/lib/ExtUtils/t/basic.t @@ -0,0 +1,103 @@ +#!/usr/bin/perl -w + +# This test puts MakeMaker through the paces of a basic perl module +# build, test and installation of the Big::Fat::Dummy module. + +BEGIN { + if( $ENV{PERL_CORE} ) { + chdir 't' if -d 't'; + @INC = ('../lib', 'lib'); + } + else { + unshift @INC, 't/lib'; + } +} + +use strict; +use Test::More tests => 15; +use MakeMaker::Test::Utils; +use File::Spec; +use TieOut; + +my $perl = which_perl; + +$ENV{PERL_CORE} ? chdir '../lib/ExtUtils/t' : chdir 't'; + +perl_lib; + +$| = 1; + +ok( chdir 'Big-Fat-Dummy', "chdir'd to Big-Fat-Dummy" ) || + diag("chdir failed: $!"); + + +# The perl core test suite will run any .t file in the MANIFEST. +# So we have to generate this on the fly. +mkdir 't'; +open(TEST, ">t/compile.t") or die "Can't open t/compile.t: $!"; +print TEST ; +close TEST; + +END { unlink 't/compile.t' } + +my @mpl_out = `$perl Makefile.PL PREFIX=dummy-install`; + +cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || + diag(@mpl_out); + +my $makefile = makefile_name(); +ok( grep(/^Writing $makefile for Big::Fat::Dummy/, + @mpl_out) == 1, + 'Makefile.PL output looks right'); + +ok( grep(/^Current package is: main$/, + @mpl_out) == 1, + 'Makefile.PL run in package main'); + +ok( -e $makefile, 'Makefile exists' ); + +# -M is flakey on VMS, flat out broken on Tru64 5.6.0 +SKIP: { + skip "stat a/mtime broken on Tru64 5.6.0", 1 if $^O eq 'dec_osf' and + $] >= 5.006; + + my $mtime = (stat($makefile))[9]; + cmp_ok( $^T, '<=', $mtime, ' its been touched' ); +} + +END { unlink makefile_name(), makefile_backup() } + +my $make = make_run(); + +{ + # Supress 'make manifest' noise + local $ENV{PERL_MM_MANIFEST_VERBOSE} = 0; + my $manifest_out = `$make manifest`; + ok( -e 'MANIFEST', 'make manifest created a MANIFEST' ); + ok( -s 'MANIFEST', ' its not empty' ); +} + +END { unlink 'MANIFEST'; } + +my $test_out = `$make test`; +like( $test_out, qr/All tests successful/, 'make test' ); +is( $?, 0 ); + +# Test 'make test TEST_VERBOSE=1' +my $make_test_verbose = make_macro($make, 'test', TEST_VERBOSE => 1); +$test_out = `$make_test_verbose`; +like( $test_out, qr/ok \d+ - TEST_VERBOSE/, 'TEST_VERBOSE' ); +like( $test_out, qr/All tests successful/, ' successful' ); +is( $?, 0 ); + +my $dist_test_out = `$make disttest`; +is( $?, 0, 'disttest' ) || diag($dist_test_out); + +my $realclean_out = `$make realclean`; +is( $?, 0, 'realclean' ) || diag($realclean_out); + +__DATA__ +print "1..2\n"; + +print eval "use Big::Fat::Dummy; 1;" ? "ok 1\n" : "not ok 1\n"; +print "ok 2 - TEST_VERBOSE\n"; diff --git a/lib/ExtUtils/t/hints.t b/lib/ExtUtils/t/hints.t index 7542bd3..23315ed 100644 --- a/lib/ExtUtils/t/hints.t +++ b/lib/ExtUtils/t/hints.t @@ -1,3 +1,5 @@ +#!/usr/bin/perl -w + BEGIN { if( $ENV{PERL_CORE} ) { chdir 't';