Re: PostgreSQL 9.3 beta breaks some extensions "make install"

Поиск
Список
Период
Сортировка
От Cédric Villemain
Тема Re: PostgreSQL 9.3 beta breaks some extensions "make install"
Дата
Msg-id 201306021553.35477.cedric@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: PostgreSQL 9.3 beta breaks some extensions "make install"  (Cédric Villemain <cedric@2ndquadrant.com>)
Список pgsql-hackers
Le mardi 28 mai 2013 15:15:55, Cédric Villemain a écrit :
> Le samedi 25 mai 2013 16:41:24, Cédric Villemain a écrit :
> > > > If it seems to be on the right way, I'll keep fixing EXTENSION
> > > > building with VPATH.
> > >
> > > I haven't tried the patch, but let me just say that Debian (and
> > > apt.postgresql.org) would very much like the VPATH situation getting
> > > improved. At the moment we seem to have to invent a new build recipe
> > > for every extension around.
>
> Attached patch adds support for VPATH with USE_PGXS
> It just change recipe for install: in pgxs.mk.
>
> I am unsure automatic variables can be used this way with all UNIX
> variation of make...
>
> I also didn't touch MODULE and PROGRAM (yet)

This patch can also be seen as a bugfix.
The problem is that in case like this one:
===
FOO=bar.control
installcontrol: $(FOO)$(INSTALL_DATA)  $(FOO) \                                 '$(DESTDIR)$(datadir)/extension/'
===

INSTALL_DATA will install the file defined by FOO (=bar.control).

But in the next case (the fix):
===
FOO=bar.control
installcontrol: $(FOO)$(INSTALL_DATA) $< '$(DESTDIR)$(datadir)/extension/'
===

the $< contains the *filepath* where 'make' found the FOO file.
I believe it is because recipes are read once target and prerequisite are set,
so $< contains the full path to FOO, but FOO will still contain exactly what
has been assigned to FOO.

I choose to add targets for the variables that can be set when using PGXS. And
say 'install:' target to depends on each.

Maybe there is a smarter way to do it... my skills in Makefile are limited.

So far the feedback is good for the set of patches: pg_buildext (the debian
postgresql builder tool) is still working as expected and can be simplified. I
can build each contrib provided with PostgreSQL and some others have been
tried (like plr).
IMHO this is mostly bugfixing and it just outline that we can support VPATH and
PGXS build at the same time.

--
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation

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

Предыдущее
От: Cédric Villemain
Дата:
Сообщение: Re: PostgreSQL 9.3 beta breaks some extensions "make install"
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: [PATCH] pg_isready (was: [WIP] pg_ping utility)