Pre-YAPC consting fun
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / MM_Win95.pm
index 010900f..d0e2cb2 100644 (file)
@@ -1,11 +1,13 @@
 package ExtUtils::MM_Win95;
 
 use vars qw($VERSION @ISA);
-$VERSION = 0.02;
+$VERSION = '0.04';
 
 require ExtUtils::MM_Win32;
 @ISA = qw(ExtUtils::MM_Win32);
-use Config;
+
+use ExtUtils::MakeMaker::Config;
+
 
 =head1 NAME
 
@@ -20,52 +22,102 @@ ExtUtils::MM_Win95 - method to customize MakeMaker for Win9X
 This is a subclass of ExtUtils::MM_Win32 containing changes necessary
 to get MakeMaker playing nice with command.com and other Win9Xisms.
 
-=cut
+=head2 Overriden methods
 
-sub dist_test {
-    my($self) = shift;
-    return q{
-disttest : distdir
-       cd $(DISTVNAME)
-       $(ABSPERLRUN) Makefile.PL
-       $(MAKE) $(PASTHRU)
-       $(MAKE) test $(PASTHRU)
-       cd ..
-};
-}
+Most of these make up for limitations in the Win9x/nmake command shell.
+Mostly its lack of &&.
+
+=over 4
+
+
+=item xs_c
+
+The && problem.
+
+=cut
 
 sub xs_c {
     my($self) = shift;
     return '' unless $self->needs_linking();
     '
 .xs.c:
-       $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) \\
-           $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.c
+       $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.c
        '
 }
 
+
+=item xs_cpp
+
+The && problem
+
+=cut
+
 sub xs_cpp {
     my($self) = shift;
     return '' unless $self->needs_linking();
     '
 .xs.cpp:
-       $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) \\
-           $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.cpp
+       $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.cpp
        ';
 }
 
-# many makes are too dumb to use xs_c then c_o
+=item xs_o 
+
+The && problem.
+
+=cut
+
 sub xs_o {
     my($self) = shift;
     return '' unless $self->needs_linking();
-    # having to choose between .xs -> .c -> .o and .xs -> .o confuses dmake
-    return '' if $Config{make} eq 'dmake';
     '
 .xs$(OBJ_EXT):
-       $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) \\
-           $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.c
+       $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.c
        $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.c
        ';
 }
 
+
+=item max_exec_len
+
+Win98 chokes on things like Encode if we set the max length to nmake's max
+of 2K.  So we go for a more conservative value of 1K.
+
+=cut
+
+sub max_exec_len {
+    my $self = shift;
+
+    return $self->{_MAX_EXEC_LEN} ||= 1024;
+}
+
+
+=item os_flavor
+
+Win95 and Win98 and WinME are collectively Win9x and Win32
+
+=cut
+
+sub os_flavor {
+    my $self = shift;
+    return ($self->SUPER::os_flavor, 'Win9x');
+}
+
+
+=back
+
+
+=head1 AUTHOR
+
+Code originally inside MM_Win32.  Original author unknown.
+
+Currently maintained by Michael G Schwern C<schwern@pobox.com>.
+
+Send patches and ideas to C<makemaker@perl.org>.
+
+See http://www.makemaker.org.
+
+=cut
+
+
 1;