File Coverage

lib/ExtUtils/MM_OS390.pm
Criterion Covered Total %
statement 9 25 36.0
branch 0 6 0.0
condition 0 2 0.0
subroutine 3 4 75.0
pod 1 1 100.0
total 13 38 34.2


line stmt bran cond sub pod time code
1             package ExtUtils::MM_OS390;
2              
3 1     1   7436 use strict;
  1         3  
  1         28  
4 1     1   5 use warnings;
  1         2  
  1         71  
5             our $VERSION = '7.70';
6             $VERSION =~ tr/_//d;
7              
8 1     1   9 use ExtUtils::MakeMaker::Config;
  1         3  
  1         6  
9             require ExtUtils::MM_Unix;
10             our @ISA = qw(ExtUtils::MM_Unix);
11              
12             =head1 NAME
13              
14             ExtUtils::MM_OS390 - OS390 specific subclass of ExtUtils::MM_Unix
15              
16             =head1 SYNOPSIS
17              
18             Don't use this module directly.
19             Use ExtUtils::MM and let it choose.
20              
21             =head1 DESCRIPTION
22              
23             This is a subclass of L<ExtUtils::MM_Unix> which contains functionality for
24             OS390.
25              
26             Unless otherwise stated it works just like ExtUtils::MM_Unix.
27              
28             =head2 Overriden methods
29              
30             =over
31              
32             =item xs_make_dynamic_lib
33              
34             Defines the recipes for the C<dynamic_lib> section.
35              
36             =cut
37              
38             sub xs_make_dynamic_lib {
39 0     0 1   my ($self, $attribs, $object, $to, $todir, $ldfrom, $exportlist, $dlsyms) = @_;
40 0 0         $exportlist = '' if $exportlist ne '$(EXPORT_LIST)';
41 0           my $armaybe = $self->_xs_armaybe($attribs);
42 0   0       my @m = sprintf '%s : %s $(MYEXTLIB) %s$(DFSEP).exists %s $(PERL_ARCHIVEDEP) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP) %s'."\n", $to, $object, $todir, $exportlist, ($dlsyms || '');
43 0           my $dlsyms_arg = $self->xs_dlsyms_arg($dlsyms);
44 0 0         if ($armaybe ne ':'){
45 0           $ldfrom = 'tmp$(LIB_EXT)';
46 0           push(@m," \$(ARMAYBE) cr $ldfrom $object\n");
47 0           push(@m," \$(RANLIB) $ldfrom\n");
48             }
49              
50             # For example in AIX the shared objects/libraries from previous builds
51             # linger quite a while in the shared dynalinker cache even when nobody
52             # is using them. This is painful if one for instance tries to restart
53             # a failed build because the link command will fail unnecessarily 'cos
54             # the shared object/library is 'busy'.
55 0           push(@m," \$(RM_F) \$\@\n");
56              
57 0           my $libs = '$(LDLOADLIBS)';
58              
59 0           my $ld_run_path_shell = "";
60 0 0         if ($self->{LD_RUN_PATH} ne "") {
61 0           $ld_run_path_shell = 'LD_RUN_PATH="$(LD_RUN_PATH)" ';
62             }
63              
64 0           push @m, sprintf <<'MAKE', $ld_run_path_shell, $self->xs_obj_opt('$@'), $dlsyms_arg, $ldfrom, $libs, $exportlist;
65             %s$(LD) %s $(LDDLFLAGS) %s $(OTHERLDFLAGS) %s $(MYEXTLIB) \
66             $(PERL_ARCHIVE) %s $(PERL_ARCHIVE_AFTER) %s \
67             $(INST_DYNAMIC_FIX)
68             $(CHMOD) $(PERM_RWX) $@
69             MAKE
70 0           join '', @m;
71             }
72              
73             1;
74              
75             =back
76              
77             =head1 AUTHOR
78              
79             Michael G Schwern <schwern@pobox.com> with code from ExtUtils::MM_Unix
80              
81             =head1 SEE ALSO
82              
83             L<ExtUtils::MakeMaker>
84              
85             =cut
86             __END__