qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] build: Re-introduce an 'info' target to build a Texinfo manual.
@ 2024-03-18  3:03 Maxim Cournoyer
  2024-03-19 11:47 ` Peter Maydell
  0 siblings, 1 reply; 5+ messages in thread
From: Maxim Cournoyer @ 2024-03-18  3:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: Maxim Cournoyer, Fabiano Rosas, John Snow, Paolo Bonzini

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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-22 20:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-18  3:03 [PATCH] build: Re-introduce an 'info' target to build a Texinfo manual Maxim Cournoyer
2024-03-19 11:47 ` Peter Maydell
2024-03-19 12:07   ` Daniel P. Berrangé
2024-03-22 20:56     ` Maxim Cournoyer
2024-03-22 20:18   ` Maxim Cournoyer

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).