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} || []; |
762efda7 |
18 | my($funclist) = $attribs{FUNCLIST} || $self->{FUNCLIST} || []; |
1e44e2bf |
19 | my($imports) = $attribs{IMPORTS} || $self->{IMPORTS} || {}; |
20 | my(@m); |
21 | (my $boot = $self->{NAME}) =~ s/:/_/g; |
22 | |
23 | if (not $self->{SKIPHASH}{'dynamic'}) { |
24 | push(@m," |
25 | $self->{BASEEXT}.def: Makefile.PL |
26 | ", |
27 | ' $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e \'use ExtUtils::Mksymlists; \\ |
28 | Mksymlists("NAME" => "', $self->{NAME}, |
29 | '", "DLBASE" => "',$self->{DLBASE}, |
30 | '", "DL_FUNCS" => ',neatvalue($funcs), |
762efda7 |
31 | '", "FUNCLIST" => ',neatvalue($funclist), |
1e44e2bf |
32 | ', "IMPORTS" => ',neatvalue($imports), |
3aefca04 |
33 | ', "VERSION" => "',$self->{VERSION}, |
34 | '", "DL_VARS" => ', neatvalue($vars), ');\' |
1e44e2bf |
35 | '); |
36 | } |
37 | join('',@m); |
38 | } |
39 | |
40 | sub replace_manpage_separator { |
41 | my($self,$man) = @_; |
42 | $man =~ s,/+,.,g; |
43 | $man; |
44 | } |
45 | |
46 | sub maybe_command { |
47 | my($self,$file) = @_; |
13bc20ff |
48 | $file =~ s,[/\\]+,/,g; |
1e44e2bf |
49 | return $file if -x $file && ! -d _; |
50 | return "$file.exe" if -x "$file.exe" && ! -d _; |
51 | return "$file.cmd" if -x "$file.cmd" && ! -d _; |
52 | return; |
53 | } |
54 | |
55 | sub file_name_is_absolute { |
56 | my($self,$file) = @_; |
57 | $file =~ m{^([a-z]:)?[\\/]}i ; |
58 | } |
59 | |
68dc0745 |
60 | sub perl_archive |
61 | { |
62 | return "\$(PERL_INC)/libperl\$(LIB_EXT)"; |
63 | } |
64 | |
65 | sub export_list |
66 | { |
67 | my ($self) = @_; |
68 | return "$self->{BASEEXT}.def"; |
69 | } |
70 | |
1e44e2bf |
71 | 1; |
72 | __END__ |
73 | |
74 | =head1 NAME |
75 | |
76 | ExtUtils::MM_OS2 - methods to override UN*X behaviour in ExtUtils::MakeMaker |
77 | |
a5f75d66 |
78 | =head1 SYNOPSIS |
79 | |
80 | use ExtUtils::MM_OS2; # Done internally by ExtUtils::MakeMaker if needed |
81 | |
1e44e2bf |
82 | =head1 DESCRIPTION |
83 | |
84 | See ExtUtils::MM_Unix for a documentation of the methods provided |
85 | there. This package overrides the implementation of these methods, not |
86 | the semantics. |
87 | |