MM_Cygwin.pm revision 7c478bd95313f5f23a4c958a745db2134aa03244
use Config;
#use Cwd;
#use File::Basename;
require Exporter;
Exporter::import('ExtUtils::MakeMaker',
sub canonpath {
$path =~ s|\\|/|g;
}
sub cflags {
foreach (split /\n/, $base) {
/ *= */ and $self->{$`} = $';
};
};
}
sub manifypods {
return "\nmanifypods : pure_all\n\t$self->{NOECHO}\$(NOOP)\n" unless
my($dist);
my($pod2man_exe);
} else {
}
# No pod2man but some MAN3PODS to be installed
print <<END;
END
$pod2man_exe = "-S pod2man";
}
my(@m);
push @m,
qq[POD2MAN_EXE = $pod2man_exe\n],
q[-e 'next if -e $$m{$$_} && -M $$m{$$_} < -M $$_ && -M $$m{$$_} < -M "],
-e 'print "Manifying $$m{$$_}\n"; $$m{$$_} =~ s/::/./g;' \\
-e 'system(qq[$$^X ].q["-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" $(POD2MAN_EXE) ].qq[$$_>$$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,"\n");
push @m, "\t$self->{NOECHO}\$(POD2MAN) \\\n\t";
}
join('', @m);
}
sub perl_archive
{
return '$(PERL_INC)' .'/'. ("$Config{libperl}" or "libperl.a");
}
1;
=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