From 5e56a6fdfd104e974f677275f44b1d7193772841 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Mon, 24 Aug 2020 19:07:36 +0300 Subject: [PATCH] appveyor fix #1: better windows/etc. compat --- fortune-mod/CMakeLists.txt | 6 ++++-- fortune-mod/util/fortmod_gen_manpage.pl | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 fortune-mod/util/fortmod_gen_manpage.pl diff --git a/fortune-mod/CMakeLists.txt b/fortune-mod/CMakeLists.txt index f190827..d4ec69a 100644 --- a/fortune-mod/CMakeLists.txt +++ b/fortune-mod/CMakeLists.txt @@ -221,7 +221,8 @@ MACRO(_fortune__generate_docbook basename offensive_flags) ) LIST(APPEND _my_man_pages_list "${_my_man_docbook}") - SET (_my_args "-I${CMAKE_CURRENT_SOURCE_DIR}/util" "-MFortuneMod_GenManPage_App" "-E" "FortuneMod_GenManPage_App-\\>run" "--" "--src-dir" "${CMAKE_CURRENT_SOURCE_DIR}" "--basename=${basename}" "--dest-basename=${_dest_basename}" "--out-section=6" "--out-basename=fortune" "--subdir=fortune") + SET (_util_dir "${CMAKE_CURRENT_SOURCE_DIR}/util") + SET (_my_args "-I${_util_dir}" "${_util_dir}/fortmod_gen_manpage.pl" "--src-dir" "${CMAKE_CURRENT_SOURCE_DIR}" "--basename=${basename}" "--dest-basename=${_dest_basename}" "--out-section=6" "--out-basename=fortune" "--subdir=fortune") ADD_CUSTOM_COMMAND( OUTPUT "${_my_man_page}" COMMAND "${PERL_EXECUTABLE}" @@ -240,7 +241,8 @@ MACRO(_fortune__generate_manpage basename) SET (_my_man_page_dir "${CMAKE_CURRENT_SOURCE_DIR}/util") SET (_my_man_page "${_my_man_page_dir}/${basename}.man") SET (_my_man_docbook "${_my_man_page_dir}/${basename}.docbook5.xml") - SET (_my_args "-I${CMAKE_CURRENT_SOURCE_DIR}/util" "-MFortuneMod_GenManPage_App" "-E" "FortuneMod_GenManPage_App-\\>run" "--" "--src-dir" "${CMAKE_CURRENT_SOURCE_DIR}" "--basename=${basename}") + SET (_util_dir "${CMAKE_CURRENT_SOURCE_DIR}/util") + SET (_my_args "-I${_util_dir}" "${_util_dir}/fortmod_gen_manpage.pl" "--src-dir" "${CMAKE_CURRENT_SOURCE_DIR}" "--basename=${basename}") ADD_CUSTOM_COMMAND( OUTPUT "${_my_man_page}" COMMAND "${PERL_EXECUTABLE}" diff --git a/fortune-mod/util/fortmod_gen_manpage.pl b/fortune-mod/util/fortmod_gen_manpage.pl new file mode 100644 index 0000000..80e20db --- /dev/null +++ b/fortune-mod/util/fortmod_gen_manpage.pl @@ -0,0 +1,18 @@ +#! /usr/bin/env perl +# +# Short description for fortmod_gen_manpage.pl +# +# Version 0.0.1 +# Copyright (C) 2020 Shlomi Fish < https://www.shlomifish.org/ > +# +# Licensed under the terms of the MIT license. + +use strict; +use warnings; +use 5.014; +use autodie; + +use Path::Tiny qw/ path tempdir tempfile cwd /; + +use FortuneMod_GenManPage_App (); +FortuneMod_GenManPage_App->run(); -- 2.40.0