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 18.0 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-SYNTAX-CHECK">J.3.4. Syntax Check</a></span></dt></dl></div><p>
3 Once you have everything set up, change to the directory
4 <code class="filename">doc/src/sgml</code> and run one of the commands
5 described in the following subsections to build the
6 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>
12 This is also the default target. The output appears in the
13 subdirectory <code class="filename">html</code>.
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 the
16 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>
21 If the <code class="literal">STYLE=website</code> option is used, the generated HTML
22 files include references to stylesheets hosted on <a class="ulink" href="https://www.postgresql.org/docs/current/" target="_top">postgresql.org</a> and
23 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 to
26 convert <span class="productname">DocBook</span>
27 <code class="sgmltag-element">refentry</code> pages to *roff output suitable for man
28 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>
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 documentation
34 using <span class="productname">FOP</span>, you can use one of the following
35 commands, depending on the preferred paper format:
37 </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
39 </p><pre class="screen">
40 <code class="prompt">doc/src/sgml$ </code><strong class="userinput"><code>make postgres-A4.pdf</code></strong>
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>
47 </p></li></ul></div><p>
49 Because the PostgreSQL documentation is fairly
50 big, <span class="productname">FOP</span> will require a significant amount of
51 memory. Because of that, on some systems, the build will fail with a
52 memory-related error message. This can usually be fixed by configuring
53 Java heap settings in the configuration
54 file <code class="filename">~/.foprc</code>, for example:
55 </p><pre class="programlisting">
56 # FOP binary distribution
61 ADDITIONAL_FLAGS='-Xmx1500m'
63 There is a minimum amount of memory that is required, and to some extent
64 more memory appears to make things a bit faster. On systems with very
65 little memory (less than 1 GB), the build will either be very slow due to
66 swapping or will not work at all.
68 In its default configuration <span class="productname">FOP</span> will emit an
69 <code class="literal">INFO</code> message for each page. The log level can be
70 changed via <code class="filename">~/.foprc</code>:
71 </p><pre class="programlisting">
72 LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
73 LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=WARN
76 Other XSL-FO processors can also be used manually, but the automated build
77 process only supports FOP.
78 </p></div><div class="sect2" id="DOCGUIDE-BUILD-SYNTAX-CHECK"><div class="titlepage"><div><div><h3 class="title">J.3.4. Syntax Check <a href="#DOCGUIDE-BUILD-SYNTAX-CHECK" class="id_link">#</a></h3></div></div></div><p>
79 Building the documentation can take very long. But there is a
80 method to just check the correct syntax of the documentation
81 files, which only takes a few seconds:
82 </p><pre class="screen">
83 <code class="prompt">doc/src/sgml$ </code><strong class="userinput"><code>make check</code></strong>
85 </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 18.0 Documentation">Home</a></td><td width="40%" align="right" valign="top"> J.4. Building the Documentation with Meson</td></tr></table></div></body></html>