Re: [PATCH] Storable stand alone tests
[p5sagit/p5-mst-13.2.git] / ext / B / Makefile.PL
index dcff65a..d39d3b5 100644 (file)
@@ -1,5 +1,6 @@
 use ExtUtils::MakeMaker;
 use Config;
+use File::Spec;
 
 my $e = $Config{'exe_ext'};
 my $o = $Config{'obj_ext'};
@@ -14,23 +15,34 @@ if ($^O eq 'MSWin32') {
 }
 
 WriteMakefile(
-    NAME       => "B",
-    VERSION    => "a5",
-    PL_FILES   => { 'defsubs_h.PL' => 'defsubs.h' },
-    MAN3PODS   => {},
-    clean      => {
-       FILES           => "perl$e *$o B.c defsubs.h *~"
+    NAME           => "B",
+    VERSION_FROM    => "B.pm",
+    PL_FILES       => { 'defsubs_h.PL' => 'defsubs.h' },
+    MAN3PODS       => {},
+    clean          => {
+       FILES       => "perl$e *$o B.c defsubs.h *~"
     }
-);   
+);
 
 package MY;
 
 sub post_constants {
-    "\nLIBS = $Config{libs}\n"
+    "\nLIBS = $Config::Config{libs}\n"
 }    
 
-sub postamble {
-'
-B$(OBJ_EXT) : defsubs.h 
-'
+sub upupfile {
+    File::Spec->catfile(File::Spec->updir,
+                       File::Spec->updir, $_[0]);
+}
+
+sub MY::postamble {
+    my $op_h   = upupfile('op.h');
+    my $cop_h  = upupfile('cop.h');
+    my $noecho = shift->{NOECHO};
+"
+B\$(OBJ_EXT) : defsubs.h              
+
+defsubs.h :: $op_h $cop_h                     
+       $noecho \$(NOOP)
+" 
 }