Be portable.
[p5sagit/p5-mst-13.2.git] / ext / B / Makefile.PL
index 74053e6..4bf226d 100644 (file)
@@ -1,5 +1,6 @@
 use ExtUtils::MakeMaker;
 use Config;
+use File::Spec;
 
 my $e = $Config{'exe_ext'};
 my $o = $Config{'obj_ext'};
@@ -29,10 +30,17 @@ sub post_constants {
     "\nLIBS = $Config::Config{libs}\n"
 }    
 
+sub upupfile {
+    File::Spec->catfile(File::Spec->updir,
+                       File::Spec->updir, $_[0]);
+}
+
 sub postamble {
-'
-B$(OBJ_EXT) : defsubs.h 
+    my $op_h  = upupfile('op.h');
+    my $cop_h = upupfile('cop.h');
+"
+B\$(OBJ_EXT) : defsubs.h 
 
-defsubs.h :: ../../op.h ../../cop.h
-'
+defsubs.h :: $op_h $cop_h
+"
 }