Skip to content

Commit

Permalink
more robust docmake detect+invoke
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomif committed Dec 17, 2024
1 parent 5608c4c commit 95bbd5d
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions fortune-mod/util/FortuneMod/ManPage/Generate/App.pm
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,29 @@ sub run
{
$ENV{PATH} = $path_prefix . $ENV{PATH};
}
__PACKAGE__->do_system(
{
cmd => [
"docmake",
"manpages",
"${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/${basename}.docbook5.xml",
],
},
my @args = (
"manpages",
"${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/${basename}.docbook5.xml",
);
eval {
require App::Docmake;
local @ARGV = @args;
if ( App::Docmake->new( { argv => [@ARGV] } )->run() )
{
warn "could not invoke App::Docmake :: run() properly";
die;
}
};
my $Err = $@;
if ($Err)
{
warn "App::Docmake from CPAN malfunctioned. $@";
__PACKAGE__->do_system(
{
cmd => [ "docmake", @args, ],
},
);
}
}

path("${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/${dest_basename}.man")
Expand Down

0 comments on commit 95bbd5d

Please sign in to comment.