Re: question on 8.4.2 build postgres C functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Steve Coleman <scoleman(at)capecomputing(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: question on 8.4.2 build postgres C functions
Date: 2010-03-09 17:56:26
Message-ID: 24030.1268157386@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Steve Coleman <scoleman(at)capecomputing(dot)com> writes:
>> My problem is that 8.4.2 source has no "Makefile.global". This file is essential I believe, and is used by all of the Makefiles in the source tarball.

> Makefile.global is created by the configure step. This has not changed
> since 8.1.

On second thought, I got too immersed in answering the question you
asked, and failed to answer the uber-question which is whether there's
a better way to do it. Yes: use pgxs. Then you don't need a
configured source tree at all, and everything you do need should
come in pre-built installations.

If you started by copying a contrib makefile then you should have a
block like

ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/auto_explain
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif

You could use this as-is by always typing "make USE_PGXS=1", but
what I'd suggest is dropping the ifdef and the else block so that
pgxs becomes the default. Contrib modules have this so they can
be built either way, but you don't really need that flexibility
for a private module.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-03-09 18:00:42 Re: Update view/table rule order of operations or race condition
Previous Message Dan Fitzpatrick 2010-03-09 17:42:26 Re: Update view/table rule order of operations or race condition