X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FExtUtils%2FMM_VMS.pm;h=a3b236a4eddf548a7b3c761cbf7e20eaeaec7924;hb=c9b71ffd9d21c64c62a0cef4bdcbcd64861fc88b;hp=377d5d124d24d2461cb5445d6ceb9ef8dc122254;hpb=e3830a4ec012ee625f1b3bc63b5b18c656f377da;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm index 377d5d1..a3b236a 100644 --- a/lib/ExtUtils/MM_VMS.pm +++ b/lib/ExtUtils/MM_VMS.pm @@ -7,19 +7,23 @@ package ExtUtils::MM_VMS; +use strict; + use Carp qw( &carp ); use Config; require Exporter; use VMS::Filespec; use File::Basename; use File::Spec; -our($Revision, @ISA); -$Revision = '5.56 (27-Apr-1999)'; +our($Revision, @ISA, $VERSION, $Verbose); +# All on one line so MakeMaker can see it. +($VERSION) = ($Revision = '5.56 (27-Apr-1999)') =~ /^([\d.]+)/; @ISA = qw( File::Spec ); unshift @MM::ISA, 'ExtUtils::MM_VMS'; -Exporter::import('ExtUtils::MakeMaker', '$Verbose', '&neatvalue'); +require ExtUtils::MakeMaker; +ExtUtils::MakeMaker->import('$Verbose', '&neatvalue'); =head1 NAME @@ -37,7 +41,7 @@ the semantics. =head2 Methods always loaded -=over +=over 4 =item wraplist @@ -122,7 +126,7 @@ sub ExtUtils::MM_VMS::makeaperl; sub ExtUtils::MM_VMS::ext; sub ExtUtils::MM_VMS::nicetext; -#use SelfLoader; +our $AUTOLOAD; sub AUTOLOAD { my $code; if (defined fileno(DATA)) { @@ -151,11 +155,12 @@ sub AUTOLOAD { # This isn't really an override. It's just here because ExtUtils::MM_VMS -# appears in @MM::ISA before ExtUtils::Liblist, so if there isn't an ext() +# appears in @MM::ISA before ExtUtils::Liblist::Kid, so if there isn't an ext() # in MM_VMS, then AUTOLOAD is called, and bad things happen. So, we just -# mimic inheritance here and hand off to ExtUtils::Liblist. +# mimic inheritance here and hand off to ExtUtils::Liblist::Kid. sub ext { - ExtUtils::Liblist::ext(@_); + require ExtUtils::Liblist; + ExtUtils::Liblist::Kid::ext(@_); } =back @@ -168,7 +173,7 @@ For overridden methods, documentation is limited to an explanation of why this method overrides the MM_Unix method; see the ExtUtils::MM_Unix documentation for more details. -=over +=over 4 =item guess_name (override) @@ -533,7 +538,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 + PERL_INC PERL FULLPERL PERLRUN PERLRUNINST TEST_LIBS + PERL_CORE / ) { next unless defined $self->{$macro}; push @m, "$macro = $self->{$macro}\n"; @@ -557,22 +563,23 @@ MM_VMS_REVISION = $ExtUtils::MM_VMS::Revision # DLBASE = Basename part of dynamic library. May be just equal BASEEXT. ]; - for $tmp (qw/ + for my $tmp (qw/ FULLEXT VERSION_FROM OBJECT LDFROM / ) { next unless defined $self->{$tmp}; push @m, "$tmp = ",$self->fixpath($self->{$tmp},0),"\n"; } - for $tmp (qw/ + for my $tmp (qw/ BASEEXT PARENT_NAME DLBASE INC DEFINE LINKTYPE / ) { next unless defined $self->{$tmp}; push @m, "$tmp = $self->{$tmp}\n"; } - for $tmp (qw/ XS MAN1PODS MAN3PODS PM /) { - next unless defined $self->{$tmp}; + for my $tmp (qw/ XS MAN1PODS MAN3PODS PM /) { + # Where is the space coming from? --jhi + next unless $self ne " " && defined $self->{$tmp}; my(%tmp,$key); for $key (keys %{$self->{$tmp}}) { $tmp{$self->fixpath($key,0)} = $self->fixpath($self->{$tmp}{$key},0); @@ -580,7 +587,7 @@ MM_VMS_REVISION = $ExtUtils::MM_VMS::Revision $self->{$tmp} = \%tmp; } - for $tmp (qw/ C O_FILES H /) { + for my $tmp (qw/ C O_FILES H /) { next unless defined $self->{$tmp}; my(@tmp,$val); for $val (@{$self->{$tmp}}) { @@ -601,7 +608,7 @@ MAN3PODS = ',$self->wraplist(sort keys %{$self->{MAN3PODS}}),' '; - for $tmp (qw/ + for my $tmp (qw/ INST_MAN1DIR INSTALLMAN1DIR MAN1EXT INST_MAN3DIR INSTALLMAN3DIR MAN3EXT /) { next unless defined $self->{$tmp}; @@ -700,7 +707,7 @@ sub cflags { # conflate the ones from $Config{'ccflags'} and $self->{DEFINE} # ($self->{DEFINE} has already been VMSified in constants() above) if ($self->{DEFINE}) { $quals .= $self->{DEFINE}; } - for $type (qw(Def Undef)) { + for my $type (qw(Def Undef)) { my(@terms); while ($quals =~ m:/${type}i?n?e?=([^/]+):ig) { my $term = $1; @@ -826,7 +833,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[')" <.MM_tmp]); + push(@m,q[ $(PERL) "-I$(PERL_LIB)" "-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 @@ -1326,7 +1333,7 @@ $(OBJECT) : $(INST_ARCHAUTODIR).exists $(INST_STATIC) : $(OBJECT) $(MYEXTLIB) '; - # If this extension has it's own library (eg SDBM_File) + # If this extension has its own library (eg SDBM_File) # then copy that to $(INST_STATIC) and add $(OBJECT) into it. push(@m, "\t",'$(CP) $(MYEXTLIB) $(MMS$TARGET)',"\n") if $self->{MYEXTLIB}; @@ -1383,7 +1390,7 @@ END push @m, qq[POD2MAN_EXE = $pod2man_exe\n], q[POD2MAN = $(PERL) -we "%m=@ARGV;for (keys %m){" - --e "system(""MCR $^X $(POD2MAN_EXE) $_ >$m{$_}"");}" +-e "system(qq/MCR $^X ""-I$(PERL_ARCHLIB)"" ""-I$(PERL_LIB)"" $(POD2MAN_EXE) $_ >$m{$_}/);}" ]; push @m, "\nmanifypods : \$(MAN1PODS) \$(MAN3PODS)\n"; if (%{$self->{MAN1PODS}} || %{$self->{MAN3PODS}}) { @@ -1414,7 +1421,7 @@ sub processPL { my $list = ref($self->{PL_FILES}->{$plfile}) ? $self->{PL_FILES}->{$plfile} : [$self->{PL_FILES}->{$plfile}]; - foreach $target (@$list) { + foreach my $target (@$list) { my $vmsplfile = vmsify($plfile); my $vmsfile = vmsify($target); push @m, " @@ -1870,14 +1877,21 @@ sub perldepend { my(@m); push @m, ' -$(OBJECT) : $(PERL_INC)EXTERN.h, $(PERL_INC)INTERN.h, $(PERL_INC)XSUB.h, $(PERL_INC)av.h -$(OBJECT) : $(PERL_INC)cop.h, $(PERL_INC)cv.h, $(PERL_INC)embed.h, $(PERL_INC)form.h -$(OBJECT) : $(PERL_INC)gv.h, $(PERL_INC)handy.h, $(PERL_INC)hv.h, $(PERL_INC)keywords.h -$(OBJECT) : $(PERL_INC)mg.h, $(PERL_INC)op.h, $(PERL_INC)opcode.h, $(PERL_INC)patchlevel.h -$(OBJECT) : $(PERL_INC)perl.h, $(PERL_INC)perly.h, $(PERL_INC)pp.h, $(PERL_INC)proto.h -$(OBJECT) : $(PERL_INC)regcomp.h, $(PERL_INC)regexp.h, $(PERL_INC)scope.h, $(PERL_INC)sv.h -$(OBJECT) : $(PERL_INC)vmsish.h, $(PERL_INC)util.h, $(PERL_INC)config.h -$(OBJECT) : $(PERL_INC)iperlsys.h +$(OBJECT) : $(PERL_INC)EXTERN.h, $(PERL_INC)INTERN.h, $(PERL_INC)XSUB.h +$(OBJECT) : $(PERL_INC)av.h, $(PERL_INC)cc_runtime.h, $(PERL_INC)config.h +$(OBJECT) : $(PERL_INC)cop.h, $(PERL_INC)cv.h, $(PERL_INC)embed.h +$(OBJECT) : $(PERL_INC)embedvar.h, $(PERL_INC)fakethr.h, $(PERL_INC)form.h +$(OBJECT) : $(PERL_INC)gv.h, $(PERL_INC)handy.h, $(PERL_INC)hv.h +$(OBJECT) : $(PERL_INC)intrpvar.h, $(PERL_INC)iperlsys.h, $(PERL_INC)keywords.h +$(OBJECT) : $(PERL_INC)mg.h, $(PERL_INC)nostdio.h, $(PERL_INC)op.h +$(OBJECT) : $(PERL_INC)opcode.h, $(PERL_INC)opnames.h, $(PERL_INC)patchlevel.h +$(OBJECT) : $(PERL_INC)perl.h, $(PERL_INC)perlapi.h, $(PERL_INC)perlio.h +$(OBJECT) : $(PERL_INC)perlsdio.h, $(PERL_INC)perlsfio.h, $(PERL_INC)perlvars.h +$(OBJECT) : $(PERL_INC)perly.h, $(PERL_INC)pp.h, $(PERL_INC)pp_proto.h +$(OBJECT) : $(PERL_INC)proto.h, $(PERL_INC)regcomp.h, $(PERL_INC)regexp.h +$(OBJECT) : $(PERL_INC)regnodes.h, $(PERL_INC)scope.h, $(PERL_INC)sv.h +$(OBJECT) : $(PERL_INC)thrdvar.h, $(PERL_INC)thread.h, $(PERL_INC)utf8.h +$(OBJECT) : $(PERL_INC)util.h, $(PERL_INC)vmsish.h, $(PERL_INC)warnings.h ' if $self->{OBJECT}; @@ -2046,6 +2060,8 @@ Consequently, it hasn't really been tested, and may well be incomplete. =cut +our %olbs; + sub makeaperl { my($self, %attribs) = @_; my($makefilename, $searchdirs, $static, $extra, $perlinc, $target, $tmp, $libperl) = @@ -2088,7 +2104,7 @@ $(MAP_TARGET) :: $(MAKE_APERL_FILE) $linkcmd =~ s/\s+/ /g; # Which *.olb files could we make use of... - local(%olbs); + local(%olbs); # XXX can this be lexical? $olbs{$self->{INST_ARCHAUTODIR}} = "$self->{BASEEXT}\$(LIB_EXT)"; require File::Find; File::Find::find(sub { @@ -2185,6 +2201,7 @@ $(MAP_TARGET) :: $(MAKE_APERL_FILE) push @optlibs, @$extra; $target = "Perl$Config{'exe_ext'}" unless $target; + my $shrtarget; ($shrtarget,$targdir) = fileparse($target); $shrtarget =~ s/^([^.]*)/$1Shr/; $shrtarget = $targdir . $shrtarget;