Commit | Line | Data |
1e44e2bf |
1 | package ExtUtils::MM_OS2; |
2 | |
3 | #use Config; |
4 | #use Cwd; |
5 | #use File::Basename; |
6 | require Exporter; |
7 | |
8 | Exporter::import('ExtUtils::MakeMaker', |
9 | qw( $Verbose &neatvalue)); |
10 | |
1e44e2bf |
11 | unshift @MM::ISA, 'ExtUtils::MM_OS2'; |
12 | |
13 | sub 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 | |
37 | sub replace_manpage_separator { |
38 | my($self,$man) = @_; |
39 | $man =~ s,/+,.,g; |
40 | $man; |
41 | } |
42 | |
43 | sub 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 | |
51 | sub file_name_is_absolute { |
52 | my($self,$file) = @_; |
53 | $file =~ m{^([a-z]:)?[\\/]}i ; |
54 | } |
55 | |
68dc0745 |
56 | sub perl_archive |
57 | { |
58 | return "\$(PERL_INC)/libperl\$(LIB_EXT)"; |
59 | } |
60 | |
61 | sub export_list |
62 | { |
63 | my ($self) = @_; |
64 | return "$self->{BASEEXT}.def"; |
65 | } |
66 | |
1e44e2bf |
67 | 1; |
68 | __END__ |
69 | |
70 | =head1 NAME |
71 | |
72 | ExtUtils::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 | |
80 | See ExtUtils::MM_Unix for a documentation of the methods provided |
81 | there. This package overrides the implementation of these methods, not |
82 | the semantics. |
83 | |