Check for Texinfo utilities during configuration and if found,
generate and install documentation in Info format.
---
doc/build.rst | 3 +++
doc/meson.build | 7 +++++++
scripts/install-doc-info.sh | 8 ++++++++
scripts/make-doc.sh | 6 ++++++
4 files changed, 24 insertions(+)
create mode 100644 scripts/install-doc-info.sh
diff --git a/doc/build.rst b/doc/build.rst
index 20d75ca8..e844b604 100644
--- a/doc/build.rst
+++ b/doc/build.rst
@@ -51,6 +51,8 @@ Resolver:
"Doxygen_", "``documentation``", "Generating API
documentation."
"Sphinx_ and sphinx_rtd_theme_", "``documentation``",
"Building this
HTML/PDF documentation."
+ "Texinfo_", "``documentation``", "Generating this
documentation in Info
+ format."
"breathe_", "``documentation``", "Exposing Doxygen API doc to
Sphinx."
"libsystemd_", "``daemon``", "Systemd watchdog
support."
"libprotobuf_ 3.0+", "``modules/dnstap``", "Protocol Buffers
support for
@@ -288,6 +290,7 @@ For development, it's possible to build the container directly
from your git tre
.. _breathe:
https://github.com/michaeljones/breathe
.. _Sphinx:
http://sphinx-doc.org/
.. _sphinx_rtd_theme:
https://pypi.python.org/pypi/sphinx_rtd_theme
+.. _Texinfo:
https://www.gnu.org/software/texinfo/
.. _pkg-config:
https://www.freedesktop.org/wiki/Software/pkg-config/
.. _libknot:
https://gitlab.nic.cz/knot/knot-dns
.. _cmocka:
https://cmocka.org/
diff --git a/doc/meson.build b/doc/meson.build
index cfb5a55e..f5d75251 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -27,6 +27,8 @@ if get_option('doc') == 'enabled'
if not sphinx_build.found()
sphinx_build = find_program('sphinx-build')
endif
+ makeinfo = find_program('makeinfo', required: false)
+ install_info = find_program('install-info', required: false)
# python dependencies: breathe, sphinx_rtd_theme
python_breathe = run_command('python3', '-c', 'import
breathe')
@@ -54,6 +56,11 @@ if get_option('doc') == 'enabled'
join_paths(meson.current_source_dir(), 'html'),
install_dir: doc_dir,
)
+
+ if makeinfo.found() and install_info.found()
+ # install info docs
+ meson.add_install_script('../scripts/install-doc-info.sh')
+ endif
endif
make_doc = find_program('../scripts/make-doc.sh')
diff --git a/scripts/install-doc-info.sh b/scripts/install-doc-info.sh
new file mode 100644
index 00000000..da4023bc
--- /dev/null
+++ b/scripts/install-doc-info.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-3.0-or-later
+set -o errexit -o nounset
+
+# Install the Info manual
+make -C "${MESON_SOURCE_ROOT}/doc/texinfo" \
+ infodir="${MESON_INSTALL_DESTDIR_PREFIX}/share/info" \
+ install-info
diff --git a/scripts/make-doc.sh b/scripts/make-doc.sh
index 9d476121..ba821dcd 100755
--- a/scripts/make-doc.sh
+++ b/scripts/make-doc.sh
@@ -15,3 +15,9 @@ set -o errexit -o nounset
rm -rf doc/html
${SPHINX} ${@} -b html -d doc/.doctrees doc doc/html
+
+if command -v makeinfo >/dev/null; then
+ rm -rf doc/texinfo
+ ${SPHINX} ${@} -b texinfo -d doc/.doctrees doc doc/texinfo
+ make -C doc/texinfo info
+fi
--
2.28.0