1package ExtUtils::MM_OS390;
2
3use strict;
4use warnings;
5our $VERSION = '7.70';
6$VERSION =~ tr/_//d;
7
8use ExtUtils::MakeMaker::Config;
9require ExtUtils::MM_Unix;
10our @ISA = qw(ExtUtils::MM_Unix);
11
12=head1 NAME
13
14ExtUtils::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
23This is a subclass of L<ExtUtils::MM_Unix> which contains functionality for
24OS390.
25
26Unless 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
34Defines the recipes for the C<dynamic_lib> section.
35
36=cut
37
38sub xs_make_dynamic_lib {
39    my ($self, $attribs, $object, $to, $todir, $ldfrom, $exportlist, $dlsyms) = @_;
40    $exportlist = '' if $exportlist ne '$(EXPORT_LIST)';
41    my $armaybe = $self->_xs_armaybe($attribs);
42    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    my $dlsyms_arg = $self->xs_dlsyms_arg($dlsyms);
44    if ($armaybe ne ':'){
45        $ldfrom = 'tmp$(LIB_EXT)';
46        push(@m,"	\$(ARMAYBE) cr $ldfrom $object\n");
47        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    push(@m,"	\$(RM_F) \$\@\n");
56
57    my $libs = '$(LDLOADLIBS)';
58
59    my $ld_run_path_shell = "";
60    if ($self->{LD_RUN_PATH} ne "") {
61        $ld_run_path_shell = 'LD_RUN_PATH="$(LD_RUN_PATH)" ';
62    }
63
64    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) $@
69MAKE
70    join '', @m;
71}
72
731;
74
75=back
76
77=head1 AUTHOR
78
79Michael G Schwern <schwern@pobox.com> with code from ExtUtils::MM_Unix
80
81=head1 SEE ALSO
82
83L<ExtUtils::MakeMaker>
84
85=cut
86__END__
87