]> granicus.if.org Git - fortune-mod/commitdiff
appveyor fix #1: better windows/etc. compat
authorShlomi Fish <shlomif@shlomifish.org>
Mon, 24 Aug 2020 16:07:36 +0000 (19:07 +0300)
committerShlomi Fish <shlomif@shlomifish.org>
Mon, 24 Aug 2020 16:07:36 +0000 (19:07 +0300)
fortune-mod/CMakeLists.txt
fortune-mod/util/fortmod_gen_manpage.pl [new file with mode: 0644]

index f1908273fa9c2691f2da50f006b9edeb44c5fc22..d4ec69af402ca5c4dc25db7b294465d2eed48924 100644 (file)
@@ -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 (file)
index 0000000..80e20db
--- /dev/null
@@ -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();