"lose the it's", from Abhijit Menon-Sen.
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / MM_Win32.pm
index ab8570d..7bcf1f1 100644 (file)
@@ -1,5 +1,7 @@
 package ExtUtils::MM_Win32;
 
+our $VERSION = '1.00';
+
 =head1 NAME
 
 ExtUtils::MM_Win32 - methods to override UN*X behaviour in ExtUtils::MakeMaker
@@ -14,7 +16,7 @@ See ExtUtils::MM_Unix for a documentation of the methods provided
 there. This package overrides the implementation of these methods, not
 the semantics.
 
-=over
+=over 4
 
 =cut 
 
@@ -23,8 +25,8 @@ use Config;
 use File::Basename;
 require Exporter;
 
-Exporter::import('ExtUtils::MakeMaker',
-       qw( $Verbose &neatvalue));
+require ExtUtils::MakeMaker;
+ExtUtils::MakeMaker->import(qw( $Verbose &neatvalue));
 
 $ENV{EMXSHELL} = 'sh'; # to run `commands`
 unshift @MM::ISA, 'ExtUtils::MM_Win32';
@@ -388,7 +390,6 @@ PM_TO_BLIB = }.join(" \\\n\t", %{$self->{PM}}).q{
 
 
 sub path {
-    local $^W = 1;
     my($self) = @_;
     my $path = $ENV{'PATH'} || $ENV{'Path'} || $ENV{'path'};
     my @path = split(';',$path);
@@ -414,7 +415,7 @@ sub static_lib {
 $(INST_STATIC): $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)\.exists
        $(RM_RF) $@
 END
-    # If this extension has it's own library (eg SDBM_File)
+    # If this extension has its own library (eg SDBM_File)
     # then copy that to $(INST_STATIC) and add $(OBJECT) into it.
     push(@m, "\t$self->{CP} \$(MYEXTLIB) \$\@\n") if $self->{MYEXTLIB};
 
@@ -485,13 +486,11 @@ sub dynamic_lib {
     my($ldfrom) = '$(LDFROM)';
     my(@m);
 
-# several things for GCC/Mingw32:
-# 1. use correct CRT startup objects (possibly unnecessary)
-# 2. try to overcome non-relocateable-DLL problems by generating
+# one thing for GCC/Mingw32:
+# we try to overcome non-relocateable-DLL problems by generating
 #    a (hopefully unique) image-base from the dll's name
 # -- BKS, 10-19-1999
     if ($GCC) { 
-       $otherldflags .= ' -L$(PERL_ARCHIVE:d) -nostdlib $(PERL_ARCHIVE:d)gdllcrt0.o ';
        my $dllname = $self->{BASEEXT} . "." . $self->{DLEXT};
        $dllname =~ /(....)(.{0,4})/;
        my $baseaddr = unpack("n", $1 ^ $2);
@@ -533,6 +532,22 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)\.exists
     join('',@m);
 }
 
+sub clean
+{
+ my ($self) = @_;
+ my $s = &ExtUtils::MM_Unix::clean;
+ if ($GCC) {
+       $s .= <<'END';
+clean ::
+       -$(RM_F) dll.base dll.exp
+
+END
+ }
+ return $s;
+}
+
+
+
 sub perl_archive
 {
     my ($self) = @_;
@@ -599,7 +614,7 @@ pm_to_blib: $(TO_INST_PM)
        ($NMAKE ? 'qw[ <<pmfiles.dat ],'
                : $DMAKE ? 'qw[ $(mktmp,pmfiles.dat $(PM_TO_BLIB:s,\\,\\\\,)\n) ],'
                         : '{ qw[$(PM_TO_BLIB)] },'
-        ).q{'}.$autodir.q{')"
+        ).q{'}.$autodir.q{','$(PM_FILTER)')"
        }. ($NMAKE ? q{
 $(PM_TO_BLIB)
 <<
@@ -687,7 +702,7 @@ MOD_INSTALL = $(PERL) -I$(INST_LIB) -I$(PERL_LIB) -MExtUtils::Install \
 -e "install({ @ARGV },'$(VERBINST)',0,'$(UNINST)');"
 
 DOC_INSTALL = $(PERL) -e "$$\=\"\n\n\";" \
--e "print '=head2 ', scalar(localtime), ': C<', shift, '>', ' L<', shift, '>';" \
+-e "print '=head2 ', scalar(localtime), ': C<', shift, '>', ' L<', $$arg=shift, '|', $$arg, '>';" \
 -e "print '=over 4';" \
 -e "while (defined($$key = shift) and defined($$val = shift)) { print '=item *';print 'C<', \"$$key: $$val\", '>'; }" \
 -e "print '=back';"
@@ -751,12 +766,6 @@ config :: $(INST_AUTODIR)\.exists
        '.$self->{NOECHO}.'$(NOOP)
 ';
 
-    push @m, qq{
-config :: Version_check
-       $self->{NOECHO}\$(NOOP)
-
-} unless $self->{PARENT} or ($self->{PERL_SRC} && $self->{INSTALLDIRS} eq "perl") or $self->{NO_VC};
-
     push @m, $self->dir_target(qw[$(INST_AUTODIR) $(INST_LIBDIR) $(INST_ARCHAUTODIR)]);
 
     if (%{$self->{HTMLLIBPODS}}) {