Re: pgxs - Mailing list pgadmin-hackers

From August Zajonc
Subject Re: pgxs
Date
Msg-id 43FB6F1B.4090604@augustz.com
Whole thread Raw
In response to Re: pgxs  ("Dave Page" <dpage@vale-housing.co.uk>)
List pgadmin-hackers
Dave Page wrote:
>> >>
>> >> A quick question. The makefile for the /contrib adminpacks doesn't
>> >> appear to use pgxs?
>> >>
> >
> > Y'know, I coulda sworn it was, but clearly that is not the case.
> >
> > Please feel free to fix it  :-)
> >

It's close. This works for me, but PLEASE test, as I just did a quick
pass at it. This adds PGXS as an option, so shouldn't disrupt existing uses.

Feedback welcome, hope it's helpful.

- August


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


pgadmin-hackers by date:

Previous
From: svn@pgadmin.org
Date:
Subject: SVN Commit by dpage: r5023 - trunk/pgadmin3/src
Next
From: svn@pgadmin.org
Date:
Subject: SVN Commit by dpage: r5024 - in trunk/pgadmin3: . xtra/admin xtra/admin81