[win32] merge change#896 from maintbranch
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / MM_OS2.pm
CommitLineData
1e44e2bf 1package ExtUtils::MM_OS2;
2
3#use Config;
4#use Cwd;
5#use File::Basename;
6require Exporter;
7
8Exporter::import('ExtUtils::MakeMaker',
9 qw( $Verbose &neatvalue));
10
1e44e2bf 11unshift @MM::ISA, 'ExtUtils::MM_OS2';
12
13sub dlsyms {
14 my($self,%attribs) = @_;
15
16 my($funcs) = $attribs{DL_FUNCS} || $self->{DL_FUNCS} || {};
17 my($vars) = $attribs{DL_VARS} || $self->{DL_VARS} || [];
18 my($imports) = $attribs{IMPORTS} || $self->{IMPORTS} || {};
19 my(@m);
20 (my $boot = $self->{NAME}) =~ s/:/_/g;
21
22 if (not $self->{SKIPHASH}{'dynamic'}) {
23 push(@m,"
24$self->{BASEEXT}.def: Makefile.PL
25",
26 ' $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e \'use ExtUtils::Mksymlists; \\
27 Mksymlists("NAME" => "', $self->{NAME},
28 '", "DLBASE" => "',$self->{DLBASE},
29 '", "DL_FUNCS" => ',neatvalue($funcs),
30 ', "IMPORTS" => ',neatvalue($imports),
31 ', "DL_VARS" => ', neatvalue($vars), ');\'
32');
33 }
34 join('',@m);
35}
36
37sub replace_manpage_separator {
38 my($self,$man) = @_;
39 $man =~ s,/+,.,g;
40 $man;
41}
42
43sub maybe_command {
44 my($self,$file) = @_;
45 return $file if -x $file && ! -d _;
46 return "$file.exe" if -x "$file.exe" && ! -d _;
47 return "$file.cmd" if -x "$file.cmd" && ! -d _;
48 return;
49}
50
51sub file_name_is_absolute {
52 my($self,$file) = @_;
53 $file =~ m{^([a-z]:)?[\\/]}i ;
54}
55
68dc0745 56sub perl_archive
57{
58 return "\$(PERL_INC)/libperl\$(LIB_EXT)";
59}
60
61sub export_list
62{
63 my ($self) = @_;
64 return "$self->{BASEEXT}.def";
65}
66
1e44e2bf 671;
68__END__
69
70=head1 NAME
71
72ExtUtils::MM_OS2 - methods to override UN*X behaviour in ExtUtils::MakeMaker
73
a5f75d66 74=head1 SYNOPSIS
75
76 use ExtUtils::MM_OS2; # Done internally by ExtUtils::MakeMaker if needed
77
1e44e2bf 78=head1 DESCRIPTION
79
80See ExtUtils::MM_Unix for a documentation of the methods provided
81there. This package overrides the implementation of these methods, not
82the semantics.
83