aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorYonggang Luo <luoyonggang@gmail.com>2020-10-16 06:06:25 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2020-10-17 10:45:53 -0400
commite36676604683c1ee12963d83eaaf3d3c2a1790ce (patch)
treeef82c6d7c3f7a7471dcaad603cea6cb5a73ab866 /meson.build
parent9dc6ee3fd78a478935eecf936cddd575c6dfb20a (diff)
meson: Move the detection logic for sphinx to meson
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Message-Id: <20201015220626.418-4-luoyonggang@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build30
1 files changed, 10 insertions, 20 deletions
diff --git a/meson.build b/meson.build
index 15732f4701..05fb59a00b 100644
--- a/meson.build
+++ b/meson.build
@@ -17,7 +17,13 @@ cc = meson.get_compiler('c')
config_host = keyval.load(meson.current_build_dir() / 'config-host.mak')
enable_modules = 'CONFIG_MODULES' in config_host
enable_static = 'CONFIG_STATIC' in config_host
-build_docs = 'BUILD_DOCS' in config_host
+
+# Temporary directory used for files created while
+# configure runs. Since it is in the build directory
+# we can safely blow away any previous version of it
+# (and we need not jump through hoops to try to delete
+# it when configure exits.)
+tmpdir = meson.current_build_dir() / 'meson-private/temp'
if get_option('qemu_suffix').startswith('/')
error('qemu_suffix cannot start with a /')
@@ -1266,22 +1272,6 @@ foreach d : hx_headers
endforeach
genh += hxdep
-SPHINX_ARGS = [config_host['SPHINX_BUILD'],
- '-Dversion=' + meson.project_version(),
- '-Drelease=' + config_host['PKGVERSION']]
-
-if get_option('werror')
- SPHINX_ARGS += [ '-W' ]
-endif
-
-sphinx_extn_depends = [ meson.source_root() / 'docs/sphinx/depfile.py',
- meson.source_root() / 'docs/sphinx/hxtool.py',
- meson.source_root() / 'docs/sphinx/kerneldoc.py',
- meson.source_root() / 'docs/sphinx/kernellog.py',
- meson.source_root() / 'docs/sphinx/qapidoc.py',
- meson.source_root() / 'docs/sphinx/qmp_lexer.py',
- qapi_gen_depends ]
-
###################
# Collect sources #
###################
@@ -1866,8 +1856,8 @@ endif
subdir('scripts')
subdir('tools')
subdir('pc-bios')
-subdir('tests')
subdir('docs')
+subdir('tests')
if 'CONFIG_GTK' in config_host
subdir('po')
endif
@@ -1949,7 +1939,7 @@ summary_info += {'QEMU_CFLAGS': config_host['QEMU_CFLAGS']}
summary_info += {'QEMU_LDFLAGS': config_host['QEMU_LDFLAGS']}
summary_info += {'make': config_host['MAKE']}
summary_info += {'python': '@0@ (version: @1@)'.format(python.full_path(), python.language_version())}
-summary_info += {'sphinx-build': config_host['SPHINX_BUILD']}
+summary_info += {'sphinx-build': sphinx_build.found()}
summary_info += {'genisoimage': config_host['GENISOIMAGE']}
# TODO: add back version
summary_info += {'slirp support': slirp_opt == 'disabled' ? false : slirp_opt}
@@ -2017,7 +2007,7 @@ if config_host.has_key('CONFIG_XEN_BACKEND')
summary_info += {'xen ctrl version': config_host['CONFIG_XEN_CTRL_INTERFACE_VERSION']}
endif
summary_info += {'brlapi support': config_host.has_key('CONFIG_BRLAPI')}
-summary_info += {'Documentation': config_host.has_key('BUILD_DOCS')}
+summary_info += {'Documentation': build_docs}
summary_info += {'PIE': get_option('b_pie')}
summary_info += {'vde support': config_host.has_key('CONFIG_VDE')}
summary_info += {'netmap support': config_host.has_key('CONFIG_NETMAP')}