./configure
-gmake
+make
su
-gmake install
+make install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
GNU> make> version 3.80 or newer is required; other
make> programs or older GNU> make> versions will not> work.
-
GNU> make> is often installed under
- the name gmake; this document will always
- refer to it by that name. (On some systems
-
GNU make> is the default tool with the name
-
make>.) To test for GNU
+ (
GNU> make> is sometimes installed under
+ the name
gmake.) To test for
GNU
-gmake --version
+make --version
mkdir build_dir
cd build_dir
/path/to/source/tree/configure [options go here]
-gmake
+make
source code lines. If you get confused while trying to debug
optimized code, recompile the specific files of interest with
- to
make>: gmake PROFILE=-O0 file.o>.
+ to
make>: make PROFILE=-O0 file.o>.
To start the build, type:
-gmake
+make
(Remember to use
GNU> make>.) The build
will take a few minutes depending on your
documentation (HTML and man pages), and the additional modules
(contrib), type instead:
-gmake world
+make world
The last line displayed should be:
runs on your machine in the way the developers expected it
to. Type:
-gmake check
+make check
(This won't work as root; do it as an unprivileged user.)
To install
PostgreSQL> enter:
-gmake install
+make install
This will install files into the directories that were specified
in . Make sure that you have appropriate
To install the documentation (HTML and man pages), enter:
-gmake install-docs
+make install-docs
If you built the world above, type instead:
-gmake install-world
+make install-world
This also installs the documentation.
- You can use gmake install-strip instead of
- gmake install to strip the executable files and
+ You can use make install-strip instead of
+ make install 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
PostgreSQL> 8.0, a separate gmake
+ (Prior to
PostgreSQL> 8.0, a separate make
install-all-headers> command was needed for the latter, but this
step has been folded into the standard install.)
If you want to install only the client applications and
interface libraries, then you can use these commands:
-gmake -C src/bin install>
-gmake -C src/include install>
-gmake -C src/interfaces install>
-gmake -C doc install>
+make -C src/bin install>
+make -C src/include install>
+make -C src/interfaces install>
+make -C doc install>
src/bin> has a few binaries for server-only use,
but they are small.
Uninstallation:
- To undo the installation use the command gmake
+ To undo the installation use the command make
uninstall>. However, this will not remove any created directories.
After the installation you can free disk space by removing the built
- files from the source tree with the command gmake
+ files from the source tree with the command make
clean>. This will preserve the files made by the configure
- program, so that you can rebuild everything with gmake>
+ program, so that you can rebuild everything with make>
later on. To reset the source tree to the state in which it was
- distributed, use gmake distclean>. If you are going to
+ distributed, use 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 configure>
options were wrong, or if you change anything that configure>
investigates (for example, software upgrades), then it's a good
- idea to do gmake distclean> before reconfiguring and
+ idea to do make distclean> before reconfiguring and
rebuilding. Without this, your changes in configuration choices
might not propagate everywhere they need to.
Run the regression tests against the installed server (using
- gmake installcheck). If you didn't run the
+ make installcheck). If you didn't run the
tests before installation, you should definitely do it now. This
is also explained in the documentation.
-
- The GNU make command is called make, not gmake.
-
-
-
The adduser command is not supported; use
You need to use the GNU Make program, which is on the Skunkware
CD. By default, it installs
- as /usr/local/bin/make. To avoid confusion
- with the SCO make program, you may want to rename GNU make to
- gmake.
+ as /usr/local/bin/make.
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
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:
-gmake init-po
+make init-po
This will create a file
progname.pot.
changed or added by the programmers. In this case you do not need
to start from scratch. Instead, run the command:
-gmake update-po
+make update-po
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 prefix variable:
-gmake prefix=/usr/local/pgsql.new install
+make prefix=/usr/local/pgsql.new install
To run the parallel regression tests after building but before installation,
type:
-gmake check
+make check
in the top-level directory. (Or you can change to
src/test/regress and run the command there.)
root# chmod -R a+w src/test/regress
joeuser$ cd top-level build directory>
(The only possible security risk
here is that other
users might be able to alter the regression test results behind
If you have configured
PostgreSQL to install
into a location where an older
PostgreSQL
- installation already exists, and you perform gmake check>
+ installation already exists, and you perform 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 MAX_CONNECTIONS> parameter. For example:
-gmake MAX_CONNECTIONS=10 check
+make MAX_CONNECTIONS=10 check
runs no more than ten tests concurrently.
initialize a data area and start the
server, , ]]> then type:
-gmake installcheck
+make installcheck
or for a parallel test:
-gmake installcheck-parallel
+make installcheck-parallel
The tests will expect to contact the server at the local host and the
default port number, unless directed otherwise by PGHOST and
built and installed, change to the src/pl> directory of the
build tree and type:
-gmake installcheck
+make installcheck
You can also do this in any of the subdirectories of src/pl>
to run tests for just one procedural language. To run the tests for all
contrib> modules that have them, change to the
contrib> directory of the build tree and type:
-gmake installcheck
+make installcheck
The contrib> modules must have been built and installed first.
You can also do this in a subdirectory of contrib> to run
directory:
cd src/test/regress
-gmake standbycheck
+make standbycheck
can be useful to test different locales by setting the appropriate
environment variables, for example:
-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
For implementation reasons, setting LC_ALL does not
work for this purpose; all the other locale-related environment
You can also choose the database encoding explicitly by setting
the variable ENCODING, for example:
-gmake check LANG=C ENCODING=EUC_JP
+make check LANG=C ENCODING=EUC_JP
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 EXTRA_TESTS. For
example, to run the numeric_big test:
-gmake check EXTRA_TESTS=numeric_big
+make check EXTRA_TESTS=numeric_big
To run the collation tests:
-gmake check EXTRA_TESTS=collate.linux.utf8 LANG=en_US.utf8
+make check EXTRA_TESTS=collate.linux.utf8 LANG=en_US.utf8
The 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 make command line, for example:
-gmake check LANG=de_DE.utf8
+make check LANG=de_DE.utf8
(The regression test driver unsets LC_ALL, so it
does not work to choose the locale using that variable.) To use
(or set them to C) or use the following
special invocation:
-gmake check NO_LOCALE=1
+make check NO_LOCALE=1
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:
./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
Then point your HTML browser
to coverage/index.html.
- The gmake commands also work in subdirectories.
+ The make commands also work in subdirectories.
To reset the execution counts between test runs, run:
-gmake coverage-clean
+make coverage-clean
- Support gmake draft when building the
+ Support make draft when building the
SGML> documentation (Bruce)
- Use gmake STYLE=website draft>.
+ Use make STYLE=website draft>.
* 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