Changes between Version 6 and Version 7 of Docs/Build
- Timestamp:
- 11/09/16 23:56:18 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Docs/Build
v6 v7 1 = Build Documentation =1 = Building Documentation = 2 2 3 3 [[TOC(Docs/Build , depth=2)]] 4 4 5 This page explains how to build the documentation from source. 5 This page explains how to build the documentation from source. 6 7 The documentation can be found in the [https://git.rtems.org/rtems-docs RTEMS Documentation Repository]. It contains [https://git.rtems.org/rtems-docs/tree/README.txt README.txt] and we suggest you also check it for the latest build instructions including host specific details. 6 8 7 9 == Prerequisites == … … 9 11 You will need: 10 12 11 * [https://www.waf.io/ waf] - The waf build system.12 13 * [http://www.sphinx-doc.org/ Sphinx] - The Sphinx documentation system. 14 * [https://www.tug.org/texlive/ Tex Live] - The Tex Live document production system. 15 * [https://github.com/remy/inliner Inliner] - Single HTML Page Generator. 13 16 14 === Extras === 15 These dependencies are not required by default but are used for other targets. 17 These tools may be provided by your host's packaging system or you may decide to install them manually. 16 18 17 ||= Target =||= Dependency =|| 18 ||pdf||TeX (pdflatex)|| 19 ||htmlsingle||Node [https://github.com/remy/inliner inliner]|| 19 The Tex Live system packaging may result in some fragility on your host system. It depends on how many and how the Tex Live packages are packaged for your host. If in doubt select the '''full''' install. 20 20 21 21 The RTEMS PDF output uses the ''lato'' and ''inconsolata'' fonts. These are not available on some hosts. If the configure phase of the build reports an error related to these Tex packages you can optionally disable support for them resulting in a lower quality documentation. 22 22 23 23 == Sphinx == 24 24 25 '''Note:''' Version 1.3 is the minimum version of Sphinx required. 25 '''Note:''' Version 1.3 is the minimum version of Sphinx required and version 1.48 is recommended. We have found using a git release can have errors so we suggest avoiding it. 26 27 Windows users can find detailed instructions on the [http://www.sphinx-doc.org/en/stable/install.html#windows-install-python-and-sphinx Sphinx Website]. 26 28 27 29 Most UNIX distributions have a package for Sphinx. For manual installation refer to the [http://www.sphinx-doc.org/en/stable/install.html Install Page] on the Sphinx website. 28 30 29 Windows users can find detailed instructions on the [http://www.sphinx-doc.org/en/stable/install.html#windows-install-python-and-sphinx Sphinx Website]. 31 {{{ 32 $ pip install -U sphinx 33 }}} 34 35 If you need to update `pip` use: 36 37 {{{ 38 $ pip install --upgrade --user pip 39 }}} 40 41 You need to add into your your local copy of Sphinx: 42 43 {{{ 44 export PATH=${HOME}/.local/bin:${PATH} 45 }}} 46 47 == Tex Live == 48 49 To install the Tex Live system from the upstream site run as root: 50 51 {{{ 52 # cd /somewhere/temporary 53 # wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz 54 # tar xf install-tl-unx.tar.gz 55 # cd install-tl-20161106 56 # ./install-tl 57 }}} 58 59 NOTE: The date in the name of the directory will change. 60 - Use the command line system. Select `O` for options if you want to 61 change from A4 to US letter paper size by default. 62 - Select `I` to install 63 - The tools will be installed into a directory like the following: 64 /usr/local/texlive/2016/bin/i386-linux/. You will need to have a 65 look to find the exact path. 66 67 Set the path to the install Tex Live system, make sure it is in front of other system paths: 68 69 {{{ 70 export PATH=/usr/local/texlive/2016/bin/i386-linux/:${PATH} 71 }}} 72 73 == Single HTML == 74 75 The documentation can be built as a single HTML. This is a compact easy to reference way to view the documentation with some limitations: 76 77 - No searching. 78 79 - Section numbering is flat and does not match the HTML or PDF numbering. 80 81 Install the Node.js package manager for your platform. On FreeBSD the command is: 82 83 {{{ 84 # pkg install npm 85 }}} 86 87 Once `npm` is installed install the Inliner package: 88 89 {{{ 90 # npm install -g inliner 91 }}} 30 92 31 93 == Getting Source == … … 35 97 * https://git.rtems.org/rtems-docs.git 36 98 99 {{{ 100 $ cd 101 $ mkdir -p development/rtems/docs 102 $ cd development/rtems/docs 103 $ git clone git:://git.rtems.org/rtems-docs.git 104 $ cd rtems-docs 105 }}} 106 37 107 == Building == 38 108 39 Each document can be built on its own by entering the directory and typing:109 You can build all document from the top level directory or you and enter a specific documents directory and build just that document. for the top level build: 40 110 41 111 {{{ 42 #waf configure43 #waf build112 $ ./waf configure 113 $ ./waf build 44 114 }}} 45 115 46 This will build the default `html` target which is several split files.116 This will build the default `html` output which is a number of HTML files plus searching. The output will in the `build` directory under the manual's names and `html`. 47 117 48 === Targets === 118 You can add a `prefix` to the configure phase to install the output to the prefix: 49 119 50 ||= Target =||= Result =|| 51 ||--pdf||Build PDF|| 52 ||--htmlsingle||Build a Single HTML file|| 120 {{{ 121 $ ./waf configure --prefix=/opt/rtems/4.11 122 $ ./waf build install 123 }}} 53 124 125 === Single HTML Output === 54 126 127 A single HTML page can be built if the Inliner package is install by adding `--singlehtml` to the `configure` phase: 55 128 129 {{{ 130 $ ./waf configure --singlehtml 131 $ ./waf build 132 }}} 56 133 134 === PDF Output === 57 135 136 PDF format output can be built is Tex Live and `pdflatex` is install by adding `--pdf` to the `configure` phase: 137 138 {{{ 139 $ ./waf configure --pdf 140 $ ./waf build 141 }}} 142 143 === All Output Formats === 144 145 You can build all output formats at once by: 146 147 {{{ 148 $ ./waf configure --prefix=/opt/rtems/4.11 --singlehtml --pdf 149 $ ./waf build install 150 }}} 151 152 === Sphinx Warnings === 153 154 To see the Sphinx warnings use the `--sphinx-verbose=` option. Refer to the Sphinx documentation for the available options. The simplest is to add `-v`, for example: 155 156 {{{ 157 $ ./waf configure --sphinx-verbose=-v 158 $ ./waf build 159 }}} 160 161 === PDF Fonts === 162 163 If your host does not provide the extra fonts we use for a better quality output you can override the configure phase and fall back to use lower quality fonts by adding: 164 165 {{{ 166 $ ./waf configure --disable-extra-fonts 167 $ ./waf build 168 }}} 169 170 If the fonts are found on your host the option is ignored. 171 172 == ReST Coding Standard == 173 174 We have a coding standard for how we use ReST. It is important we use this standard. The standard is documented in [https://git.rtems.org/rtems-docs/tree/README.txt README.txt].