From c29d4d4ab7efdf2fb25fea10ab94935d4f538385 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Tue, 21 Nov 2023 18:04:48 +0200 Subject: [PATCH] meson.build: make pandoc optional Skip only pandoc-requiring parts if it is not available. --- doc/meson.build | 2 +- meson.build | 11 +++++++---- meson_options.txt | 4 ++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/doc/meson.build b/doc/meson.build index 46eb2fb82..efe63308b 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -172,7 +172,7 @@ html_target = custom_target('pipewire-docs', install_dir: docdir) -if generate_module_manpages +if generate_extra_manpages module_man_rst_py = meson.project_source_root() / 'doc' / 'module-man-rst.py' module_man_defines = [] foreach m : manpage_conf.keys() diff --git a/meson.build b/meson.build index f99383230..6f5d58971 100644 --- a/meson.build +++ b/meson.build @@ -502,17 +502,20 @@ subdir('man') doxygen = find_program('doxygen', required : get_option('docs')) pymod = import('python') python = pymod.find_installation('python3', required: get_option('docs')) + +generate_extra_manpages = false + if doxygen.found() and python.found() - generate_module_manpages = get_option('docs').enabled() and get_option('man').enabled() if generate_manpages - pandoc = find_program('pandoc', required: generate_module_manpages) - generate_module_manpages = pandoc.found() + pandoc = find_program('pandoc', required: get_option('man-extra')) + generate_extra_manpages = pandoc.found() endif - summary({'Module manpage generation': generate_module_manpages}, bool_yn: true) subdir('doc') endif +summary({'Extra manpage generation': generate_extra_manpages}, bool_yn: true) + setenv = find_program('pw-uninstalled.sh') run_target('pw-uninstalled', command : [setenv, diff --git a/meson_options.txt b/meson_options.txt index 3344b6244..38ba24020 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -13,6 +13,10 @@ option('man', description: 'Build manpages', type: 'feature', value: 'auto') +option('man-extra', + description: 'Build extra manpages', + type: 'feature', + value: 'auto') option('tests', description: 'Build tests', type: 'feature',