]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: add docs option to enable/disable generating documentation
authorPavel Hrdina <phrdina@redhat.com>
Thu, 8 Oct 2020 12:39:38 +0000 (14:39 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Fri, 9 Oct 2020 11:44:54 +0000 (13:44 +0200)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
libvirt.spec.in
meson.build
meson_options.txt

index cf6c95159318a2f8240ee2ebbcc99ccbf7937ba1..440704936b4abf8247e9e8ef677d320bc26d40ad 100644 (file)
@@ -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
index f5b108c050c04532a4c37a818b918cd9e8099c3a..a4aac2f9db08903d269303a171770884e3e1f9e3 100644 (file)
@@ -2203,7 +2203,10 @@ subdir('examples')
 
 subdir('po')
 
-subdir('docs')
+gen_docs = not get_option('docs').disabled()
+if gen_docs
+  subdir('docs')
+endif
 
 subdir('build-aux')
 
@@ -2428,6 +2431,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'),
index b3f4d7744fcb44cb9f0b06476ede424982ccc02a..52b6e31d160c47cc195cf62daa45a7019d9622c2 100644 (file)
@@ -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