MM hackery and whitespace changes
authorMichael G. Schwern <schwern@pobox.com>
Mon, 31 Mar 2003 15:16:57 +0000 (07:16 -0800)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 1 Apr 2003 16:06:12 +0000 (16:06 +0000)
Message-ID: <20030331231657.GJ17529@windhund.schwern.org>

p4raw-id: //depot/perl@19116

ext/SDBM_File/sdbm/Makefile.PL

index 6de7bd0..2e576da 100644 (file)
@@ -22,34 +22,21 @@ WriteMakefile(
 );
 
 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;
-}
+    package MY;
+    my $self = shift;
+
+    $self->{INST_STATIC} = 'libsdbm$(LIB_EXT)';
 
-sub MY::post_constants {
-  package MY;
-  if ($^O eq 'VMS') {
-    shift->SUPER::post_constants();
-  } else {
-'
-INST_STATIC = libsdbm$(LIB_EXT)
-'
-  }
+    return $self->SUPER::constants();
 }
 
 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)
@@ -60,7 +47,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;