All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] doc: building documentation
@ 2022-12-30  4:07 Heinrich Schuchardt
  2022-12-30 17:51 ` Simon Glass
  0 siblings, 1 reply; 15+ messages in thread
From: Heinrich Schuchardt @ 2022-12-30  4:07 UTC (permalink / raw)
  To: Tom Rini; +Cc: Maxim Cournoyer, u-boot, Heinrich Schuchardt

Provide a man-page describing how to build the U-Boot documentation.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 doc/build/documentation.rst | 90 +++++++++++++++++++++++++++++++++++++
 doc/build/index.rst         |  1 +
 2 files changed, 91 insertions(+)
 create mode 100644 doc/build/documentation.rst

diff --git a/doc/build/documentation.rst b/doc/build/documentation.rst
new file mode 100644
index 0000000000..896264dd7c
--- /dev/null
+++ b/doc/build/documentation.rst
@@ -0,0 +1,90 @@
+.. SPDX-License-Identifier: GPL-2.0+:
+
+Building documentation
+======================
+
+The U-Boot documentation is based on the Sphinx documentation generator.
+
+HTML documentation
+------------------
+
+The *htmldocs* target is used to build the HTML documentation. It uses the
+`Read the Docs Sphinx theme <https://sphinx-rtd-theme.readthedocs.io/en/stable/>`_.
+
+.. code-block:: bash
+
+    # Create Python environment 'myenv'
+    python3 -m venv myenv
+    # Activate the Python environment
+    . myenv/bin/activate
+    # Install build requirements
+    python3 -m pip install -r doc/sphinx/requirements.txt
+    # Build the documentation
+    make htmldocs
+    # Deactivate the Python environment
+    deactivate
+    # Display the documentation in a graphical web browser
+    x-www-browser doc/output/index.html
+
+Infodoc documentation
+---------------------
+
+The *infodocs* target builds both a texinfo and an info file:
+
+.. code-block:: bash
+
+    # Create Python environment 'myenv'
+    python3 -m venv myenv
+    # Activate the Python environment
+    . myenv/bin/activate
+    # Install build requirements
+    python3 -m pip install -r doc/sphinx/requirements.txt
+    # Build the documentation
+    make infodocs
+    # Deactivate the Python environment
+    deactivate
+    # Display the documentation
+    info doc/output/texinfo/u-boot.info
+
+PDF documentation
+-----------------
+
+The *pdfdocs* target is meant to be used to build PDF documenation.
+As v2023.01 it fails with 'LaTeX Error: Too deeply nested'.
+
+We can use texi2pdf instead:
+
+.. code-block:: bash
+
+    # Create Python environment 'myenv'
+    python3 -m venv myenv
+    # Activate the Python environment
+    . myenv/bin/activate
+    # Install build requirements
+    python3 -m pip install -r doc/sphinx/requirements.txt
+    # Build the documentation
+    make texinfodocs
+    # Deactivate the Python environment
+    deactivate
+    # Convert to PDF
+    texi2pdf doc/output/texinfo/u-boot.texi
+
+Texinfo documentation
+---------------------
+
+To build only the texinfo documentation the *texinfodocs* target is used:
+
+.. code-block:: bash
+
+    # Create Python environment 'myenv'
+    python3 -m venv myenv
+    # Activate the Python environment
+    . myenv/bin/activate
+    # Install build requirements
+    python3 -m pip install -r doc/sphinx/requirements.txt
+    # Build the documentation
+    make texinfodocs
+    # Deactivate the Python environment
+    deactivate
+
+The output is in file *doc/output/texinfo/u-boot.texi*.
diff --git a/doc/build/index.rst b/doc/build/index.rst
index 9a8105db21..dc9cde4001 100644
--- a/doc/build/index.rst
+++ b/doc/build/index.rst
@@ -12,3 +12,4 @@ Build U-Boot
    docker
    tools
    buildman
+   documentation
-- 
2.37.2


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

end of thread, other threads:[~2023-01-08 15:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-30  4:07 [PATCH 1/1] doc: building documentation Heinrich Schuchardt
2022-12-30 17:51 ` Simon Glass
2022-12-30 18:12   ` Tom Rini
2022-12-30 18:31     ` Heinrich Schuchardt
2022-12-30 19:02       ` Simon Glass
2022-12-30 19:08         ` Tom Rini
2022-12-30 19:08         ` Heinrich Schuchardt
2023-01-07 18:55           ` Simon Glass
2023-01-07 19:09             ` Tom Rini
2023-01-07 22:16             ` Heinrich Schuchardt
2023-01-07 22:54               ` Simon Glass
2023-01-08  0:11                 ` Heinrich Schuchardt
2023-01-08  2:37                   ` Simon Glass
2023-01-08 13:44                     ` Tom Rini
2023-01-08 15:05                       ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.