home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl_mlb.zip / ExtUtils / MM_OS2.pm < prev    next >
Text File  |  1997-11-29  |  2KB  |  84 lines

  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.  
  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.  
  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.  
  67. 1;
  68. __END__
  69.  
  70. =head1 NAME
  71.  
  72. ExtUtils::MM_OS2 - methods to override UN*X behaviour in ExtUtils::MakeMaker
  73.  
  74. =head1 SYNOPSIS
  75.  
  76.  use ExtUtils::MM_OS2; # Done internally by ExtUtils::MakeMaker if needed
  77.  
  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.  
  84.