[PATCH 1/3] meson: add option to disable documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux