Re: Frustrating issue with PGXS

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: Frustrating issue with PGXS
Дата
Msg-id Pine.LNX.4.64.0706251947020.8775@briare.cri.ensmp.fr
обсуждение исходный текст
Ответ на Re: Frustrating issue with PGXS  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> ifdef USE_PGXS
> PGXS := $(shell pg_config --pgxs)
> include $(PGXS)
>
> but something like
>
> ifdef USE_PGXS
> PG_CONFIG := pg_config
> PGXS := $(shell $(PG_CONFIG) --pgxs)
> include $(PGXS)
>
> to sync these invocations of pg_config with the ones in
> Makefile.global.  I'm not sure though how to get this setting to
> override the one in Makefile.global ... or should we just remove
> that one?

That would break existing Makefiles that use the "please take the first 
pg_config in the path" feature, which rather make sense (it just means 
that you want the extension for your current postgresql).

However you may replace the other appearance with the following:

ifndef PG_CONFIG
PG_CONFIG    = pg_config
endif

So as to enable
    sh> make PG_CONFIG=/my/manual/path/to/pg_config install

invocations without fear to be overwritten, if some people do not like the 
path convention. Otherwise the following does the trick with a temporary 
replacement of the PATH environment variable just for one command under 
sh-compatible shells:
    sh> PATH=/my/manual/path/to:$PATH make install

and is shorter. This could be added to the documentation.

-- 
Fabien.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Frustrating issue with PGXS
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: Frustrating issue with PGXS