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