diff options
author | Michael G. Schwern <schwern@pobox.com> | 2003-03-30 18:42:58 -0800 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-03-31 09:54:52 +0000 |
commit | 479d2113ccb2226821ef75027b9186d1d0e367e9 (patch) | |
tree | a9b0815b35ca20eb8b0e60c5a7881b0ed3033e7e /lib/ExtUtils/MM_Cygwin.pm | |
parent | f18b2318c1a1ea8f33016f2bf34abc4ac137b8e3 (diff) | |
download | perl-479d2113ccb2226821ef75027b9186d1d0e367e9.tar.gz |
ExtUtils::MakeMaker 6.03 -> 6.06_05ish
Message-ID: <20030331104257.GB15327@windhund.schwern.org>
p4raw-id: //depot/perl@19099
Diffstat (limited to 'lib/ExtUtils/MM_Cygwin.pm')
-rw-r--r-- | lib/ExtUtils/MM_Cygwin.pm | 125 |
1 files changed, 47 insertions, 78 deletions
diff --git a/lib/ExtUtils/MM_Cygwin.pm b/lib/ExtUtils/MM_Cygwin.pm index 3c37ffd9f7..120e1bb6a6 100644 --- a/lib/ExtUtils/MM_Cygwin.pm +++ b/lib/ExtUtils/MM_Cygwin.pm @@ -10,7 +10,28 @@ require ExtUtils::MM_Any; require ExtUtils::MM_Unix; @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -$VERSION = 1.04; +$VERSION = 1.05; + + +=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 4 + +=item cflags (o) + +if configured for dynamic loading, triggers #define EXT in EXTERN.h + +=cut sub cflags { my($self,$libperl)=@_; @@ -31,97 +52,45 @@ PERLTYPE = $self->{PERLTYPE} } -sub manifypods { - my($self, %attribs) = @_; - return "\nmanifypods : pure_all\n\t$self->{NOECHO}\$(NOOP)\n" unless - %{$self->{MAN3PODS}} or %{$self->{MAN1PODS}}; - my($dist); - my($pod2man_exe); - if (defined $self->{PERL_SRC}) { - $pod2man_exe = File::Spec->catfile($self->{PERL_SRC},'pod','pod2man'); - } else { - $pod2man_exe = File::Spec->catfile($Config{scriptdirexp},'pod2man'); - } - unless ($self->perl_script($pod2man_exe)) { - # No pod2man but some MAN3PODS to be installed - print <<END; -Warning: I could not locate your pod2man program. Please make sure, - your pod2man program is in your PATH before you execute 'make' +=item replace_manpage_separator (o) -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{$$_} && -M $$m{$$_} < -M $$_ && -M $$m{$$_} < -M "], - $self->{MAKEFILE}, q[";' \\ --e 'print "Manifying $$m{$$_}\n"; $$m{$$_} =~ s/::/./g;' \\ --e 'system(qq[$(PERLRUN) $(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, join " \\\n\t", keys %{$self->{MAN1PODS}}, - keys %{$self->{MAN3PODS}}; - - 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}}; - } - join('', @m); +replaces strings '::' with '.' in MAN*POD man page names + +=cut + +sub replace_manpage_separator { + my($self, $man) = @_; + $man =~ s{/+}{.}g; + return $man; } -sub perl_archive { +=item init_linker + +points to libperl.a + +=cut + +sub init_linker { + my $self = shift; + if ($Config{useshrplib} eq 'true') { my $libperl = '$(PERL_INC)' .'/'. "$Config{libperl}"; if( $] >= 5.007 ) { $libperl =~ s/a$/dll.a/; } - return $libperl; + $self->{PERL_ARCHIVE} = $libperl; } else { - return '$(PERL_INC)' .'/'. ("$Config{libperl}" or "libperl.a"); + $self->{PERL_ARCHIVE} = + '$(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 4 - -=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 + $self->{PERL_ARCHIVE_AFTER} ||= ''; + $self->{EXPORT_LIST} ||= ''; +} =back =cut +1; |