qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: qemu-devel@nongnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>,
	Fabiano Rosas <farosas@suse.de>, John Snow <jsnow@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: [PATCH] build: Re-introduce an 'info' target to build a Texinfo manual.
Date: Sun, 17 Mar 2024 23:03:24 -0400	[thread overview]
Message-ID: <20240318030437.17503-1-maxim.cournoyer@gmail.com> (raw)

This reinstates
<https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg09228.html>,
which was committed at some point but reverted many years later in
cleanups that followed the migration from Texinfo sources to the
ReStructuredText (RST) format.  It's still nice to leave the option for
users to easily generate a QEMU manual in the Texinfo format, taking
advantage of the Sphinx texinfo backend.

The Texinfo format is structured and info readers provide advanced
navigation capabilities such as jumping to indexed topics or nodes and
is usable even in environments lacking a graphical session.

* docs/meson.build (texi, info): New targets.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---

 docs/meson.build | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/docs/meson.build b/docs/meson.build
index 9040f860ae..2ae7886fcb 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -98,4 +98,26 @@ if build_docs
   alias_target('sphinxdocs', sphinxdocs)
   alias_target('html', sphinxdocs)
   alias_target('man', sphinxmans)
+
+  # Add a target to build and install a Texinfo version of the QEMU
+  # manual, if 'makeinfo' is available.
+  makeinfo = find_program(['texi2any', 'makeinfo'])
+  if makeinfo.found()
+    sphinxtexi = custom_target(
+      'qemu.texi',
+      output: ['qemu.texi', 'sphinxtexi.stamp'],
+      depfile: 'sphinxtexi.d',
+      command: [SPHINX_ARGS, '-Ddepfile=@DEPFILE@',
+               '-Ddepfile_stamp=@OUTPUT1@', '-b', 'texinfo',
+               '-d', private_dir, input_dir, meson.current_build_dir()])
+    sphinxinfo = custom_target(
+      'qemu.info',
+      input: sphinxtexi,
+      output: 'qemu.info',
+      install: true,
+      install_dir: get_option('infodir'),
+      command: [makeinfo, '--no-split', '--output=@OUTPUT@', '@INPUT0@'])
+    alias_target('texi', sphinxtexi)
+    alias_target('info', sphinxinfo)
+  endif
 endif

base-commit: ba49d760eb04630e7b15f423ebecf6c871b8f77b
-- 
2.41.0



             reply	other threads:[~2024-03-18  3:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18  3:03 Maxim Cournoyer [this message]
2024-03-19 11:47 ` [PATCH] build: Re-introduce an 'info' target to build a Texinfo manual Peter Maydell
2024-03-19 12:07   ` Daniel P. Berrangé
2024-03-22 20:56     ` Maxim Cournoyer
2024-03-22 20:18   ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240318030437.17503-1-maxim.cournoyer@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=farosas@suse.de \
    --cc=jsnow@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).