Undo io_linenum.t part of #34148. It was io_multihomed.t that I meant
[p5sagit/p5-mst-13.2.git] / ext / SDBM_File / sdbm / Makefile.PL
1 use ExtUtils::MakeMaker;
2
3 my $define = '-DSDBM -DDUFF';
4 $define .= ' -DWIN32 -DPERL_STATIC_SYMS' if ($^O eq 'MSWin32');
5
6 if ($^O eq 'VMS') {  # Old VAXC compiler can't handle Duff's device
7     require Config;
8     $define =~ s/\s+-DDUFF// if $Config::Config{'vms_cc_type'} eq 'vaxc';
9 }
10
11 WriteMakefile(
12     NAME      => 'sdbm', # (doesn't matter what the name is here) oh yes it does
13 #    LINKTYPE  => 'static',
14     DEFINE    => $define,
15     INC       => '-I$(PERL_INC)', # force PERL_INC dir ahead of system -I's
16     SKIP      => [qw(dynamic dynamic_lib dlsyms)],
17     OBJECT    => '$(O_FILES)',
18     clean     => {'FILES' => 'dbu libsdbm.a dbd dba dbe x-dbu *.dir *.pag'},
19     H         => [qw(tune.h sdbm.h pair.h $(PERL_INC)/config.h)],
20     C         => [qw(sdbm.c pair.c hash.c)]
21 );
22
23 sub MY::constants {
24     package MY;
25     my $self = shift;
26
27     $self->{INST_STATIC} = 'libsdbm$(LIB_EXT)';
28
29     return $self->SUPER::constants();
30 }
31
32 sub MY::top_targets {
33     my $r = '
34 all :: static
35         $(NOECHO) $(NOOP)
36
37 config ::
38         $(NOECHO) $(NOOP)
39
40 lint:
41         lint -abchx $(LIBSRCS)
42
43 ';
44     $r .= '
45 # This is a workaround, the problem is that our old GNU make exports
46 # variables into the environment so $(MYEXTLIB) is set in here to this
47 # value which can not be built.
48 sdbm/libsdbm.a:
49         $(NOECHO) $(NOOP)
50 ' unless $^O eq 'VMS';
51
52     return $r;
53 }