Skip to content

Commit

Permalink
Fix util/mkpod2html.pl to call pod2html with absolute paths
Browse files Browse the repository at this point in the history
It turns out that on VMS, pod2html only recognises VMS directory
specifications if they contain a device name, which is accomplished by
making them absolute.  Otherwise, a VMS build that includes building
the document HTML files ends up with an error like this:

    $ perl [---.downloads.openssl-3_0-snap-20210916.util]mkpod2html.pl -i [---.downloads.openssl-3_0-snap-20210916.doc.man1]CA.pl.pod -o [.DOC.HTML.MAN1]CA.PL.HTML -t "CA.pl" -r "[---.downloads.openssl-3_0-snap-20210916.doc]"
    [---.downloads.openssl-3_0-snap-20210916.util]mkpod2html.pl: error changing to directory -/-/-/downloads/openssl-3_0-snap-20210916/doc/: no such file or directory
    %SYSTEM-F-ABORT, abort

Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#16626)
  • Loading branch information
levitte committed Sep 21, 2021
1 parent 08d8c2d commit dc18f03
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions util/mkpod2html.pl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use lib ".";
use Getopt::Std;
use Pod::Html;
use File::Spec::Functions qw(:DEFAULT rel2abs);

# Options.
our($opt_i); # -i INFILE
Expand All @@ -25,6 +26,14 @@
die "-t flag missing" unless $opt_t;
die "-r flag missing" unless $opt_r;

# We originally used realpath() here, but the Windows implementation appears
# to require that the directory or file exist to be able to process the input,
# so we use rel2abs() instead, which only processes the string without
# looking further.
$opt_i = rel2abs($opt_i) or die "Can't convert to real path: $!";
$opt_o = rel2abs($opt_o) or die "Can't convert to real path: $!";
$opt_r = rel2abs($opt_r) or die "Can't convert to real path: $!";

pod2html
"--infile=$opt_i",
"--outfile=$opt_o",
Expand Down

0 comments on commit dc18f03

Please sign in to comment.