<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package ExtUtils::MM_Cygwin;

use Config;
#use Cwd;
#use File::Basename;
require Exporter;

Exporter::import('ExtUtils::MakeMaker',
       qw( $Verbose &amp;neatvalue));

unshift @MM::ISA, 'ExtUtils::MM_Cygwin';

sub canonpath {
    my($self,$path) = @_;
    $path =~ s|\\|/|g;
    return $self-&gt;ExtUtils::MM_Unix::canonpath($path);
}

sub cflags {
    my($self,$libperl)=@_;
    return $self-&gt;{CFLAGS} if $self-&gt;{CFLAGS};
    my $base =$self-&gt;ExtUtils::MM_Unix::cflags($libperl);
    foreach (split /\n/, $base) {
      / *= */ and $self-&gt;{$`} = $';
    };
    $self-&gt;{CCFLAGS} .= " -DUSEIMPORTLIB" if ($Config{useshrplib} eq 'true');

    return $self-&gt;{CFLAGS} = qq{
CCFLAGS = $self-&gt;{CCFLAGS}
OPTIMIZE = $self-&gt;{OPTIMIZE}
PERLTYPE = $self-&gt;{PERLTYPE}
LARGE = $self-&gt;{LARGE}
SPLIT = $self-&gt;{SPLIT}
};

}

sub manifypods {
    my($self, %attribs) = @_;
    return "\nmanifypods : pure_all\n\t$self-&gt;{NOECHO}\$(NOOP)\n" unless
        %{$self-&gt;{MAN3PODS}} or %{$self-&gt;{MAN1PODS}};
    my($dist);
    my($pod2man_exe);
    if (defined $self-&gt;{PERL_SRC}) {
        $pod2man_exe = $self-&gt;catfile($self-&gt;{PERL_SRC},'pod','pod2man');
    } else {
        $pod2man_exe = $self-&gt;catfile($Config{scriptdirexp},'pod2man');
    }
    unless ($self-&gt;perl_script($pod2man_exe)) {
        # No pod2man but some MAN3PODS to be installed
        print &lt;&lt;END;

Warning: I could not locate your pod2man program. Please make sure,
         your pod2man program is in your PATH before you execute 'make'

END
        $pod2man_exe = "-S pod2man";
    }
    my(@m);
    push @m,
qq[POD2MAN_EXE = $pod2man_exe\n],
qq[POD2MAN = \$(PERL) -we '%m=\@ARGV;for (keys %m){' \\\n],
q[-e 'next if -e $$m{$$_} &amp;&amp; -M $$m{$$_} &lt; -M $$_ &amp;&amp; -M $$m{$$_} &lt; -M "],
 $self-&gt;{MAKEFILE}, q[";' \\
-e 'print "Manifying $$m{$$_}\n"; $$m{$$_} =~ s/::/./g;' \\
-e 'system(qq[$$^X ].q["-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" $(POD2MAN_EXE) ].qq[$$_&gt;$$m{$$_}])==0 or warn "Couldn\\047t install $$m{$$_}\n";' \\
-e 'chmod(oct($(PERM_RW))), $$m{$$_} or warn "chmod $(PERM_RW) $$m{$$_}: $$!\n";}'
];
    push @m, "\nmanifypods : pure_all ";
    push @m, join " \\\n\t", keys %{$self-&gt;{MAN1PODS}}, keys %{$self-&gt;{MAN3PODS}};

    push(@m,"\n");
    if (%{$self-&gt;{MAN1PODS}} || %{$self-&gt;{MAN3PODS}}) {
        grep { $self-&gt;{MAN1PODS}{$_} =~ s/::/./g } keys %{$self-&gt;{MAN1PODS}};
        grep { $self-&gt;{MAN3PODS}{$_} =~ s/::/./g } keys %{$self-&gt;{MAN3PODS}};
        push @m, "\t$self-&gt;{NOECHO}\$(POD2MAN) \\\n\t";
        push @m, join " \\\n\t", %{$self-&gt;{MAN1PODS}}, %{$self-&gt;{MAN3PODS}};
    }
    join('', @m);
}

sub perl_archive
{
 return '$(PERL_INC)' .'/'. ("$Config{libperl}" or "libperl.a");
}

1;
__END__

=head1 NAME

ExtUtils::MM_Cygwin - methods to override UN*X behaviour in ExtUtils::MakeMaker

=head1 SYNOPSIS

 use ExtUtils::MM_Cygwin; # Done internally by ExtUtils::MakeMaker if needed

=head1 DESCRIPTION

See ExtUtils::MM_Unix for a documentation of the methods provided there.

=over

=item canonpath

replaces backslashes with forward ones.  then acts as *nixish.

=item cflags

if configured for dynamic loading, triggers #define EXT in EXTERN.h

=item manifypods

replaces strings '::' with '.' in man page names

=item perl_archive

points to libperl.a

=back

=cut

</pre></body></html>