Integrate mainline (for ndbm fixes etc.)
[p5sagit/p5-mst-13.2.git] / ext / SDBM_File / sdbm / Makefile.PL
index 7008e6d..6de7bd0 100644 (file)
@@ -1,6 +1,6 @@
 use ExtUtils::MakeMaker;
 
-$define = '-DSDBM -DDUFF';
+my $define = '-DSDBM -DDUFF';
 $define .= ' -DWIN32 -DPERL_STATIC_SYMS' if ($^O eq 'MSWin32');
 
 if ($^O eq 'VMS') {  # Old VAXC compiler can't handle Duff's device
@@ -21,19 +21,35 @@ WriteMakefile(
     C         => [qw(sdbm.c pair.c hash.c)]
 );
 
+sub MY::constants {
+  package MY;
+  my $r = shift->SUPER::constants();
+  if ($^O eq 'VMS') {
+    $r =~ s/^INST_STATIC =.*$/INST_STATIC = libsdbm\$(LIB_EXT)/m
+  }
+  return $r;
+}
+
 sub MY::post_constants {
+  package MY;
+  if ($^O eq 'VMS') {
+    shift->SUPER::post_constants();
+  } else {
 '
 INST_STATIC = libsdbm$(LIB_EXT)
 '
+  }
 }
 
 sub MY::top_targets {
+    my $noecho = shift->{NOECHO};
+    
     my $r = '
 all :: static
-       $(NOECHO) $(NOOP)
+       ' . $noecho . '$(NOOP)
 
 config ::
-       $(NOECHO) $(NOOP)
+       ' . $noecho . '$(NOOP)
 
 lint:
        lint -abchx $(LIBSRCS)
@@ -44,7 +60,7 @@ lint:
 # variables into the environment so $(MYEXTLIB) is set in here to this
 # value which can not be built.
 sdbm/libsdbm.a:
-       $(NOECHO) $(NOOP)
+       ' . $noecho . '$(NOOP)
 ' unless $^O eq 'VMS';
 
     return $r;