バージョンごとのドキュメント一覧

J.3. Makeを使って文書を構築する #

<title>Building the Documentation with Make</title>

Once you have everything set up, change to the directory <filename>doc/src/sgml</filename> and run one of the commands described in the following subsections to build the documentation. (Remember to use GNU make.) 全ての設定が終了したら、doc/src/sgmlディレクトリに移動して以下のコマンドの1つを実行してください (GNU makeを使うのを忘れずに)。

J.3.1. HTML #

To build the <acronym>HTML</acronym> version of the documentation: HTML形式の文書を作成するには次のようにします。

doc/src/sgml$ make html

This is also the default target. The output appears in the subdirectory <filename>html</filename>. これはデフォルトでの対象です。 出力はhtmlサブディレクトリに作成されます。

To produce HTML documentation with the stylesheet used on <ulink url="https://www.postgresql.org/docs/current/">postgresql.org</ulink> instead of the default simple style use: デフォルトの簡単なスタイルではなくpostgresql.orgで使われているスタイルシートのHTMLの文書を作成するには、次のようにします。

doc/src/sgml$ make STYLE=website html

If the <literal>STYLE=website</literal> option is used, the generated HTML files include references to stylesheets hosted on <ulink url="https://www.postgresql.org/docs/current/">postgresql.org</ulink> and require network access to view. STYLE=websiteオプションが使われると、生成されるHTMLファイルはpostgresql.orgで提供されるスタイルシートへの参照を含み、見るにはネットワークアクセスが必要です。

J.3.2. マニュアルページ #

<title>Manpages</title>

We use the DocBook XSL stylesheets to convert <productname>DocBook</productname> <sgmltag>refentry</sgmltag> pages to *roff output suitable for man pages. To create the man pages, use the command: DocBook refentryページをマニュアルページに対応した*roff形式に変換するには、DocBook XSLスタイルシートを使用します。 マニュアルページを作成するには次のようにします。

doc/src/sgml$ make man

J.3.3. PDF #

To produce a PDF rendition of the documentation using <productname>FOP</productname>, you can use one of the following commands, depending on the preferred paper format: FOPを使ってPDF文書を作成したい時は、対象の用紙のサイズに合わせて以下のコマンドの中から1つを選んでください。

  • For A4 format: A4サイズ:

    doc/src/sgml$ make postgres-A4.pdf
    

  • For U.S. letter format: U.S.レターサイズ:

    doc/src/sgml$ make postgres-US.pdf
    

Because the PostgreSQL documentation is fairly big, <productname>FOP</productname> 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 <filename>~/.foprc</filename>, for example: PostgreSQL文書はかなり大きいので、FOPはかなりの量のメモリを必要とするでしょう。 そのため、システムの中には、メモリに関連するエラーメッセージを出して作成に失敗するものもあるでしょう。 これは、設定ファイル~/.foprcのJavaヒープ設定を設定することで回避できます。例えば、

# FOP binary distribution
FOP_OPTS='-Xmx1500m'
# Debian
JAVA_ARGS='-Xmx1500m'
# Red Hat
ADDITIONAL_FLAGS='-Xmx1500m'

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. 必要なメモリの最小量があり、ある程度はメモリが多いほどより速くなるようです。 非常に少ないメモリ(1GB以下)のシステムでは、作成はスワップのために非常に遅くなるか、全く動かないでしょう。

In its default configuration <productname>FOP</productname> will emit an <literal>INFO</literal> message for each page. The log level can be changed via <filename>~/.foprc</filename>: デフォルト設定では、FOPはページごとにINFOメッセージを発行します。 ログレベルは~/.foprcで変更できます。

LOGCHOICE=-Dorg.apache.commons.logging.Log=​org.apache.commons.logging.impl.SimpleLog
LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=WARN

Other XSL-FO processors can also be used manually, but the automated build process only supports FOP. 他のXSL-FOプロセッサも手動で使えますが、自動化された作成プロセスではFOPだけがサポートされています。

J.3.4. 平文ファイル #

<title>Plain Text Files</title>

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 <filename>INSTALL</filename> file corresponds to <xref linkend="installation"/>, with some minor changes to account for the different context. To recreate the file, change to the directory <filename>doc/src/sgml</filename> and enter <userinput>make INSTALL</userinput>. Building text output requires <productname>Pandoc</productname> version 1.13 or newer as an additional build tool. より良い表示ツールがない状況で必要とされる場合に備えて、インストールの手順は平文でも配布されています。 INSTALLファイルは第17章と連係していて、異なった内容を説明するためにちょっとした変更が加えられています。 このファイルを生成するには、doc/src/sgmlディレクトリに移動しmake INSTALLと入力します。 テキスト出力の構築には、追加の構築ツールとしてバージョン1.13以降のPandocが必要です。

In the past, the release notes and regression testing instructions were also distributed as plain text, but this practice has been discontinued. 以前はリリースノートとリグレッションテストの手順も平文で配布されていましたが、打ち切りになりました。

J.3.5. 構文検証 #

<title>Syntax Check</title>

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: 文書の構築にはとても時間がかかります。 でも文書ファイルの正しい構文だけを検証する方法があります。 以下のように入力します。 ほんの数秒しかかかりません。

doc/src/sgml$ make check