[libvirt PATCH 14/15] meson: add docs option to enable/disable generating documentation

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

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 libvirt.spec.in   | 1 +
 meson.build       | 6 +++++-
 meson_options.txt | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 7c4ccaa659..ef70e4dd29 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1184,6 +1184,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec)
            %{?enable_werror} \
            -Dexpensive_tests=enabled \
            -Dinit_script=systemd \
+           -Ddocs=enabled \
            %{?arg_login_shell}
 
 %meson_build
diff --git a/meson.build b/meson.build
index d53909948e..f44cb4424a 100644
--- a/meson.build
+++ b/meson.build
@@ -2211,7 +2211,10 @@ subdir('examples')
 
 subdir('po')
 
-subdir('docs')
+gen_docs = not get_option('docs').disabled()
+if gen_docs
+  subdir('docs')
+endif
 
 subdir('build-aux')
 
@@ -2436,6 +2439,7 @@ endif
 misc_summary = {
   'Use -Werror': cc_flags.contains('-Werror'),
   'Warning Flags': supported_cc_flags,
+  'docs': gen_docs,
   'DTrace': conf.has('WITH_DTRACE_PROBES'),
   'firewalld': conf.has('WITH_FIREWALLD'),
   'firewalld-zone': conf.has('WITH_FIREWALLD_ZONE'),
diff --git a/meson_options.txt b/meson_options.txt
index 452fdab4d0..3c6d6a03c5 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -7,6 +7,7 @@ option('expensive_tests', type: 'feature', value: 'auto', description: 'set the
 option('test_coverage', type: 'boolean', value: false, description: 'turn on code coverage instrumentation')
 option('git_werror', type: 'feature', value: 'auto', description: 'use -Werror if building from GIT')
 option('rpath', type: 'feature', value: 'auto', description: 'whether to include rpath information in installed binaries and libraries')
+option('docs', type: 'feature', value: 'auto', description: 'whether to generate documentation')
 
 
 # build dependencies options
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux