Re: Extensions, this time with a patch

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Extensions, this time with a patch
Дата
Msg-id 1287200054-sup-247@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Extensions, this time with a patch  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Extensions, this time with a patch  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Список pgsql-hackers
Excerpts from Alvaro Herrera's message of sáb oct 16 00:30:41 -0300 2010:

> Hmm, did you try "make install" in contrib?  It fails for me in intagg:
> 
> make[1]: Entering directory `/home/alvherre/Code/CVS/pgsql/build/HEAD/contrib/intagg'
> /bin/mkdir -p '/pgsql/install/HEAD/share/contrib'
> touch .control
> test ! -f .control && echo "name = '' \nversion = '9.1'" > .control
> make[1]: *** [.control] Error 1
> make[1]: *** Deleting file `.control'
> make[1]: Leaving directory
> `/home/alvherre/Code/CVS/pgsql/build/HEAD/contrib/intagg'
> make: *** [install] Error 2

Oh, I see what's going on here ... you have this bit in pgxs.mk:

# create extension support
ifndef CONTROL
ifdef MODULE_big
CONTROL = $(MODULE_big).control
EXTENSION = $(MODULE_big)
else
CONTROL = $(MODULES).control
EXTENSION = $(MODULES)
endif
endif

The reason it fails for intagg is that it doesn't define MODULE_big, so
it takes the other path.  But since MODULES is not defined either, this
ends up defining CONTROL as ".control"; and then "test" returns a
failure because a file with the same name has been created in the
previous line.

I don't think the MODULES bit works either; see the spi contrib for an
example.  What it ends up doing is probably not what you want.

Maybe what you should be doing here is that modules should provide
another definition, say EXTENSION, and they have to explicitely define
it in their Makefile (maybe require EXTENSION_VERSION too or something
like that).  I think the idea that modules should continue to work as
extensions without any modification is doomed.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Extensions, this time with a patch
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Extensions, this time with a patch