package ExtUtils::MM_OS2;
use strict;
-use vars qw($VERSION @ISA);
use ExtUtils::MakeMaker qw(neatvalue);
use File::Spec;
-$VERSION = '1.02_01';
+our $VERSION = '6.48';
require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
-@ISA = qw(ExtUtils::MM_Any ExtUtils::MM_Unix);
+our @ISA = qw(ExtUtils::MM_Any ExtUtils::MM_Unix);
=pod
=over 4
+=item init_dist
+
+Define TO_UNIX to convert OS2 linefeeds to Unix style.
+
=cut
-sub dist {
- my($self, %attribs) = @_;
+sub init_dist {
+ my($self) = @_;
- $attribs{TO_UNIX} ||= sprintf <<'MAKE_TEXT', $self->{NOECHO};
-%s$(TEST_F) tmp.zip && $(RM) tmp.zip; \\
-$(ZIP) -ll -mr tmp.zip $(DISTVNAME) && unzip -o tmp.zip && $(RM) tmp.zip
+ $self->{TO_UNIX} ||= <<'MAKE_TEXT';
+$(NOECHO) $(TEST_F) tmp.zip && $(RM_F) tmp.zip; $(ZIP) -ll -mr tmp.zip $(DISTVNAME) && unzip -o tmp.zip && $(RM_F) tmp.zip
MAKE_TEXT
- return $self->SUPER::dist(%attribs);
+ $self->SUPER::init_dist;
}
sub dlsyms {
if ($self->{IMPORTS} && %{$self->{IMPORTS}}) {
# Make import files (needed for static build)
-d 'tmp_imp' or mkdir 'tmp_imp', 0777 or die "Can't mkdir tmp_imp";
- open IMP, '>tmpimp.imp' or die "Can't open tmpimp.imp";
- my ($name, $exp);
- while (($name, $exp)= each %{$self->{IMPORTS}}) {
+ open my $imp, '>', 'tmpimp.imp' or die "Can't open tmpimp.imp";
+ while (my($name, $exp) = each %{$self->{IMPORTS}}) {
my ($lib, $id) = ($exp =~ /(.*)\.(.*)/) or die "Malformed IMPORT `$exp'";
- print IMP "$name $lib $id ?\n";
+ print $imp "$name $lib $id ?\n";
}
- close IMP or die "Can't close tmpimp.imp";
+ close $imp or die "Can't close tmpimp.imp";
# print "emximp -o tmpimp$Config::Config{lib_ext} tmpimp.imp\n";
system "emximp -o tmpimp$Config::Config{lib_ext} tmpimp.imp"
and die "Cannot make import library: $!, \$?=$?";
return;
}
-sub perl_archive {
- return "\$(PERL_INC)/libperl\$(LIB_EXT)";
-}
+=item init_linker
-=item perl_archive_after
+=cut
-This is an internal method that returns path to a library which
-should be put on the linker command line I<after> the external libraries
-to be linked to dynamic extensions. This may be needed if the linker
-is one-pass, and Perl includes some overrides for C RTL functions,
-such as malloc().
+sub init_linker {
+ my $self = shift;
-=cut
+ $self->{PERL_ARCHIVE} = "\$(PERL_INC)/libperl\$(LIB_EXT)";
-sub perl_archive_after
-{
- return "\$(PERL_INC)/libperl_override\$(LIB_EXT)" unless $OS2::is_aout;
- return "";
+ $self->{PERL_ARCHIVE_AFTER} = $OS2::is_aout
+ ? ''
+ : '$(PERL_INC)/libperl_override$(LIB_EXT)';
+ $self->{EXPORT_LIST} = '$(BASEEXT).def';
}
-sub export_list
-{
- my ($self) = @_;
- return "$self->{BASEEXT}.def";
-}
+=item os_flavor
-1;
+OS/2 is OS/2
-__END__
+=cut
-=pod
+sub os_flavor {
+ return('OS/2');
+}
=back
=cut
+
+1;