correct bugs exposed in MM_Unix.pm by commenting out Selfloader
[p5sagit/p5-mst-13.2.git] / ext / SDBM_File / Makefile.PL
index 8fc9411..7494785 100644 (file)
@@ -5,19 +5,31 @@ use ExtUtils::MakeMaker;
 #      config, all, clean, realclean and sdbm/Makefile
 # which perform the corresponding actions in the subdirectory.
 
-WriteMakefile(
-    NAME       => 'SDBM_File',
-    MYEXTLIB => 'sdbm/libsdbm$(LIB_EXT)',
-    MAN3PODS   => ' ',         # Pods will be built by installman.
-    XSPROTOARG => '-noprototypes',             # XXX remove later?
-    VERSION_FROM => 'SDBM_File.pm',
-);
+$define = ($^O eq 'MSWin32') ? '-DMSDOS' : '';
+if ($^O eq 'MSWin32') { $myextlib = 'sdbm\\libsdbm$(LIB_EXT)'; }
+else                  { $myextlib = 'sdbm/libsdbm$(LIB_EXT)';  }
 
+WriteMakefile(
+              NAME     => 'SDBM_File',
+              MYEXTLIB => $myextlib,
+              MAN3PODS         => {},  # Pods will be built by installman.
+              XSPROTOARG => '-noprototypes',           # XXX remove later?
+              VERSION_FROM => 'SDBM_File.pm',
+              DEFINE => $define,
+             );
 
 sub MY::postamble {
+  if ($^O ne 'VMS') {
     '
 $(MYEXTLIB): sdbm/Makefile
-       cd sdbm; $(MAKE) all
+       cd sdbm && $(MAKE) all
 ';
+  } else {
+  '   
+$(MYEXTLIB) : [.sdbm]descrip.mms
+       set def [.sdbm]
+    $(MMS) all
+    set def [-]
+';  
+  }
 }
-