From: Daniel Wagner Date: Tue, 8 Feb 2022 15:37:41 +0000 (+0100) Subject: docs: Introduce documentation build option X-Git-Tag: v2.0-rc3~7^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=050103a8e4766f125451431cb3224a27b1620448;p=users%2Fsagi%2Fnvme-cli.git docs: Introduce documentation build option Build the documentation only if explicitly asked to build it. If not fallback to install the precompiled versions. Signed-off-by: Daniel Wagner --- diff --git a/Documentation/meson.build b/Documentation/meson.build index fd10a7c3..5dbb0b2a 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -151,12 +151,13 @@ adoc_sources = [ ] want_docs = get_option('docs') +want_docs_build = get_option('docs-build') if want_docs != 'false' mandir = join_paths(get_option('mandir'), 'man1') htmldir = join_paths(get_option('htmldir'), 'nvme') asciidoctor = find_program('asciidoc', required : false) - if asciidoctor.found() + if want_docs_build and asciidoctor.found() # Build documentation before installing # man pages diff --git a/meson_options.txt b/meson_options.txt index 8ff0c288..76e512aa 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -4,3 +4,4 @@ option('systemddir', type : 'string', value : 'lib/systemd/', description : 'dir option('htmldir', type : 'string', value : '', description : 'directory for HTML documentation') option('docs', type : 'combo', choices : ['false', 'html', 'man', 'all'], description : 'install documentation') +option('docs-build', type : 'boolean', value : 'false', description : 'build documentation')