summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCharles Bailey <bailey@newman.upenn.edu>1999-08-23 03:40:07 +0000
committerbailey <bailey@newman.upenn.edu>1999-08-23 03:40:07 +0000
commitf0585323684fd5b018ff6d479ece5c134dabef3e (patch)
tree6472a6e3d26e7e4be20c2b36f061bce3d35bdb14 /lib
parent52a043e6cc1df667f590107cf208184857a066bd (diff)
downloadperl-f0585323684fd5b018ff6d479ece5c134dabef3e.tar.gz
When extension doesn't have a "main" object file to anchor linker search, pull in all objct files
p4raw-id: //depot/vmsperl@4031
Diffstat (limited to 'lib')
-rw-r--r--lib/ExtUtils/MM_VMS.pm25
1 files changed, 21 insertions, 4 deletions
diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm
index a15e328657..31ca69067e 100644
--- a/lib/ExtUtils/MM_VMS.pm
+++ b/lib/ExtUtils/MM_VMS.pm
@@ -1177,7 +1177,7 @@ static :: $(INST_ARCHAUTODIR)$(BASEEXT).opt
$(NOECHO) $(NOOP)
') unless $self->{SKIPHASH}{'static'};
- push(@m,'
+ push @m,'
$(INST_ARCHAUTODIR)$(BASEEXT).opt : $(BASEEXT).opt
$(CP) $(MMS$SOURCE) $(MMS$TARGET)
@@ -1185,9 +1185,26 @@ $(BASEEXT).opt : Makefile.PL
$(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e "use ExtUtils::Mksymlists;" -
',qq[-e "Mksymlists('NAME' => '$self->{NAME}', 'DL_FUNCS' => ],
neatvalue($funcs),q[, 'DL_VARS' => ],neatvalue($vars),
- q[, 'FUNCLIST' => ],neatvalue($funclist),')"
- $(PERL) -e "print ""$(INST_STATIC)/Include=$(BASEEXT)\n$(INST_STATIC)/Library\n"";" >>$(MMS$TARGET)
-');
+ q[, 'FUNCLIST' => ],neatvalue($funclist),qq[)"\n];
+
+ push @m, ' $(PERL) -e "print ""$(INST_STATIC)/Include=';
+ if ($self->{OBJECT} =~ /\bBASEEXT\b/ or
+ $self->{OBJECT} =~ /\b$self->{BASEEXT}\b/i) { push @m, '$(BASEEXT)'; }
+ else { # We don't have a "main" object file, so pull 'em all in
+ my(@omods) = map { s/\.[^.]*$//; # Trim off file type
+ s[\$\(\w+_EXT\)][]; # even as a macro
+ s/.*[:>\/\]]//; # Trim off dir spec
+ $_; } split ' ', $self->eliminate_macros($self->{OBJECT});
+ my($tmp,@lines,$elt) = '';
+ my $tmp = shift @omods;
+ foreach $elt (@omods) {
+ $tmp .= ",$elt";
+ if (length($tmp) > 80) { push @lines, $tmp; $tmp = ''; }
+ }
+ push @lines, $tmp;
+ push @m, '(', join( qq[, -\\n\\t"";" >>\$(MMS\$TARGET)\n\t\$(PERL) -e "print ""], @lines),')';
+ }
+ push @m, '\n$(INST_STATIC)/Library\n"";" >>$(MMS$TARGET)',"\n";
if (length $self->{LDLOADLIBS}) {
my($lib); my($line) = '';