mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-17 20:27:36 -05:00
8515a506ca
The makeinfo command splits the generated info output in multiple files (in 300 KiB chunks) by default; this meant the build system would have had to install the multiple QEMU.info-1, QEMU.info-2, etc. files for the info manual to work as intended. Instead, keep the info manual as one single file by specifying the --no-split option to makeinfo. * gnu/packages/patches/qemu-build-info-manual.patch (sphinxinfo) <makeinfo>: Invoke with the --no-split argument.
120 lines
4.5 KiB
Diff
120 lines
4.5 KiB
Diff
From 2793f47c066ed396b38893c10533202fceb1a05f Mon Sep 17 00:00:00 2001
|
|
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
|
Date: Thu, 17 Sep 2020 13:28:19 -0400
|
|
Subject: [PATCH] build: Build and install a Texinfo version of the manual.
|
|
|
|
Take advantage of the Sphinx texinfo backend to generate a QEMU info
|
|
manual. The Texinfo format allows for more structure and info readers
|
|
provide more advanced navigation capabilities compared to manpages
|
|
readers.
|
|
|
|
* configure (infodir): Add an --infodir option, which allows
|
|
configuring the directory under which the info manuals are installed.
|
|
* docs/meson.build (texi, info): New targets.
|
|
|
|
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
|
---
|
|
configure | 7 ++++++-
|
|
docs/meson.build | 21 +++++++++++++++++++++
|
|
meson.build | 2 ++
|
|
3 files changed, 29 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/configure b/configure
|
|
index 18c26e0389..d1ab2c19d1 100755
|
|
--- a/configure
|
|
+++ b/configure
|
|
@@ -948,6 +948,8 @@ for opt do
|
|
static="yes"
|
|
QEMU_PKG_CONFIG_FLAGS="--static $QEMU_PKG_CONFIG_FLAGS"
|
|
;;
|
|
+ --infodir=*) infodir="$optarg"
|
|
+ ;;
|
|
--mandir=*) mandir="$optarg"
|
|
;;
|
|
--bindir=*) bindir="$optarg"
|
|
@@ -975,7 +977,7 @@ for opt do
|
|
--host=*|--build=*|\
|
|
--disable-dependency-tracking|\
|
|
--sbindir=*|--sharedstatedir=*|\
|
|
- --oldincludedir=*|--datarootdir=*|--infodir=*|\
|
|
+ --oldincludedir=*|--datarootdir=*|\
|
|
--htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)
|
|
# These switches are silently ignored, for compatibility with
|
|
# autoconf-generated configure scripts. This allows QEMU's
|
|
@@ -1540,6 +1542,7 @@ includedir="${includedir:-$prefix/include}"
|
|
if test "$mingw32" = "yes" ; then
|
|
mandir="$prefix"
|
|
datadir="$prefix"
|
|
+ infodir="$prefix"
|
|
docdir="$prefix"
|
|
bindir="$prefix"
|
|
sysconfdir="$prefix"
|
|
@@ -1547,6 +1550,7 @@ if test "$mingw32" = "yes" ; then
|
|
else
|
|
mandir="${mandir:-$prefix/share/man}"
|
|
datadir="${datadir:-$prefix/share}"
|
|
+ infodir="${infodir:-$datadir/info}"
|
|
docdir="${docdir:-$prefix/share/doc}"
|
|
bindir="${bindir:-$prefix/bin}"
|
|
sysconfdir="${sysconfdir:-$prefix/etc}"
|
|
@@ -1683,6 +1687,7 @@ Advanced options (experts only):
|
|
--smbd=SMBD use specified smbd [$smbd]
|
|
--with-git=GIT use specified git [$git]
|
|
--static enable static build [$static]
|
|
+ --infodir=PATH install info manual in PATH
|
|
--mandir=PATH install man pages in PATH
|
|
--datadir=PATH install firmware in PATH/$qemu_suffix
|
|
--localedir=PATH install translation in PATH/$qemu_suffix
|
|
diff --git a/docs/meson.build b/docs/meson.build
|
|
index ebd85d59f9..1243839461 100644
|
|
--- a/docs/meson.build
|
|
+++ b/docs/meson.build
|
|
@@ -114,4 +114,25 @@ if build_docs
|
|
alias_target('sphinxdocs', sphinxdocs)
|
|
alias_target('html', sphinxdocs)
|
|
alias_target('man', sphinxmans)
|
|
+
|
|
+ # Generate a Texinfo version of the QEMU manual.
|
|
+ makeinfo = find_program(['texi2any', 'makeinfo'])
|
|
+ if makeinfo.found()
|
|
+ sphinxtexi = custom_target(
|
|
+ 'QEMU manual generated texinfo source',
|
|
+ output: ['QEMU.texi', 'sphinxtexi.stamp'],
|
|
+ depfile: 'sphinxtexi.d',
|
|
+ command: [SPHINX_ARGS, '-Ddepfile=@DEPFILE@',
|
|
+ '-Ddepfile_stamp=@OUTPUT1@', '-b', 'texinfo',
|
|
+ meson.current_source_dir(), meson.current_build_dir()])
|
|
+ sphinxinfo = custom_target(
|
|
+ 'QEMU info manual',
|
|
+ input: sphinxtexi,
|
|
+ output: 'QEMU.info',
|
|
+ install: true,
|
|
+ install_dir: get_option('infodir'),
|
|
+ command: [makeinfo, '--no-split', '@INPUT0@', '--output=@OUTPUT@'])
|
|
+ alias_target('texi', sphinxtexi)
|
|
+ alias_target('info', sphinxinfo)
|
|
+ endif
|
|
endif
|
|
diff --git a/meson.build b/meson.build
|
|
index e3386196ba..d64a125ad9 100644
|
|
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -32,6 +32,7 @@ endif
|
|
qemu_confdir = get_option('sysconfdir') / get_option('qemu_suffix')
|
|
qemu_datadir = get_option('datadir') / get_option('qemu_suffix')
|
|
qemu_docdir = get_option('docdir') / get_option('qemu_suffix')
|
|
+qemu_infodir = get_option('infodir') / get_option('qemu_suffix')
|
|
qemu_moddir = get_option('libdir') / get_option('qemu_suffix')
|
|
|
|
qemu_desktopdir = get_option('datadir') / 'applications'
|
|
@@ -1995,6 +1996,7 @@ else
|
|
summary_info += {'local state directory': 'queried at runtime'}
|
|
endif
|
|
summary_info += {'Doc directory': get_option('docdir')}
|
|
+summary_info += {'Info directory': get_option('infodir')}
|
|
summary_info += {'Build directory': meson.current_build_dir()}
|
|
summary_info += {'Source path': meson.current_source_dir()}
|
|
summary_info += {'GIT binary': config_host['GIT']}
|
|
--
|
|
2.30.1
|
|
|