to customize the configuration.
</para>
</step>
<step id="build">
<title>Build</title>
<para>
To start the build, type either of:
<screen>
<userinput>make</userinput>
<userinput>make all</userinput>
</screen>
(Remember to use <acronym>GNU</acronym> <application>make</application>.)
The build will take a few minutes depending on your
hardware.
</para>
<para>
If you want to build everything that can be built, including the
documentation (HTML and man pages), and the additional modules
(<filename>contrib</filename>), type instead:
<screen>
<userinput>make world</userinput>
</screen>
</para>
<para>
If you want to build everything that can be built, including the
additional modules (<filename>contrib</filename>), but without
the documentation, type instead:
<screen>
<userinput>make world-bin</userinput>
</screen>
</para>
<para>
If you want to invoke the build from another makefile rather than
manually, you must unset <varname>MAKELEVEL</varname> or set it to zero,
for instance like this:
<programlisting>
build-postgresql:
$(MAKE) -C postgresql MAKELEVEL=0 all
</programlisting>
Failure to do that can lead to strange error messages, typically about
missing header files.
</para>
</step>
<step>
<title>Regression Tests</title>
<indexterm>
<primary>regression test</primary>
</indexterm>
<para>
If you want to test the newly built server before you install it,
you can run the regression tests at this point. The regression
tests are a test suite to verify that <productname>PostgreSQL</productname>
runs on your machine in the way the developers expected it
to. Type:
<screen>
<userinput>make check</userinput>
</screen>
(This won't work as root; do it as an unprivileged user.)
See <xref linkend="regress"/> for
detailed information about interpreting the test results. You can
repeat this test at any later time by issuing the same command.
</para>
</step>
<step id="install">
<title>Installing the Files</title>
<note>
<para>
If you are upgrading an existing system be sure to read
<xref linkend="upgrading"/>,
which has instructions about upgrading a
cluster.
</para>
</note>
<para>
To install <productname>PostgreSQL</productname> enter:
<screen>
<userinput>make install</userinput>
</screen>
This will install files into the directories that were specified
in <xref linkend="configure"/>. Make sure that you have appropriate
permissions to write into that area. Normally you need to do this
step as root. Alternatively, you can create the target
directories in advance and arrange for appropriate permissions to
be granted.
</para>
<para>
To install the documentation (HTML and man pages), enter:
<screen>
<userinput>make install-docs</userinput>
</screen>
</para>
<para>
If you built the world above, type instead:
<screen>
<userinput>make install-world</userinput>
</screen>
This also installs the documentation.
</para>
<para>
If you built the world without the documentation above, type instead:
<screen>
<userinput>make install-world-bin</userinput>
</screen>
</para>
<para>
You can use <literal>make install-strip</literal> instead of
<literal>make install</literal> to strip the executable files and
libraries as they are installed. This will save some space. If
you built with debugging support, stripping will effectively
remove the debugging support, so it should only be done if
debugging is no longer needed. <literal>install-strip</literal>
tries to do a reasonable job saving space, but it does not have
perfect knowledge of how to strip every unneeded byte from an
executable file, so if you want to save all the disk space you
possibly can, you will have to do manual work.
</para>
<para>
The standard installation provides all the header