[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/24] meson: pass docdir option
From: |
Paolo Bonzini |
Subject: |
[PULL 16/24] meson: pass docdir option |
Date: |
Tue, 1 Sep 2020 05:11:24 -0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
When cross-compiling, by default qemu_docdir is 'c:\Program Files\QEMU\'
which is not recognized as being an absolute path, and meson will end up
adding the prefix again.
Add an option to pass docdir location to meson, pre-prefixed like we do
with other directories, build qemu_docdir with the common suffix and use
that instead of config_host['qemu_docdir'].
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20200826110419.528931-7-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 2 +-
docs/meson.build | 4 ++--
meson.build | 4 +++-
meson_options.txt | 2 ++
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
index 78aae9c2a0..1f478a46a9 100755
--- a/configure
+++ b/configure
@@ -6653,7 +6653,6 @@ echo "sysconfdir=$sysconfdir" >> $config_host_mak
echo "qemu_confdir=$qemu_confdir" >> $config_host_mak
echo "qemu_datadir=$qemu_datadir" >> $config_host_mak
echo "qemu_firmwarepath=$firmwarepath" >> $config_host_mak
-echo "qemu_docdir=$qemu_docdir" >> $config_host_mak
echo "qemu_moddir=$qemu_moddir" >> $config_host_mak
if test "$mingw32" = "no" ; then
echo "qemu_localstatedir=$local_statedir" >> $config_host_mak
@@ -8198,6 +8197,7 @@ NINJA=${ninja:-$PWD/ninjatool} $meson setup \
--mandir "${pre_prefix}$mandir" \
--sysconfdir "${pre_prefix}$sysconfdir" \
--localstatedir "${pre_prefix}$local_statedir" \
+ -Ddocdir="${pre_prefix}$docdir" \
-Dqemu_suffix="$qemu_suffix" \
-Doptimization=$(if test "$debug" = yes; then echo 0; else echo 2; fi)
\
-Ddebug=$(if test "$debug_info" = yes; then echo true; else echo
false; fi) \
diff --git a/docs/meson.build b/docs/meson.build
index 8b059a8e39..50f367349b 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -10,7 +10,7 @@ if build_docs
configure_file(output: 'index.html',
input: files('index.html.in'),
configuration: {'VERSION': meson.project_version()},
- install_dir: config_host['qemu_docdir'])
+ install_dir: qemu_docdir)
manuals = [ 'devel', 'interop', 'tools', 'specs', 'system', 'user' ]
man_pages = {
'interop' : {
@@ -48,7 +48,7 @@ if build_docs
input_dir, output_dir])
sphinxdocs += this_manual
if build_docs and manual != 'devel'
- install_subdir(output_dir, install_dir: config_host['qemu_docdir'])
+ install_subdir(output_dir, install_dir: qemu_docdir)
endif
these_man_pages = []
diff --git a/meson.build b/meson.build
index bf6d1b3153..43e2c6e43d 100644
--- a/meson.build
+++ b/meson.build
@@ -19,6 +19,7 @@ enable_modules = 'CONFIG_MODULES' in config_host
enable_static = 'CONFIG_STATIC' in config_host
build_docs = 'BUILD_DOCS' in config_host
qemu_datadir = get_option('datadir') / get_option('qemu_suffix')
+qemu_docdir = get_option('docdir') / get_option('qemu_suffix')
config_host_data = configuration_data()
genh = []
@@ -1182,7 +1183,7 @@ if build_docs
input: input,
output: output,
install: true,
- install_dir: config_host['qemu_docdir'] / 'interop',
+ install_dir: qemu_docdir / 'interop',
command: cmd + args)
endforeach
alias_target(ext, t)
@@ -1245,6 +1246,7 @@ if targetos != 'windows'
else
summary_info += {'local state directory': 'queried at runtime'}
endif
+summary_info += {'Doc directory': get_option('docdir')}
summary_info += {'Build directory': meson.current_build_dir()}
summary_info += {'Source path': meson.current_source_dir()}
summary_info += {'GIT binary': config_host['GIT']}
diff --git a/meson_options.txt b/meson_options.txt
index f4275691bd..c3120fa359 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,5 +1,7 @@
option('qemu_suffix', type : 'string', value: 'qemu',
description: 'Suffix for QEMU data/modules/config directories (can be
empty)')
+option('docdir', type : 'string', value : 'doc',
+ description: 'Base directory for documentation installation (can be
empty)')
option('gettext', type : 'boolean', value : true)
option('sdl', type : 'feature', value : 'auto')
option('sdl_image', type : 'feature', value : 'auto')
--
2.26.2
- [PULL 06/24] meson: install icons, (continued)
- [PULL 06/24] meson: install icons, Paolo Bonzini, 2020/09/01
- [PULL 09/24] build-sys: remove install target from Makefile, Paolo Bonzini, 2020/09/01
- [PULL 08/24] meson: install $localstatedir/run for qga, Paolo Bonzini, 2020/09/01
- [PULL 11/24] configure: rename confsuffix option, Paolo Bonzini, 2020/09/01
- [PULL 07/24] meson: install desktop file, Paolo Bonzini, 2020/09/01
- [PULL 10/24] meson: move zlib detection to meson, Paolo Bonzini, 2020/09/01
- [PULL 12/24] configure: always /-seperate directory from qemu_suffix, Paolo Bonzini, 2020/09/01
- [PULL 14/24] meson: pass qemu_suffix option, Paolo Bonzini, 2020/09/01
- [PULL 13/24] configure: build docdir like other suffixed directories, Paolo Bonzini, 2020/09/01
- [PULL 17/24] meson: use meson mandir instead of qemu_mandir, Paolo Bonzini, 2020/09/01
- [PULL 16/24] meson: pass docdir option,
Paolo Bonzini <=
- [PULL 19/24] meson: add pixman dependency to chardev/baum module, Paolo Bonzini, 2020/09/01
- [PULL 21/24] configure: do not include ${prefix} in firmwarepath, Paolo Bonzini, 2020/09/01
- [PULL 24/24] meson: add description to options, Paolo Bonzini, 2020/09/01
- [PULL 20/24] meson: add pixman dependency to UI modules, Paolo Bonzini, 2020/09/01
- [PULL 22/24] meson: use pkg-config method to find dependencies, Paolo Bonzini, 2020/09/01
- [PULL 15/24] meson: use meson datadir instead of qemu_datadir, Paolo Bonzini, 2020/09/01
- [PULL 23/24] build: fix recurse-all target, Paolo Bonzini, 2020/09/01
- [PULL 18/24] meson: add NSIS building, Paolo Bonzini, 2020/09/01
- Re: [PULL 00/24] Meson changes for 2020-09-01, Peter Maydell, 2020/09/01