]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
docs: Introduce documentation build option
authorDaniel Wagner <dwagner@suse.de>
Tue, 8 Feb 2022 15:37:41 +0000 (16:37 +0100)
committerDaniel Wagner <dwagner@suse.de>
Tue, 8 Feb 2022 15:45:23 +0000 (16:45 +0100)
Build the documentation only if explicitly asked to build it. If not
fallback to install the precompiled versions.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Documentation/meson.build
meson_options.txt

index fd10a7c368a21847fe31583c996bcce0ee4031c0..5dbb0b2af3568958ab421fccc1f0e84ad16cef65 100644 (file)
@@ -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
index 8ff0c2882a2c58f7cf962abe47cf5664cc8b1bf1..76e512aa9a271363b8e5c8e6d0ee4d9a021dac77 100644 (file)
@@ -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')