Re: question on 8.4.2 build postgres C functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: question on 8.4.2 build postgres C functions
Дата
Msg-id 24030.1268157386@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: question on 8.4.2 build postgres C functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane <tgl@sss.pgh.pa.us> writes:
> Steve Coleman <scoleman@capecomputing.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
theMakefiles 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Dan Fitzpatrick
Дата:
Сообщение: Re: Update view/table rule order of operations or race condition
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Update view/table rule order of operations or race condition