summaryrefslogtreecommitdiffstats
path: root/doc/src/sgml/html/docguide-build.html
blob: 1f1c5cde4bb71dc2d5ac768a9f810ba202321476 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!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</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-authoring.html" title="J.4. Documentation Authoring" /></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</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 15.7 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="docguide-authoring.html" title="J.4. Documentation Authoring">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</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="docguide-build.html#id-1.11.11.6.3">J.3.1. HTML</a></span></dt><dt><span class="sect2"><a href="docguide-build.html#id-1.11.11.6.4">J.3.2. Manpages</a></span></dt><dt><span class="sect2"><a href="docguide-build.html#id-1.11.11.6.5">J.3.3. PDF</a></span></dt><dt><span class="sect2"><a href="docguide-build.html#id-1.11.11.6.6">J.3.4. Plain Text Files</a></span></dt><dt><span class="sect2"><a href="docguide-build.html#id-1.11.11.6.7">J.3.5. Syntax Check</a></span></dt></dl></div><p>
   Once you have everything set up, change to the directory
   <code class="filename">doc/src/sgml</code> and run one of the commands
   described in the following subsections to build the
   documentation. (Remember to use GNU make.)
  </p><div class="sect2" id="id-1.11.11.6.3"><div class="titlepage"><div><div><h3 class="title">J.3.1. HTML</h3></div></div></div><p>
    To build the <acronym class="acronym">HTML</acronym> version of the documentation:
</p><pre class="screen">
<code class="prompt">doc/src/sgml$ </code><strong class="userinput"><code>make html</code></strong>
</pre><p>
    This is also the default target.  The output appears in the
    subdirectory <code class="filename">html</code>.
   </p><p>
    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 the
    default simple style use:
</p><pre class="screen">
<code class="prompt">doc/src/sgml$ </code><strong class="userinput"><code>make STYLE=website html</code></strong>
</pre><p>
   </p><p>
    If the <code class="literal">STYLE=website</code> option is used, the generated HTML
    files include references to stylesheets hosted on <a class="ulink" href="https://www.postgresql.org/docs/current/" target="_top">postgresql.org</a> and
    require network access to view.
   </p></div><div class="sect2" id="id-1.11.11.6.4"><div class="titlepage"><div><div><h3 class="title">J.3.2. Manpages</h3></div></div></div><p>
   We use the DocBook XSL stylesheets to
   convert <span class="productname">DocBook</span>
   <code class="sgmltag-element">refentry</code> pages to *roff output suitable for man
   pages.  To create the man pages, use the command:
</p><pre class="screen">
<code class="prompt">doc/src/sgml$ </code><strong class="userinput"><code>make man</code></strong>
</pre><p>
  </p></div><div class="sect2" id="id-1.11.11.6.5"><div class="titlepage"><div><div><h3 class="title">J.3.3. PDF</h3></div></div></div><p>
    To produce a PDF rendition of the documentation
    using <span class="productname">FOP</span>, you can use one of the following
    commands, depending on the preferred paper format:

    </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
       For A4 format:
</p><pre class="screen">
<code class="prompt">doc/src/sgml$ </code><strong class="userinput"><code>make postgres-A4.pdf</code></strong>
</pre><p>
      </p></li><li class="listitem"><p>
       For U.S. letter format:
</p><pre class="screen">
<code class="prompt">doc/src/sgml$ </code><strong class="userinput"><code>make postgres-US.pdf</code></strong>
</pre><p>
      </p></li></ul></div><p>
   </p><p>
    Because the PostgreSQL documentation is fairly
    big, <span class="productname">FOP</span> will require a significant amount of
    memory.  Because of that, on some systems, the build will fail with a
    memory-related error message.  This can usually be fixed by configuring
    Java heap settings in the configuration
    file <code class="filename">~/.foprc</code>, for example:
</p><pre class="programlisting">
# FOP binary distribution
FOP_OPTS='-Xmx1500m'
# Debian
JAVA_ARGS='-Xmx1500m'
# Red Hat
ADDITIONAL_FLAGS='-Xmx1500m'
</pre><p>
    There is a minimum amount of memory that is required, and to some extent
    more memory appears to make things a bit faster.  On systems with very
    little memory (less than 1 GB), the build will either be very slow due to
    swapping or will not work at all.
   </p><p>
    Other XSL-FO processors can also be used manually, but the automated build
    process only supports FOP.
   </p></div><div class="sect2" id="id-1.11.11.6.6"><div class="titlepage"><div><div><h3 class="title">J.3.4. Plain Text Files</h3></div></div></div><p>
    The installation instructions are also distributed as plain text,
    in case they are needed in a situation where better reading tools
    are not available.  The <code class="filename">INSTALL</code> file
    corresponds to <a class="xref" href="installation.html" title="Chapter 17. Installation from Source Code">Chapter 17</a>, with some minor
    changes to account for the different context.  To recreate the
    file, change to the directory <code class="filename">doc/src/sgml</code>
    and enter <strong class="userinput"><code>make INSTALL</code></strong>.  Building text output
    requires <span class="productname">Pandoc</span> version 1.13 or newer as an
    additional build tool.
   </p><p>
    In the past, the release notes and regression testing instructions
    were also distributed as plain text, but this practice has been
    discontinued.
   </p></div><div class="sect2" id="id-1.11.11.6.7"><div class="titlepage"><div><div><h3 class="title">J.3.5. Syntax Check</h3></div></div></div><p>
    Building the documentation can take very long.  But there is a
    method to just check the correct syntax of the documentation
    files, which only takes a few seconds:
</p><pre class="screen">
<code class="prompt">doc/src/sgml$ </code><strong class="userinput"><code>make check</code></strong>
</pre><p>
   </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-authoring.html" title="J.4. Documentation Authoring">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 15.7 Documentation">Home</a></td><td width="40%" align="right" valign="top"> J.4. Documentation Authoring</td></tr></table></div></body></html>