This simplifies the docs and makes it easier to cut/paste command lines.
When building from the source distribution, these modules are not
built automatically, unless you build the "world" target. You can
-also build and install them all by running "gmake all" and "gmake
+also build and install them all by running "make all" and "make
install" in this directory; or to build and install just one selected
module, do the same in that module's subdirectory.
Here are the steps needed to create a regression database dump file:
1) Create and populate the regression database in the old cluster
- This database can be created by running 'gmake installcheck' from
+ This database can be created by running 'make installcheck' from
src/test/regression.
2) Use pg_dump to dump out the regression database. Use the new
The shell script test.sh in this directory performs more or less this
procedure. You can invoke it by running
- gmake check
+ make check
or by running
- gmake installcheck
+ make installcheck
-if "gmake install" (or "gmake install-world") were done beforehand.
+if "make install" (or "make install-world") were done beforehand.
When invoked without arguments, it will run an upgrade from the
version in this source tree to a new instance of the same version. To
test an upgrade from a different version, invoke it like this:
- gmake installcheck oldbindir=...otherversion/bin oldsrc=...somewhere/postgresql
+ make installcheck oldbindir=...otherversion/bin oldsrc=...somewhere/postgresql
In this case, you will have to manually eyeball the resulting dump
diff for version-specific differences, as explained above.
## XSLT processing
##
-# For obscure reasons, gmake 3.81 complains about circular dependencies
+# For obscure reasons, GNU make 3.81 complains about circular dependencies
# if we try to do "make all" in a VPATH build without the explicit
-# $(srcdir) on the postgres.sgml dependency in this rule. gmake bug?
+# $(srcdir) on the postgres.sgml dependency in this rule. GNU make bug?
postgres.xml: $(srcdir)/postgres.sgml $(ALMOSTALLSGML)
$(OSX) -D. -x lower -i include-xslt-index $< >postgres.xmltmp
$(PERL) -p -e 's/\[(aacute|acirc|aelig|agrave|amp|aring|atilde|auml|bull|copy|eacute|egrave|gt|iacute|lt|mdash|nbsp|ntilde|oacute|ocirc|oslash|ouml|pi|quot|scaron|uuml) *\]/\&\1;/gi;' \
(see <xref linkend="build">).
You can build and install all of them by running:
<screen>
-<userinput>gmake</userinput>
-<userinput>gmake install</userinput>
+<userinput>make</userinput>
+<userinput>make install</userinput>
</screen>
in the <literal>contrib</literal> directory of a configured source tree;
or to build and install
Many of the modules have regression tests, which can be executed by
running:
<screen>
-<userinput>gmake check</userinput>
+<userinput>make check</userinput>
</screen>
before installation or
<screen>
-<userinput>gmake installcheck</userinput>
+<userinput>make installcheck</userinput>
</screen>
once you have a <productname>PostgreSQL</> server running.
</para>
<para>
To build the <acronym>HTML</acronym> version of the documentation:
<screen>
-<prompt>doc/src/sgml$ </prompt><userinput>gmake html</userinput>
+<prompt>doc/src/sgml$ </prompt><userinput>make html</userinput>
</screen>
This is also the default target. The output appears in the
subdirectory <filename>html</filename>.
stages. If you do not care about the index, and just want to
proof-read the output, use <literal>draft</>:
<screen>
-<prompt>doc/src/sgml$ </prompt><userinput>gmake draft</userinput>
+<prompt>doc/src/sgml$ </prompt><userinput>make draft</userinput>
</screen>
</para>
<para>
To build the documentation as a single HTML page, use:
<screen>
-<prompt>doc/src/sgml$ </prompt><userinput>gmake postgres.html</userinput>
+<prompt>doc/src/sgml$ </prompt><userinput>make postgres.html</userinput>
</screen>
</para>
</sect2>
pages, use the commands:
<programlisting>
cd doc/src/sgml
-gmake man
+make man
</programlisting>
</para>
</sect2>
<para>
To generate PostScript via <acronym>DVI</acronym> in A4 format:
<screen>
-<prompt>doc/src/sgml$ </prompt><userinput>gmake postgres-A4.ps</userinput>
+<prompt>doc/src/sgml$ </prompt><userinput>make postgres-A4.ps</userinput>
</screen>
In U.S. letter format:
<screen>
-<prompt>doc/src/sgml$ </prompt><userinput>gmake postgres-US.ps</userinput>
+<prompt>doc/src/sgml$ </prompt><userinput>make postgres-US.ps</userinput>
</screen>
</para>
</listitem>
<para>
To make a <acronym>PDF</acronym>:
<screen>
-<prompt>doc/src/sgml$ </prompt><userinput>gmake postgres-A4.pdf</userinput>
+<prompt>doc/src/sgml$ </prompt><userinput>make postgres-A4.pdf</userinput>
</screen>
or:
<screen>
-<prompt>doc/src/sgml$ </prompt><userinput>gmake postgres-US.pdf</userinput>
+<prompt>doc/src/sgml$ </prompt><userinput>make postgres-US.pdf</userinput>
</screen>
(Of course you can also make a <acronym>PDF</acronym> version
from the PostScript, but if you generate <acronym>PDF</acronym>
<para>
Generate the <acronym>RTF</acronym> version by typing:
<screen>
-<prompt>doc/src/sgml$ </prompt><userinput>gmake postgres.rtf</userinput>
+<prompt>doc/src/sgml$ </prompt><userinput>make postgres.rtf</userinput>
</screen>
</para>
</step>
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>gmake INSTALL</userinput>.
+ and enter <userinput>make INSTALL</userinput>.
</para>
<para>
method to just check the correct syntax of the documentation
files, which only takes a few seconds:
<screen>
-<prompt>doc/src/sgml$ </prompt><userinput>gmake check</userinput>
+<prompt>doc/src/sgml$ </prompt><userinput>make check</userinput>
</screen>
</para>
</sect2>
<para>
<synopsis>
./configure
-gmake
+make
su
-gmake install
+make install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
<acronym>GNU</> <application>make</> version 3.80 or newer is required; other
<application>make</> programs or older <acronym>GNU</> <application>make</> versions will <emphasis>not</> work.
- <acronym>GNU</> <application>make</> is often installed under
- the name <filename>gmake</filename>; this document will always
- refer to it by that name. (On some systems
- <acronym>GNU</acronym> <application>make</> is the default tool with the name
- <filename>make</>.) To test for <acronym>GNU</acronym>
+ (<acronym>GNU</> <application>make</> is sometimes installed under
+ the name <filename>gmake</filename>.) To test for <acronym>GNU</acronym>
<application>make</application> enter:
<screen>
-<userinput>gmake --version</userinput>
+<userinput>make --version</userinput>
</screen>
</para>
</listitem>
<userinput>mkdir build_dir</userinput>
<userinput>cd build_dir</userinput>
<userinput>/path/to/source/tree/configure [options go here]</userinput>
-<userinput>gmake</userinput>
+<userinput>make</userinput>
</screen>
</para>
source code lines. If you get confused while trying to debug
optimized code, recompile the specific files of interest with
<option>-O0</>. An easy way to do this is by passing an option
- to <application>make</>: <command>gmake PROFILE=-O0 file.o</>.
+ to <application>make</>: <command>make PROFILE=-O0 file.o</>.
</para>
</note>
</step>
<para>
To start the build, type:
<screen>
-<userinput>gmake</userinput>
+<userinput>make</userinput>
</screen>
(Remember to use <acronym>GNU</> <application>make</>.) The build
will take a few minutes depending on your
documentation (HTML and man pages), and the additional modules
(<filename>contrib</filename>), type instead:
<screen>
-<userinput>gmake world</userinput>
+<userinput>make world</userinput>
</screen>
The last line displayed should be:
<screen>
runs on your machine in the way the developers expected it
to. Type:
<screen>
-<userinput>gmake check</userinput>
+<userinput>make check</userinput>
</screen>
(This won't work as root; do it as an unprivileged user.)
<![%standalone-include[The file
<para>
To install <productname>PostgreSQL</> enter:
<screen>
-<userinput>gmake install</userinput>
+<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
<para>
To install the documentation (HTML and man pages), enter:
<screen>
-<userinput>gmake install-docs</userinput>
+<userinput>make install-docs</userinput>
</screen>
</para>
<para>
If you built the world above, type instead:
<screen>
-<userinput>gmake install-world</userinput>
+<userinput>make install-world</userinput>
</screen>
This also installs the documentation.
</para>
<para>
- You can use <literal>gmake install-strip</literal> instead of
- <literal>gmake install</literal> to strip the executable files and
+ 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
The standard installation provides all the header files needed for client
application development as well as for server-side program
development, such as custom functions or data types written in C.
- (Prior to <productname>PostgreSQL</> 8.0, a separate <literal>gmake
+ (Prior to <productname>PostgreSQL</> 8.0, a separate <literal>make
install-all-headers</> command was needed for the latter, but this
step has been folded into the standard install.)
</para>
If you want to install only the client applications and
interface libraries, then you can use these commands:
<screen>
-<userinput>gmake -C src/bin install</>
-<userinput>gmake -C src/include install</>
-<userinput>gmake -C src/interfaces install</>
-<userinput>gmake -C doc install</>
+<userinput>make -C src/bin install</>
+<userinput>make -C src/include install</>
+<userinput>make -C src/interfaces install</>
+<userinput>make -C doc install</>
</screen>
<filename>src/bin</> has a few binaries for server-only use,
but they are small.
<formalpara>
<title>Uninstallation:</title>
<para>
- To undo the installation use the command <command>gmake
+ To undo the installation use the command <command>make
uninstall</>. However, this will not remove any created directories.
</para>
</formalpara>
<para>
After the installation you can free disk space by removing the built
- files from the source tree with the command <command>gmake
+ files from the source tree with the command <command>make
clean</>. This will preserve the files made by the <command>configure</command>
- program, so that you can rebuild everything with <command>gmake</>
+ program, so that you can rebuild everything with <command>make</>
later on. To reset the source tree to the state in which it was
- distributed, use <command>gmake distclean</>. If you are going to
+ distributed, use <command>make distclean</>. If you are going to
build for several platforms within the same source tree you must do
this and re-configure for each platform. (Alternatively, use
a separate build tree for each platform, so that the source tree
If you perform a build and then discover that your <command>configure</>
options were wrong, or if you change anything that <command>configure</>
investigates (for example, software upgrades), then it's a good
- idea to do <command>gmake distclean</> before reconfiguring and
+ idea to do <command>make distclean</> before reconfiguring and
rebuilding. Without this, your changes in configuration choices
might not propagate everywhere they need to.
</para>
<listitem>
<para>
Run the regression tests against the installed server (using
- <command>gmake installcheck</command>). If you didn't run the
+ <command>make installcheck</command>). If you didn't run the
tests before installation, you should definitely do it now. This
is also explained in the documentation.
</para>
</para>
</listitem>
- <listitem>
- <para>
- The GNU make command is called <command>make</command>, not <command>gmake</command>.
- </para>
- </listitem>
-
<listitem>
<para>
The <command>adduser</command> command is not supported; use
<para>
You need to use the GNU Make program, which is on the Skunkware
CD. By default, it installs
- as <filename>/usr/local/bin/make</filename>. To avoid confusion
- with the SCO <filename>make</filename> program, you may want to rename GNU <filename>make</filename> to
- <filename>gmake</filename>.
+ as <filename>/usr/local/bin/make</filename>.
</para>
<para>
CommitTransaction utils/probes.o
ld: fatal: Symbol referencing errors. No output written to postgres
collect2: ld returned 1 exit status
-gmake: *** [postgres] Error 1
+make: *** [postgres] Error 1
</screen>
your DTrace installation is too old to handle probes in static
functions. You need Solaris 10u4 or newer.
If you need to start a new translation effort, then first run the
command:
<programlisting>
-gmake init-po
+make init-po
</programlisting>
This will create a file
<filename><replaceable>progname</replaceable>.pot</filename>.
changed or added by the programmers. In this case you do not need
to start from scratch. Instead, run the command:
<programlisting>
-gmake update-po
+make update-po
</programlisting>
which will create a new blank message catalog file (the pot file
you started with) and will merge it with the existing PO files.
location, use the <literal>prefix</literal> variable:
<programlisting>
-gmake prefix=/usr/local/pgsql.new install
+make prefix=/usr/local/pgsql.new install
</programlisting></para>
</step>
To run the parallel regression tests after building but before installation,
type:
<screen>
-gmake check
+make check
</screen>
in the top-level directory. (Or you can change to
<filename>src/test/regress</filename> and run the command there.)
<prompt>root# </prompt><userinput>chmod -R a+w src/test/regress</userinput>
<prompt>root# </prompt><userinput>su - joeuser</userinput>
<prompt>joeuser$ </prompt><userinput>cd <replaceable>top-level build directory</></userinput>
-<prompt>joeuser$ </prompt><userinput>gmake check</userinput>
+<prompt>joeuser$ </prompt><userinput>make check</userinput>
</screen>
(The only possible <quote>security risk</quote> here is that other
users might be able to alter the regression test results behind
<para>
If you have configured <productname>PostgreSQL</productname> to install
into a location where an older <productname>PostgreSQL</productname>
- installation already exists, and you perform <literal>gmake check</>
+ installation already exists, and you perform <literal>make check</>
before installing the new version, you might find that the tests fail
because the new programs try to use the already-installed shared
libraries. (Typical symptoms are complaints about undefined symbols.)
a position to raise the limit, you can cut down the degree of parallelism
by setting the <literal>MAX_CONNECTIONS</> parameter. For example:
<screen>
-gmake MAX_CONNECTIONS=10 check
+make MAX_CONNECTIONS=10 check
</screen>
runs no more than ten tests concurrently.
</para>
initialize a data area and start the
server, <![%standalone-ignore;[as explained in <xref linkend="runtime">, ]]> then type:
<screen>
-gmake installcheck
+make installcheck
</screen>
or for a parallel test:
<screen>
-gmake installcheck-parallel
+make installcheck-parallel
</screen>
The tests will expect to contact the server at the local host and the
default port number, unless directed otherwise by <envar>PGHOST</envar> and
built and installed, change to the <filename>src/pl</> directory of the
build tree and type:
<screen>
-gmake installcheck
+make installcheck
</screen>
You can also do this in any of the subdirectories of <filename>src/pl</>
to run tests for just one procedural language. To run the tests for all
<filename>contrib</> modules that have them, change to the
<filename>contrib</> directory of the build tree and type:
<screen>
-gmake installcheck
+make installcheck
</screen>
The <filename>contrib</> modules must have been built and installed first.
You can also do this in a subdirectory of <filename>contrib</> to run
directory:
<screen>
cd src/test/regress
-gmake standbycheck
+make standbycheck
</screen>
</para>
can be useful to test different locales by setting the appropriate
environment variables, for example:
<screen>
-gmake check LANG=C
-gmake check LC_COLLATE=en_US.utf8 LC_CTYPE=fr_CA.utf8
+make check LANG=C
+make check LC_COLLATE=en_US.utf8 LC_CTYPE=fr_CA.utf8
</screen>
For implementation reasons, setting <envar>LC_ALL</envar> does not
work for this purpose; all the other locale-related environment
You can also choose the database encoding explicitly by setting
the variable <envar>ENCODING</envar>, for example:
<screen>
-gmake check LANG=C ENCODING=EUC_JP
+make check LANG=C ENCODING=EUC_JP
</screen>
Setting the database encoding this way typically only makes sense
if the locale is C; otherwise the encoding is chosen automatically
files by setting the variable <envar>EXTRA_TESTS</envar>. For
example, to run the <literal>numeric_big</literal> test:
<screen>
-gmake check EXTRA_TESTS=numeric_big
+make check EXTRA_TESTS=numeric_big
</screen>
To run the collation tests:
<screen>
-gmake check EXTRA_TESTS=collate.linux.utf8 LANG=en_US.utf8
+make check EXTRA_TESTS=collate.linux.utf8 LANG=en_US.utf8
</screen>
The <literal>collate.linux.utf8</> test works only on Linux/glibc
platforms, and only when run in a database that uses UTF-8 encoding.
locale-related environment variables on
the <command>make</command> command line, for example:
<programlisting>
-gmake check LANG=de_DE.utf8
+make check LANG=de_DE.utf8
</programlisting>
(The regression test driver unsets <envar>LC_ALL</envar>, so it
does not work to choose the locale using that variable.) To use
(or set them to <literal>C</literal>) or use the following
special invocation:
<programlisting>
-gmake check NO_LOCALE=1
+make check NO_LOCALE=1
</programlisting>
When running the tests against an existing installation, the
locale setup is determined by the existing installation. To
A typical workflow would look like this:
<screen>
./configure --enable-coverage ... OTHER OPTIONS ...
-gmake
-gmake check # or other test suite
-gmake coverage-html
+make
+make check # or other test suite
+make coverage-html
</screen>
Then point your HTML browser
to <filename>coverage/index.html</filename>.
- The <command>gmake</command> commands also work in subdirectories.
+ The <command>make</command> commands also work in subdirectories.
</para>
<para>
To reset the execution counts between test runs, run:
<screen>
-gmake coverage-clean
+make coverage-clean
</screen>
</para>
</sect1>
<listitem>
<para>
- Support <command>gmake draft</command> when building the
+ Support <command>make draft</command> when building the
<acronym>SGML</> documentation (Bruce)
</para>
</para>
<para>
- Use <command>gmake STYLE=website draft</>.
+ Use <command>make STYLE=website draft</>.
</para>
</listitem>
* USE_xxx_SEMAPHORES and USE_xxx_SHARED_MEMORY settings you want.
* Also, adjust the pg_sema.c and pg_shmem.c symlinks in
* src/backend/port/ if needed.
- * 2. In src/backend/port/, do "gmake ipc_test".
+ * 2. In src/backend/port/, do "make ipc_test".
* 3. Run ipc_test and see if it works.
* 4. If it seems to work, try building the whole system and running
* the parallel regression tests for a more complete test.
SUBDIRS = include pgtypeslib ecpglib compatlib preproc
-# Suppress parallel build of subdirectories to avoid a bug in gmake 3.82, cf
+# Suppress parallel build of subdirectories to avoid a bug in GNU make 3.82, cf
# http://savannah.gnu.org/bugs/?30653
# https://bugzilla.redhat.com/show_bug.cgi?id=835424
# (There are some other parallelism bugs in the subdirectory makefiles
keywords.o c_keywords.o ecpg_keywords.o kwlookup.o ../ecpglib/typename.o descriptor.o variable.o \
$(WIN32RES)
-# Suppress parallel build to avoid a bug in gmake 3.82
+# Suppress parallel build to avoid a bug in GNU make 3.82
# (see comments in ../Makefile)
ifeq ($(MAKE_VERSION),3.82)
.NOTPARALLEL:
PL/Perl allows you to write PostgreSQL functions and procedures in
Perl. To include PL/Perl in the build use './configure --with-perl'.
-To build from this directory use 'gmake all; gmake install'. libperl
+To build from this directory use 'make all; make install'. libperl
must have been built as a shared library, which is usually not the
case in standard installations.
To run the tests, you need to have a server running at the default port
expected by libpq. (You can set PGPORT and so forth in your environment
to control this.) Then run
- gmake installcheck
+ make installcheck
To run just specific test(s), you can do something like
./pg_isolation_regress fk-contention fk-deadlock
(look into the specs/ subdirectory to see the available tests).
The prepared-transactions test requires the server's
max_prepared_transactions parameter to be set to at least 3; therefore it
is not run by default. To include it in the test run, use
- gmake installcheck-prepared-txns
+ make installcheck-prepared-txns
To define tests with overlapping transactions, we use test specification
files with a custom syntax, which is described in the next section. To add
collating.
To run a test for some locale run
- gmake check-$locale
+ make check-$locale
for example
- gmake check-koi8-r
+ make check-koi8-r
Currently, there are only tests for a few locales available. The script
'runall' calls test-ctype to test libc and locale data, test-sort.pl
# efficient available query plans! Have patience.
-# Select make to use --- default gmake, can be overridden by env var
-MAKE="${MAKE:-gmake}"
+# Select make to use --- default 'make', can be overridden by env var
+MAKE="${MAKE:-make}"
# If PGOPTIONS is already defined, we'll add the -f switches to it.
PGOPTIONS="${PGOPTIONS:-}"
# We could do this test in the action section:
# $(if $(ZIC),$(ZIC),./zic)
-# but gmake versions <= 3.78.1 or perhaps later have a bug
-# that causes a segfault; gmake 3.81 or later fixes this.
+# but GNU make versions <= 3.78.1 or perhaps later have a bug
+# that causes a segfault; GNU make 3.81 or later fixes this.
ifeq (,$(ZIC))
ZIC= ./zic
endif
These need to be changed whenever new abbreviations are invented or the
UTC offset associated with an existing abbreviation changes. To detect
if this has happened, after installing new files under data/ do
- gmake abbrevs.txt
+ make abbrevs.txt
which will produce a file showing all abbreviations that are in current
use according to the data/ files. Compare this to known_abbrevs.txt,
which is the list that existed last time the tznames/ files were updated.
4) Remove all derived files (pgindent has trouble with one of the flex macros):
- gmake maintainer-clean
+ make maintainer-clean
Or:
# stop is only necessary if it's going to install in a location with an
# already running server
pg_ctl stop
- gmake -C src install
- gmake -C contrib install
+ make -C src install
+ make -C contrib install
pg_ctl start
- gmake installcheck-world
+ make installcheck-world
10) Remove Perl backup files after testing
#
# By default, this builds against an existing PostgreSQL installation
# (the one identified by whichever pg_config is first in your path).
-# Within a configured source tree, you can say "gmake NO_PGXS=1 all"
+# Within a configured source tree, you can say "make NO_PGXS=1 all"
# to build using the surrounding source tree.
#
# IDENTIFICATION
% make
to compile all the scripts and C files for the user-defined functions
and types. (make needs to be GNU make --- it may be named something
-different on your system, often gmake)
+different on your system, often 'gmake')
Then, run psql with the -s (single-step) flag:
% psql -s