codekingpro/portable-devtools
115k
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>J.3. Building the Documentation with Make</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="docguide-toolsets.html" title="J.2. Tool Sets" /><link rel="next" href="docguide-build-meson.html" title="J.4. Building the Documentation with Meson" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">J.3. Building the Documentation with Make</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="docguide-toolsets.html" title="J.2. Tool Sets">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="docguide.html" title="Appendix J. Documentation">Up</a></td><th width="60%" align="center">Appendix J. Documentation</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="docguide-build-meson.html" title="J.4. Building the Documentation with Meson">Next</a></td></tr></table><hr /></div><div class="sect1" id="DOCGUIDE-BUILD"><div class="titlepage"><div><div><h2 class="title" style="clear: both">J.3. Building the Documentation with Make <a href="#DOCGUIDE-BUILD" class="id_link">#</a></h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="docguide-build.html#DOCGUIDE-BUILD-HTML">J.3.1. HTML</a></span></dt><dt><span class="sect2"><a href="docguide-build.html#DOCGUIDE-BUILD-MANPAGES">J.3.2. Manpages</a></span></dt><dt><span class="sect2"><a href="docguide-build.html#DOCGUIDE-BUILD-PDF">J.3.3. PDF</a></span></dt><dt><span class="sect2"><a href="docguide-build.html#DOCGUIDE-BUILD-PLAIN-TEXT">J.3.4. Plain Text Files</a></span></dt><dt><span class="sect2"><a href="docguide-build.html#DOCGUIDE-BUILD-SYNTAX-CHECK">J.3.5. Syntax Check</a></span></dt></dl></div><p>3 Once you have everything set up, change to the directory4 <code class="filename">doc/src/sgml</code> and run one of the commands5 described in the following subsections to build the6 documentation. (Remember to use GNU make.)7 </p><div class="sect2" id="DOCGUIDE-BUILD-HTML"><div class="titlepage"><div><div><h3 class="title">J.3.1. HTML <a href="#DOCGUIDE-BUILD-HTML" class="id_link">#</a></h3></div></div></div><p>8 To build the <acronym class="acronym">HTML</acronym> version of the documentation:9</p><pre class="screen">10<code class="prompt">doc/src/sgml$ </code><strong class="userinput"><code>make html</code></strong>11</pre><p>12 This is also the default target. The output appears in the13 subdirectory <code class="filename">html</code>.14 </p><p>15 To produce HTML documentation with the stylesheet used on <a class="ulink" href="https://www.postgresql.org/docs/current/" target="_top">postgresql.org</a> instead of the16 default simple style use:17</p><pre class="screen">18<code class="prompt">doc/src/sgml$ </code><strong class="userinput"><code>make STYLE=website html</code></strong>19</pre><p>20 </p><p>21 If the <code class="literal">STYLE=website</code> option is used, the generated HTML22 files include references to stylesheets hosted on <a class="ulink" href="https://www.postgresql.org/docs/current/" target="_top">postgresql.org</a> and23 require network access to view.24 </p></div><div class="sect2" id="DOCGUIDE-BUILD-MANPAGES"><div class="titlepage"><div><div><h3 class="title">J.3.2. Manpages <a href="#DOCGUIDE-BUILD-MANPAGES" class="id_link">#</a></h3></div></div></div><p>25 We use the DocBook XSL stylesheets to26 convert <span class="productname">DocBook</span>27 <code class="sgmltag-element">refentry</code> pages to *roff output suitable for man28 pages. To create the man pages, use the command:29</p><pre class="screen">30<code class="prompt">doc/src/sgml$ </code><strong class="userinput"><code>make man</code></strong>31</pre><p>32 </p></div><div class="sect2" id="DOCGUIDE-BUILD-PDF"><div class="titlepage"><div><div><h3 class="title">J.3.3. PDF <a href="#DOCGUIDE-BUILD-PDF" class="id_link">#</a></h3></div></div></div><p>33 To produce a PDF rendition of the documentation34 using <span class="productname">FOP</span>, you can use one of the following35 commands, depending on the preferred paper format:36 37 </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>38 For A4 format:39</p><pre class="screen">40<code class="prompt">doc/src/sgml$ </code><strong class="userinput"><code>make postgres-A4.pdf</code></strong>41</pre><p>42 </p></li><li class="listitem"><p>43 For U.S. letter format:44</p><pre class="screen">45<code class="prompt">doc/src/sgml$ </code><strong class="userinput"><code>make postgres-US.pdf</code></strong>46</pre><p>47 </p></li></ul></div><p>48 </p><p>49 Because the PostgreSQL documentation is fairly50 big, <span class="productname">FOP</span> will require a significant amount of51 memory. Because of that, on some systems, the build will fail with a52 memory-related error message. This can usually be fixed by configuring53 Java heap settings in the configuration54 file <code class="filename">~/.foprc</code>, for example:55</p><pre class="programlisting">56# FOP binary distribution57FOP_OPTS='-Xmx1500m'58# Debian59JAVA_ARGS='-Xmx1500m'60# Red Hat61ADDITIONAL_FLAGS='-Xmx1500m'62</pre><p>63 There is a minimum amount of memory that is required, and to some extent64 more memory appears to make things a bit faster. On systems with very65 little memory (less than 1 GB), the build will either be very slow due to66 swapping or will not work at all.67 </p><p>68 In its default configuration <span class="productname">FOP</span> will emit an69 <code class="literal">INFO</code> message for each page. The log level can be70 changed via <code class="filename">~/.foprc</code>:71</p><pre class="programlisting">72LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog73LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=WARN74</pre><p>75 </p><p>76 Other XSL-FO processors can also be used manually, but the automated build77 process only supports FOP.78 </p></div><div class="sect2" id="DOCGUIDE-BUILD-PLAIN-TEXT"><div class="titlepage"><div><div><h3 class="title">J.3.4. Plain Text Files <a href="#DOCGUIDE-BUILD-PLAIN-TEXT" class="id_link">#</a></h3></div></div></div><p>79 The installation instructions are also distributed as plain text,80 in case they are needed in a situation where better reading tools81 are not available. The <code class="filename">INSTALL</code> file82 corresponds to <a class="xref" href="installation.html" title="Chapter 17. Installation from Source Code">Chapter 17</a>, with some minor83 changes to account for the different context. To recreate the84 file, change to the directory <code class="filename">doc/src/sgml</code>85 and enter <strong class="userinput"><code>make INSTALL</code></strong>. Building text output86 requires <span class="productname">Pandoc</span> version 1.13 or newer as an87 additional build tool.88 </p><p>89 In the past, the release notes and regression testing instructions90 were also distributed as plain text, but this practice has been91 discontinued.92 </p></div><div class="sect2" id="DOCGUIDE-BUILD-SYNTAX-CHECK"><div class="titlepage"><div><div><h3 class="title">J.3.5. Syntax Check <a href="#DOCGUIDE-BUILD-SYNTAX-CHECK" class="id_link">#</a></h3></div></div></div><p>93 Building the documentation can take very long. But there is a94 method to just check the correct syntax of the documentation95 files, which only takes a few seconds:96</p><pre class="screen">97<code class="prompt">doc/src/sgml$ </code><strong class="userinput"><code>make check</code></strong>98</pre><p>99 </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="docguide-toolsets.html" title="J.2. Tool Sets">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="docguide.html" title="Appendix J. Documentation">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="docguide-build-meson.html" title="J.4. Building the Documentation with Meson">Next</a></td></tr><tr><td width="40%" align="left" valign="top">J.2. Tool Sets </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="40%" align="right" valign="top"> J.4. Building the Documentation with Meson</td></tr></table></div></body></html>