Skip to content

Commit

Permalink
No longer require USE_PGXS=1 when built outside contrib.
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Mar 15, 2010
1 parent 8c0ee6a commit 400db6d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
3 changes: 3 additions & 0 deletions Changes
Expand Up @@ -24,6 +24,9 @@ Revision history for pgTAP
* Removed the primary keys from the temporary tables used internally by pgTAP
and thus eliminated the logging of NOTICEs to the PostgreSQL log when pgTAP
creates those tables.
* Eliminated the need to set `USE_PGXS=1` when building outsde the contrib
directory of the PostgreSQL distribution, though it will still be respected
if it is set.

0.23 2009-12-18T23:03:39
-------------------------
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Expand Up @@ -8,12 +8,18 @@ REGRESS_OPTS = --load-language=plpgsql

# Figure out where pg_config is, and set other vars we'll need depending on
# whether or not we're in the source tree.

ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
else
ifeq (exists, $(shell [ -e ../../src/bin/pg_config/pg_config ] && echo exists) )
top_builddir = ../..
PG_CONFIG := $(top_builddir)/src/bin/pg_config/pg_config
else
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
endif
endif

# We need to do various things with various versions of PostgreSQL.
Expand Down
22 changes: 9 additions & 13 deletions README.pgtap
Expand Up @@ -11,9 +11,9 @@ Installation

For the impatient, to install pgTAP into a PostgreSQL database, just do this:

make USE_PGXS=1
make install USE_PGXS=1
make installcheck USE_PGXS=1
make
make install
make installcheck

If you encounter an error such as:

Expand All @@ -22,9 +22,9 @@ If you encounter an error such as:
You need to use GNU make, which may well be installed on your system as
'gmake':

gmake USE_PGXS=1
gmake install USE_PGXS=1
gmake installcheck USE_PGXS=1
gmake
gmake install
gmake installcheck

If you encounter an error such as:

Expand All @@ -39,12 +39,11 @@ package management system such as RPM to install PostgreSQL, be sure that the
`-devel` package is also installed. If necessary, add the path to `pg_config`
to your `$PATH` environment variable:

env PATH=$PATH:/path/to/pgsql/bin USE_PGXS=1 \
env PATH=$PATH:/path/to/pgsql/bin \
make && make install && make installcheck

And finally, if all that fails, copy the entire distribution directory to the
`contrib/` subdirectory of the PostgreSQL source tree and try it there without
the `$USE_PGXS` variable:
`contrib/` subdirectory of the PostgreSQL source tree and try it there:

make
make install
Expand Down Expand Up @@ -86,10 +85,7 @@ PostgreSQL client environment variables:

You can use it to run the test suite as a database super user like so:

make test USE_PGXS=1 PGUSER=postgres

Of course, if you're running the tests from the `contrib/` directory, you
should omit the `USE_PGXS` variable.
make test PGUSER=postgres

Adding pgTAP to a Database
--------------------------
Expand Down

0 comments on commit 400db6d

Please sign in to comment.