title: Building PostgreSQL with man pages
body: <p>I need to build PostgreSQL from the source code. Everything goes well unless I include man pages.</p>
  
  <p><a href="http://www.postgresql.org/docs/9.3/static/install-procedure.html" rel="nofollow">The official guide</a> says</p>
  
  <blockquote>
    <p>If you want to build everything that can be built, including the
    documentation (HTML and man pages), and the additional modules
    (contrib), type instead</p>
  </blockquote>
  
  <pre><code>gmake world
  </code></pre>
  
  <p>As far as I understood, <code>gmake</code> is <code>make</code></p>
  
  <p>Here are the last lines of output of <code>make world</code></p>
  
  <pre><code>               A new program
        (psql) was provided for interactive
        SQL queries, which used GNU
        Readline.  This largely superseded
        the old monitor program.
  
  
  
                 A new front-end library, libpgtcl,
        supported Tcl-based clients.  A sample shell,
        , provided new Tcl commands to
        interface make[3]: *** [HTML.index] Error 1
  make[3]: Leaving directory `/home/maxim-dmitriev/PostgreSQL/doc/src/sgml'
  make[2]: *** [all] Error 2
  make[2]: Leaving directory `/home/maxim-dmitriev/PostgreSQL/doc/src'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/home/maxim-dmitriev/PostgreSQL/doc'
  make: *** [world-doc-recurse] Error 2
  </code></pre>
  
  <p><strong>Update #1</strong>  </p>
  
  <p>When I ran <code>gmake man</code>, it ended up by throwing <code>Error 127</code>.</p>
  
  <p><em>The first time.</em></p>
  
  <pre><code>{ \
        echo "&lt;!ENTITY version \"9.4devel\"&gt;"; \
        echo "&lt;!ENTITY majorversion \"9.4\"&gt;"; \
      } &gt; version.sgml
  '/usr/bin/perl' ./mk_feature_tables.pl YES ../../../src/backend/catalog/sql_feature_packages.txt ../../../src/backend/catalog/sql_features.txt &gt; features-supported.sgml
  '/usr/bin/perl' ./mk_feature_tables.pl NO ../../../src/backend/catalog/sql_feature_packages.txt ../../../src/backend/catalog/sql_features.txt &gt; features-unsupported.sgml
  '/usr/bin/perl' ./generate-errcodes-table.pl ../../../src/backend/utils/errcodes.txt &gt; errcodes-table.sgml
  osx -D. -x lower -i include-xslt-index postgres.sgml &gt;postgres.xmltmp
  /bin/sh: 1: osx: not found
  </code></pre>
  
  <p><em>The second and third times.</em></p>
  
  <pre><code>osx -D. -x lower -i include-xslt-index postgres.sgml &gt;postgres.xmltmp
  /bin/sh: 1: osx: not found
  gmake: *** [postgres.xml] Error 127
  </code></pre>