From: Michael G. Schwern Date: Fri, 11 Apr 2003 00:32:02 +0000 (-0700) Subject: MakeMaker 6.10_02 -> 6.10_03 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=431b0fc4d67b7f221bc3905fc50b43677201f1c6;p=p5sagit%2Fp5-mst-13.2.git MakeMaker 6.10_02 -> 6.10_03 Message-ID: <20030411073202.GC5916@windhund.schwern.org> p4raw-id: //depot/perl@19190 --- diff --git a/lib/ExtUtils/MM_Any.pm b/lib/ExtUtils/MM_Any.pm index c0ffb2f..4bdcf67 100644 --- a/lib/ExtUtils/MM_Any.pm +++ b/lib/ExtUtils/MM_Any.pm @@ -557,6 +557,11 @@ include: sub metafile_target { my $self = shift; + return <<'MAKE_FRAG' if $self->{NO_META}; +metafile: + $(NOECHO) $(NOOP) +MAKE_FRAG + my $prereq_pm = ''; while( my($mod, $ver) = each %{$self->{PREREQ_PM}} ) { $prereq_pm .= sprintf " %-30s %s\n", "$mod:", $ver; @@ -594,6 +599,11 @@ Adds the META.yml file to the MANIFEST. sub metafile_addtomanifest_target { my $self = shift; + return <<'MAKE_FRAG' if $self->{NO_META}; +metafile_addtomanifest: + $(NOECHO) $(NOOP) +MAKE_FRAG + my $add_meta = $self->oneliner(<<'CODE', ['-MExtUtils::Manifest=maniadd']); maniadd({q{META.yml} => q{Module meta-data in YAML}}); CODE diff --git a/lib/ExtUtils/MM_MacOS.pm b/lib/ExtUtils/MM_MacOS.pm index 9a2fa44..c811c09 100644 --- a/lib/ExtUtils/MM_MacOS.pm +++ b/lib/ExtUtils/MM_MacOS.pm @@ -265,7 +265,7 @@ sub macify { } push(@mac, $_); } - + return "@mac"; } @@ -278,8 +278,8 @@ Translate Unix filepaths and shell globs to Mac style. sub patternify { my($unix) = @_; my(@mac); - use bytes; # Non-UTF-8 high bytes in the below. - + use bytes; # Non-UTF-8 high bytes below. + foreach (split(/[ \t\n]+/, $unix)) { if (m|/|) { $_ = ":$_"; @@ -289,7 +289,7 @@ sub patternify { push(@mac, $_); } } - + return "@mac"; } diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 6799836..8e5b9b8 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -743,8 +743,8 @@ sub dist_ci { ci : $(PERLRUN) "-MExtUtils::Manifest=maniread" \\ -e "@all = keys %{ maniread() };" \\ - -e "print("Executing $(CI) @all\n"); system(qq{$(CI) @all});" \\ - -e "print("Executing $(RCS_LABEL) ...\n"); system(qq{$(RCS_LABEL) @all});" + -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \\ + -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});" }; } @@ -1199,8 +1199,11 @@ WARNING # To avoid using the unportable 2>&1 to supress STDERR, # we close it before running the command. close STDERR if $stderr_duped; - $val = `$abs -e "require $ver; print qq{VER_OK\n}"`; + my $version_check = qq{$abs -e "require $ver; print qq{VER_OK\n}"}; + $val = `$version_check`; open STDERR, '>&STDERR_COPY' if $stderr_duped; + print STDERR "Perl version check failed: '$version_check'\n" + unless defined $val; if ($val =~ /^VER_OK/) { print "Using PERL=$abs\n" if $trace; @@ -1507,6 +1510,7 @@ sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc) } return if /\#/; return if /~$/; # emacs temp files + return if /,v$/; # RCS files my $path = $File::Find::name; my $prefix = $self->{INST_LIBDIR}; @@ -1608,7 +1612,7 @@ sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc) my($manpagename) = $name; $manpagename =~ s/\.p(od|m|l)\z//; # everything below lib is ok - if($self->{PARENT_NAME} && $manpagename !~ s!^\W*lib\W+!!s) { + unless($manpagename =~ s!^\W*lib\W+!!s) { $manpagename = $self->catfile( split(/::/,$self->{PARENT_NAME}),$manpagename ); @@ -3801,7 +3805,7 @@ test :: \$(TEST_TYPE) push(@m, map("\t\$(NOECHO) cd $_ && \$(TEST_F) \$(FIRST_MAKEFILE) && \$(MAKE) test \$(PASTHRU)\n", @{$self->{DIR}})); } - push(@m, "\t\$(NOECHO) $(ECHO) 'No tests defined for \$(NAME) extension.'\n") + push(@m, "\t\$(NOECHO) \$(ECHO) 'No tests defined for \$(NAME) extension.'\n") unless $tests or -f "test.pl" or @{$self->{DIR}}; push(@m, "\n"); diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm index 39e2c65..469f21d 100644 --- a/lib/ExtUtils/MM_VMS.pm +++ b/lib/ExtUtils/MM_VMS.pm @@ -21,7 +21,7 @@ BEGIN { use File::Basename; use vars qw($Revision @ISA $VERSION); ($VERSION) = '5.67'; -($Revision = substr(q$Revision: 1.89 $, 10)) =~ s/\s+$//; +($Revision = substr(q$Revision: 1.91 $, 10)) =~ s/\s+$//; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; @@ -1603,7 +1603,7 @@ uninstall_from_perldirs :: $(NOECHO) $(ECHO) "the appropriate files. Sorry for the inconvenience." uninstall_from_sitedirs :: - $(NOECHO) $(UNINSTALL) ],$self->catfile($self->{SITEARCHEXP},'auto',$self->{FULLEXT},'.packlist'),"\n",q[ + $(NOECHO) $(UNINSTALL) ].$self->catfile($self->{SITEARCHEXP},'auto',$self->{FULLEXT},'.packlist').q[ $(NOECHO) $(ECHO) "Uninstall is now deprecated and makes no actual changes." $(NOECHO) $(ECHO) "Please check the list above carefully for errors, and manually remove" $(NOECHO) $(ECHO) "the appropriate files. Sorry for the inconvenience." @@ -2232,7 +2232,14 @@ sub init_linker { $self->{EXPORT_LIST} ||= '$(BASEEXT).opt'; my $shr = $Config{dbgprefix} . 'PERLSHR'; - $self->{PERL_ARCHIVE} ||= $self->catfile($self->{PERL_SRC}, "$shr.$Config{'dlext'}"); + if ($self->{PERL_SRC}) { + $self->{PERL_ARCHIVE} ||= + $self->catfile($self->{PERL_SRC}, "$shr.$Config{'dlext'}"); + } + else { + $self->{PERL_ARCHIVE} ||= + $ENV{$shr} ? $ENV{$shr} : "Sys\$Share:$shr.$Config{'dlext'}"; + } $self->{PERL_ARCHIVE_AFTER} ||= ''; } diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index 67fb3e7..12aade8 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.10_02'; -($Revision = substr(q$Revision: 1.108 $, 10)) =~ s/\s+$//; +$VERSION = '6.10_03'; +($Revision = substr(q$Revision: 1.109 $, 10)) =~ s/\s+$//; require Exporter; use Config; @@ -203,6 +203,7 @@ sub full_setup { EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE FULLPERL FULLPERLRUN FULLPERLRUNINST FUNCLIST H IMPORTS + INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB INST_MAN1DIR INST_MAN3DIR INSTALLDIRS DESTDIR PREFIX @@ -216,18 +217,18 @@ sub full_setup { INSTALLSCRIPT PERL_LIB PERL_ARCHLIB SITELIBEXP SITEARCHEXP + INC INCLUDE_EXT LDFROM LIB LIBPERL_A LIBS - LINKTYPE MAKEAPERL MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET - MYEXTLIB - PERL_MALLOC_OK - NAME NEEDS_LINKING NOECHO NORECURS NO_VC OBJECT OPTIMIZE PERL PERLMAINCC - PERLRUN PERLRUNINST PERL_CORE + LINKTYPE MAKEAPERL 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 PPM_INSTALL_SCRIPT PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG XS_VERSION clean depend dist dynamic_lib linkext macro realclean tool_autosplit + MACPERL_SRC MACPERL_LIB MACLIBS_68K MACLIBS_PPC MACLIBS_SC MACLIBS_MRC MACLIBS_ALL_68K MACLIBS_ALL_PPC MACLIBS_SHARED /; @@ -2016,7 +2017,7 @@ MakeMaker object. The following lines will be parsed o.k.: $VERSION = '1.00'; *VERSION = \'1.01'; - ( $VERSION ) = '$Revision: 1.108 $ ' =~ /\$Revision:\s+([^\s]+)/; + ( $VERSION ) = '$Revision: 1.109 $ ' =~ /\$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/TODO b/lib/ExtUtils/TODO index 42734c0..d652d6a 100644 --- a/lib/ExtUtils/TODO +++ b/lib/ExtUtils/TODO @@ -53,3 +53,6 @@ Fix NORECUSE bug continuing to set DIR Give typemap location its own macro. Merge MM_VMS->tool_xsubpp + +Initialize PERL_SRC to '' instead of leaving undef when outside the source +tree diff --git a/lib/ExtUtils/t/00compile.t b/lib/ExtUtils/t/00compile.t index b53475e..459a0eb 100644 --- a/lib/ExtUtils/t/00compile.t +++ b/lib/ExtUtils/t/00compile.t @@ -30,7 +30,7 @@ close MANIFEST; chdir 'lib'; plan tests => scalar @modules * 2; foreach my $file (@modules) { - # 5.8.0 has a bug about require alone in an eval. Thus the extra + # 5.8.0 has a bug about require alone in an eval. Thus the extra # statement. eval q{ require($file); 1 }; is( $@, '', "require $file" ); @@ -39,5 +39,4 @@ foreach my $file (@modules) { skip "Test::Pod not installed", 1 unless $Has_Test_Pod; pod_file_ok($file); } - } diff --git a/lib/ExtUtils/t/00setup_dummy.t b/lib/ExtUtils/t/00setup_dummy.t index f7f50fc..2e6ea26 100644 --- a/lib/ExtUtils/t/00setup_dummy.t +++ b/lib/ExtUtils/t/00setup_dummy.t @@ -16,6 +16,23 @@ use File::Basename; use File::Path; use File::Spec; +if( $^O eq 'VMS' ) { + # On older systems we might exceed the 8-level directory depth limit + # imposed by RMS. We get around this with a rooted logical, but we + # can't create logical names with attributes in Perl, so we do it + # in a DCL subprocess and put it in the job table so the parent sees it. + open( BFDTMP, '>bfdtesttmp.com' ) || die "Error creating command file; $!"; + print BFDTMP <<'COMMAND'; +$ BFD_TEST_ROOT = F$PARSE("SYS$DISK:[-]",,,,"NO_CONCEAL")-".][000000"-"]["-"].;"+".]" +$ DEFINE/JOB/NOLOG/TRANSLATION=CONCEALED BFD_TEST_ROOT 'BFD_TEST_ROOT' +COMMAND + close BFDTMP; + + system '@bfdtesttmp.com'; + 1 while unlink 'bfdtesttmp.com'; +} + + my %Files = ( 'Big-Dummy/lib/Big/Dummy.pm' => <<'END', package Big::Dummy; diff --git a/lib/ExtUtils/t/Installed.t b/lib/ExtUtils/t/Installed.t index 968c418..30dfcb3 100644 --- a/lib/ExtUtils/t/Installed.t +++ b/lib/ExtUtils/t/Installed.t @@ -9,7 +9,9 @@ BEGIN { unshift @INC, 't/lib/'; } } -chdir 't'; + +my $Is_VMS = $^O eq 'VMS'; +chdir($Is_VMS ? 'BFD_TEST_ROOT:[t]' : 't'); use strict; @@ -54,7 +56,7 @@ my $prefix = $Config{prefix} || $Config{prefixexp}; # You can concatenate /foo but not foo:, which defaults in the current # directory -$prefix = VMS::Filespec::unixify($prefix) if $^O eq 'VMS'; +$prefix = VMS::Filespec::unixify($prefix) if $Is_VMS; # ActivePerl 5.6.1/631 has $Config{prefixexp} as 'p:' for some reason $prefix = $Config{prefix} if $prefix eq 'p:' && $^O eq 'MSWin32'; diff --git a/lib/ExtUtils/t/basic.t b/lib/ExtUtils/t/basic.t index f60e5ee..9008390 100644 --- a/lib/ExtUtils/t/basic.t +++ b/lib/ExtUtils/t/basic.t @@ -16,7 +16,7 @@ BEGIN { use strict; use Config; -use Test::More tests => 48; +use Test::More tests => 52; use MakeMaker::Test::Utils; use File::Find; use File::Spec; @@ -28,33 +28,7 @@ delete @ENV{qw(PREFIX LIB MAKEFLAGS)}; my $perl = which_perl(); my $Is_VMS = $^O eq 'VMS'; -my $root_dir = 't'; - -if( $^O eq 'VMS' ) { - # On older systems we might exceed the 8-level directory depth limit - # imposed by RMS. We get around this with a rooted logical, but we - # can't create logical names with attributes in Perl, so we do it - # in a DCL subprocess and put it in the job table so the parent sees it. - open( BFDTMP, '>bfdtesttmp.com' ) || die "Error creating command file; $!"; - print BFDTMP <<'COMMAND'; -$ IF F$TRNLNM("PERL_CORE") .EQS. "" .AND. F$TYPE(PERL_CORE) .EQS. "" -$ THEN -$! building CPAN version -$ BFD_TEST_ROOT = F$PARSE("SYS$DISK:[]",,,,"NO_CONCEAL")-".][000000"-"]["-"].;"+".]" -$ ELSE -$! we're in the core -$ BFD_TEST_ROOT = F$PARSE("SYS$DISK:[-]",,,,"NO_CONCEAL")-".][000000"-"]["-"].;"+".]" -$ ENDIF -$ DEFINE/JOB/NOLOG/TRANSLATION=CONCEALED BFD_TEST_ROOT 'BFD_TEST_ROOT' -COMMAND - close BFDTMP; - - system '@bfdtesttmp.com'; - END { 1 while unlink 'bfdtesttmp.com' } - $root_dir = 'BFD_TEST_ROOT:[t]'; -} - -chdir $root_dir; +chdir($Is_VMS ? 'BFD_TEST_ROOT:[t]' : 't'); perl_lib; @@ -187,12 +161,20 @@ my $manifest = maniread(); _normalize($manifest); is( $manifest->{'meta.yml'}, 'Module meta-data in YAML' ); +# Test NO_META META.yml suppression +unlink 'META.yml'; +ok( !-f 'META.yml', 'META.yml deleted' ); +@mpl_out = run(qq{$perl Makefile.PL "NO_META=1"}); +cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || diag(@mpl_out); +my $metafile_out = run("$make metafile"); +is( $?, 0, 'metafile' ) || diag($metafile_out); +ok( !-f 'META.yml', 'META.yml generation suppressed by NO_META' ); + # Make sure init_dirscan doesn't go into the distdir @mpl_out = run(qq{$perl Makefile.PL "PREFIX=dummy-install"}); -cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || - diag(@mpl_out); +cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || diag(@mpl_out); ok( grep(/^Writing $makefile for Big::Dummy/, @mpl_out) == 1, 'init_dirscan skipped distdir') || diff --git a/lib/ExtUtils/t/zz_cleanup_dummy.t b/lib/ExtUtils/t/zz_cleanup_dummy.t index 6973844..d3d3859 100644 --- a/lib/ExtUtils/t/zz_cleanup_dummy.t +++ b/lib/ExtUtils/t/zz_cleanup_dummy.t @@ -8,7 +8,7 @@ BEGIN { unshift @INC, 't/lib'; } } -chdir 't'; +chdir($^O eq 'VMS' ? 'BFD_TEST_ROOT:[t]' : 't'); use strict;