X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FExtUtils%2FMM_Cygwin.pm;h=3d03d321f3713e54adceea3ffa57cae02bd7fa7e;hb=afa6035dfed8c8b76d51a5825dc9d138e642958c;hp=ffc72e349f3864352781dcf88f1c1f3ed9f93f52;hpb=f89d6eaa35318513fcfc9665bbb2d0bcea3326ee;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/ExtUtils/MM_Cygwin.pm b/lib/ExtUtils/MM_Cygwin.pm index ffc72e3..3d03d32 100644 --- a/lib/ExtUtils/MM_Cygwin.pm +++ b/lib/ExtUtils/MM_Cygwin.pm @@ -1,19 +1,24 @@ package ExtUtils::MM_Cygwin; +use strict; + +our $VERSION = '1.00'; + use Config; #use Cwd; #use File::Basename; require Exporter; -Exporter::import('ExtUtils::MakeMaker', - qw( $Verbose &neatvalue)); +require ExtUtils::MakeMaker; +ExtUtils::MakeMaker->import(qw( $Verbose &neatvalue)); + +use File::Spec; unshift @MM::ISA, 'ExtUtils::MM_Cygwin'; sub canonpath { - my($self,$path) = @_; - $path =~ s|\\|/|g; - return $self->ExtUtils::MM_Unix::canonpath($path); + shift; + return File::Spec->canonpath(@_); } sub cflags { @@ -24,7 +29,6 @@ sub cflags { / *= */ and $self->{$`} = $'; }; $self->{CCFLAGS} .= " -DUSEIMPORTLIB" if ($Config{useshrplib} eq 'true'); - $self->{CCFLAGS} .= " -DCYGWIN32" unless ($self->{CCFLAGS} =~ /\-DCYGWIN32/); return $self->{CFLAGS} = qq{ CCFLAGS = $self->{CCFLAGS} @@ -43,9 +47,9 @@ sub manifypods { my($dist); my($pod2man_exe); if (defined $self->{PERL_SRC}) { - $pod2man_exe = $self->catfile($self->{PERL_SRC},'pod','pod2man'); + $pod2man_exe = File::Spec->catfile($self->{PERL_SRC},'pod','pod2man'); } else { - $pod2man_exe = $self->catfile($Config{scriptdirexp},'pod2man'); + $pod2man_exe = File::Spec->catfile($Config{scriptdirexp},'pod2man'); } unless ($self->perl_script($pod2man_exe)) { # No pod2man but some MAN3PODS to be installed @@ -72,6 +76,8 @@ q[-e 'next if -e $$m{$$_} && -M $$m{$$_} < -M $$_ && -M $$m{$$_} < -M "], push(@m,"\n"); if (%{$self->{MAN1PODS}} || %{$self->{MAN3PODS}}) { + grep { $self->{MAN1PODS}{$_} =~ s/::/./g } keys %{$self->{MAN1PODS}}; + grep { $self->{MAN3PODS}{$_} =~ s/::/./g } keys %{$self->{MAN3PODS}}; push @m, "\t$self->{NOECHO}\$(POD2MAN) \\\n\t"; push @m, join " \\\n\t", %{$self->{MAN1PODS}}, %{$self->{MAN3PODS}}; } @@ -98,7 +104,7 @@ ExtUtils::MM_Cygwin - methods to override UN*X behaviour in ExtUtils::MakeMaker See ExtUtils::MM_Unix for a documentation of the methods provided there. -=over +=over 4 =item canonpath @@ -115,3 +121,8 @@ replaces strings '::' with '.' in man page names =item perl_archive points to libperl.a + +=back + +=cut +