From: Ross Burton <ross.burton@xxxxxxx> Building the documentation shouldn't be mandatory, as it needs asciidoc and xmlto. Add a "docs" option, defaulting to true, to control whether the documentation should be built. Signed-off-by: Ross Burton <ross.burton@xxxxxxx> --- meson.build | 15 +++++++++------ meson_options.txt | 4 ++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index b61c873..506b0e8 100644 --- a/meson.build +++ b/meson.build @@ -45,10 +45,13 @@ if cunit_dep.found() subdir('utest') endif subdir('samples') -subdir('Documentation') -custom_target( - 'docs', - output: 'docs', - depends: [html, man], - command: ['echo']) +if get_option('docs') + subdir('Documentation') + + custom_target( + 'docs', + output: 'docs', + depends: [html, man], + command: ['echo']) +endif diff --git a/meson_options.txt b/meson_options.txt index b2294f6..0611216 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -4,6 +4,10 @@ option('plugindir', type : 'string', description : 'set the plugin dir') + +option('docs', type : 'boolean', value: true, + description : 'build documentation') + option('htmldir', type : 'string', value : 'share/doc/libtraceevent-doc', description : 'directory for HTML documentation') option('asciidoctor', type : 'boolean', value: false, -- 2.34.1