Julian Hall | 2075a21 | 2021-03-24 10:11:29 +0000 | [diff] [blame] | 1 | Documentation Build Instructions |
| 2 | ================================ |
Julian Hall | e76ade8 | 2020-11-25 03:07:21 +0100 | [diff] [blame] | 3 | |
| 4 | To create a rendered copy of this documentation locally you can use the |
| 5 | `Sphinx`_ tool to build and package the plain-text documents into HTML-formatted |
| 6 | pages. |
| 7 | |
| 8 | If you are building the documentation for the first time then you will need to |
| 9 | check that you have the required software packages, as described in the |
| 10 | *Prerequisites* section that follows. |
| 11 | |
| 12 | Prerequisites |
| 13 | ------------- |
| 14 | |
| 15 | For building a local copy of the |TS| documentation you will need, at minimum: |
| 16 | |
| 17 | - GNUMake |
| 18 | - Python 3 (3.5 or later) |
| 19 | - PlantUML (1.2017.15 or later) |
| 20 | |
| 21 | You must also install the Python modules that are specified in the |
| 22 | ``requirements.txt`` file in the root of the ``docs`` directory. These modules |
| 23 | can be installed using ``pip3`` (the Python Package Installer). Passing this |
| 24 | requirements file as an argument to ``pip3`` automatically installs the specific |
| 25 | module versions required. |
| 26 | |
| 27 | Example environment |
| 28 | ------------------- |
| 29 | |
| 30 | An example set of installation commands for Linux with the following assumptions: |
| 31 | #. OS and version: Ubuntu 18.04 LTS |
| 32 | #. `virtualenv` is used to separate the python dependencies |
| 33 | #. pip is used for python dependency management |
| 34 | #. `bash` is used as the shell. |
| 35 | |
| 36 | .. code:: shell |
| 37 | |
| 38 | sudo apt install make python3 python3-pip virtualenv python3-virtualenv plantuml |
| 39 | virtualenv -p python3 ~/sphinx-venv |
| 40 | . ~/sphinx-venv/bin/activate |
| 41 | pip3 install -r requirements.txt |
| 42 | deactivate |
| 43 | |
| 44 | .. note:: |
| 45 | More advanced usage instructions for *pip* are beyond the scope of this |
| 46 | document but you can refer to the `pip homepage`_ for detailed guides. |
| 47 | |
| 48 | .. note:: |
| 49 | For more information on Virtualenv please refer to the `Virtualenv documentation`_ |
| 50 | |
| 51 | Building rendered documentation |
| 52 | ------------------------------- |
| 53 | |
| 54 | From the ``docs`` directory of the project, run the following commands. |
| 55 | |
| 56 | .. code:: shell |
| 57 | |
| 58 | . ~/sphinx-venv/bin/activate |
| 59 | make clean |
Julian Hall | 2075a21 | 2021-03-24 10:11:29 +0000 | [diff] [blame] | 60 | make |
Julian Hall | e76ade8 | 2020-11-25 03:07:21 +0100 | [diff] [blame] | 61 | deactivate |
| 62 | |
| 63 | Output from the build process will be placed in: |
| 64 | |
| 65 | :: |
| 66 | |
| 67 | <tf-a CMF root>/docs/_build/html/ |
| 68 | |
| 69 | -------------- |
| 70 | |
| 71 | .. _Sphinx: http://www.sphinx-doc.org/en/master/ |
| 72 | .. _pip homepage: https://pip.pypa.io/en/stable/ |
| 73 | .. _`Virtualenv documentation`: https://virtualenv.pypa.io/en/latest/ |
| 74 | |
| 75 | *Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.* |
| 76 | |
| 77 | SPDX-License-Identifier: BSD-3-Clause |