MM_W95.pm, Win95 + MinGW + dmake
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / MM_Win95.pm
1 package ExtUtils::MM_Win95;
2
3 use vars qw($VERSION @ISA);
4 $VERSION = 0.02;
5
6 require ExtUtils::MM_Win32;
7 @ISA = qw(ExtUtils::MM_Win32);
8 use Config;
9
10 =head1 NAME
11
12 ExtUtils::MM_Win95 - method to customize MakeMaker for Win9X
13
14 =head1 SYNOPSIS
15
16   You should not be using this module directly.
17
18 =head1 DESCRIPTION
19
20 This is a subclass of ExtUtils::MM_Win32 containing changes necessary
21 to get MakeMaker playing nice with command.com and other Win9Xisms.
22
23 =cut
24
25 sub dist_test {
26     my($self) = shift;
27     return q{
28 disttest : distdir
29         cd $(DISTVNAME)
30         $(ABSPERLRUN) Makefile.PL
31         $(MAKE) $(PASTHRU)
32         $(MAKE) test $(PASTHRU)
33         cd ..
34 };
35 }
36
37 sub xs_c {
38     my($self) = shift;
39     return '' unless $self->needs_linking();
40     '
41 .xs.c:
42         $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) \\
43             $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.c
44         '
45 }
46
47 sub xs_cpp {
48     my($self) = shift;
49     return '' unless $self->needs_linking();
50     '
51 .xs.cpp:
52         $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) \\
53             $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.cpp
54         ';
55 }
56
57 # many makes are too dumb to use xs_c then c_o
58 sub xs_o {
59     my($self) = shift;
60     return '' unless $self->needs_linking();
61     # having to choose between .xs -> .c -> .o and .xs -> .o confuses dmake
62     return '' if $Config{make} eq 'dmake';
63     '
64 .xs$(OBJ_EXT):
65         $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) \\
66             $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.c
67         $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.c
68         ';
69 }
70
71 1;