summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.com1
-rw-r--r--ext/Devel/PPPort/harness/Makefile.PL28
2 files changed, 22 insertions, 7 deletions
diff --git a/configure.com b/configure.com
index 28ba93b2e8..d8323ea544 100644
--- a/configure.com
+++ b/configure.com
@@ -2498,6 +2498,7 @@ $ IF F$EXTRACT(0,4,line) .EQS. "ext/" THEN -
xxx = F$EXTRACT(4,line_len - 16,line)
$ IF xxx .EQS. "DynaLoader" THEN goto ext_loop ! omit
$ IF xxx .EQS. "SDBM_File/sdbm" THEN goto ext_loop ! sub extension - omit
+$ IF xxx .EQS. "Devel/PPPort/harness" THEN goto ext_loop ! sub extension - omit
$ IF F$EXTRACT(0,8,line) .EQS. "vms/ext/" THEN -
xxx = "VMS/" + F$EXTRACT(8,line_len - 20,line)
$ known_extensions = known_extensions + " ''xxx'"
diff --git a/ext/Devel/PPPort/harness/Makefile.PL b/ext/Devel/PPPort/harness/Makefile.PL
index 13ba56df60..0059272fcd 100644
--- a/ext/Devel/PPPort/harness/Makefile.PL
+++ b/ext/Devel/PPPort/harness/Makefile.PL
@@ -14,17 +14,31 @@ WriteMakefile(
);
-sub MY::postamble {<<'EOM'};
+sub MY::postamble {
+
+ use File::Spec;
+
+ my $libdir = File::Spec->catdir(File::Spec->updir(), File::Spec->updir(),
+ File::Spec->updir(), File::Spec->updir(),
+ 'lib');
+ my $blibdir = File::Spec->catdir(File::Spec->curdir(), 'blib');
+ my $pmfile = File::Spec->catfile(File::Spec->updir(), 'PPPort.pm');
+ my $retval = <<'EOM';
sweep:
$(RM_F) pm_to_blib Harness.c Harness$(OBJ_EXT) module2$(OBJ_EXT) module3$(OBJ_EXT) ppport.h
- $(RM_RF) ./blib
+EOM
+
+ $retval .= "\t\$(RM_RF) $blibdir\n\n";
+ $retval .= "Harness.c : ppport.h\n\n";
+ $retval .= "module2.c module3.c : ppport.h\n\t\$(NOECHO) \$(NOOP)\n\n";
+ $retval .= "ppport.h: $pmfile\n";
-Harness.c module2.c module3.c : ppport.h
+ my $Ilibdir = $^O eq 'VMS' ? qq{"-I$libdir"} : qq{-I$libdir};
-ppport.h: ../PPPort.pm
- $(PERL) -I../../../../lib -e "require '../PPPort.pm'; Devel::PPPort::WriteFile('ppport.h')"
-
-EOM
+ $retval .= qq[\t\$(PERL) $Ilibdir -e "require qq{$pmfile}; Devel::PPPort::WriteFile(qq{ppport.h})"];
+
+ return $retval;
+}
sub MY::install { "install ::\n" };