[asperl] integrate mainline changes
[p5sagit/p5-mst-13.2.git] / ext / SDBM_File / Makefile.PL
1 use ExtUtils::MakeMaker;
2
3 # The existence of the ./sdbm/Makefile.PL file causes MakeMaker
4 # to automatically include Makefile code for the targets
5 #       config, all, clean, realclean and sdbm/Makefile
6 # which perform the corresponding actions in the subdirectory.
7
8 $define = ($^O eq 'MSWin32') ? '-DMSDOS' : '';
9 if ($^O eq 'MSWin32') {
10   $myextlib = 'sdbm\\libsdbm$(LIB_EXT)';
11 } elsif ($^O eq 'VMS') {
12   $myextlib = 'sdbm/libsdbm$(LIB_EXT)';
13 } else {
14   $myextlib = 'sdbm/libsdbm$(LIB_EXT)';  
15 }
16
17 WriteMakefile(
18               NAME      => 'SDBM_File',
19               MYEXTLIB => $myextlib,
20               MAN3PODS  => ' ',         # Pods will be built by installman.
21               XSPROTOARG => '-noprototypes',            # XXX remove later?
22               VERSION_FROM => 'SDBM_File.pm',
23               DEFINE => $define,
24 #              NORECURS => $^O eq 'VMS',
25 #              SKIP => $^O eq 'VMS' ? 'subdirs' : '', # Don't do the subdirs section for VMS
26              );
27
28 sub MY::postamble {
29   if ($^O ne 'VMS') {
30     '
31 $(MYEXTLIB): sdbm/Makefile
32         cd sdbm && $(MAKE) all
33 ';
34   } else {
35   '   
36 $(MYEXTLIB): [.sdbm]descrip.mms
37         set def [.sdbm]
38     $(MMS) all
39     set def [-]
40 ';  
41   }
42 }