Index: Makefile =================================================================== --- Makefile (revision 5023) +++ Makefile (working copy) @@ -1,11 +1,15 @@ -subdir = contrib/admin81 -top_builddir = ../.. -include $(top_builddir)/src/Makefile.global - MODULE_big = admin81 PG_CPPFLAGS = -I$(libpq_srcdir) DATA_built = admin81.sql DOCS = README.admin81 OBJS = admin81.o +ifdef USE_PGXS +PGXS := $(shell pg_config --pgxs) +include $(PGXS) +else +subdir = contrib/admin81 +top_builddir = ../.. +include $(top_builddir)/src/Makefile.global include $(top_srcdir)/contrib/contrib-global.mk +endif Index: README.admin81 =================================================================== --- README.admin81 (revision 5023) +++ README.admin81 (working copy) @@ -11,11 +11,18 @@ ============ You will need a PostgreSQL source tree which has been properly configured -for the local system using the 'configure' script. +for the local system using the 'configure' script, or you can use PGXS +which does not require the full source tree. -Copy this directory into the /contrib directory of the PostgreSQL source tree, -and then run the following commands as a users with appropriate privileges: +To install using PGXS simply run the following commands in this directory: +make USE_PGXS=1 +make USE_PGXS=1 install + +Otherwise, copy this directory into the /contrib directory of the PostgreSQL +source tree, and then run the following commands as a user with appropriate +privileges: + make make install