home *** CD-ROM | disk | FTP | other *** search
/ BURKS 2 / BURKS_AUG97.ISO / SLAKWARE / D12 / PERL1.TGZ / perl1.tar / usr / lib / perl5 / ExtUtils / MM_OS2.pm < prev    next >
Text File  |  1996-06-28  |  2KB  |  74 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. $ENV{EMXSHELL} = 'sh'; # to run `commands`
  12. unshift @MM::ISA, 'ExtUtils::MM_OS2';
  13.  
  14. sub dlsyms {
  15.     my($self,%attribs) = @_;
  16.  
  17.     my($funcs) = $attribs{DL_FUNCS} || $self->{DL_FUNCS} || {};
  18.     my($vars)  = $attribs{DL_VARS} || $self->{DL_VARS} || [];
  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),
  31.      ', "IMPORTS" => ',neatvalue($imports),
  32.      ', "DL_VARS" => ', neatvalue($vars), ');\'
  33. ');
  34.     }
  35.     join('',@m);
  36. }
  37.  
  38. sub replace_manpage_separator {
  39.     my($self,$man) = @_;
  40.     $man =~ s,/+,.,g;
  41.     $man;
  42. }
  43.  
  44. sub maybe_command {
  45.     my($self,$file) = @_;
  46.     return $file if -x $file && ! -d _;
  47.     return "$file.exe" if -x "$file.exe" && ! -d _;
  48.     return "$file.cmd" if -x "$file.cmd" && ! -d _;
  49.     return;
  50. }
  51.  
  52. sub file_name_is_absolute {
  53.     my($self,$file) = @_;
  54.     $file =~ m{^([a-z]:)?[\\/]}i ;
  55. }
  56.  
  57. 1;
  58. __END__
  59.  
  60. =head1 NAME
  61.  
  62. ExtUtils::MM_OS2 - methods to override UN*X behaviour in ExtUtils::MakeMaker
  63.  
  64. =head1 SYNOPSIS
  65.  
  66.  use ExtUtils::MM_OS2; # Done internally by ExtUtils::MakeMaker if needed
  67.  
  68. =head1 DESCRIPTION
  69.  
  70. See ExtUtils::MM_Unix for a documentation of the methods provided
  71. there. This package overrides the implementation of these methods, not
  72. the semantics.
  73.  
  74.