Re: [PATCH] Support built control file in PGXS VPATH builds

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Support built control file in PGXS VPATH builds
Date: 2020-04-09 03:54:06
Message-ID: CAMsr+YGjg6_H9VJLy-9o8sBH5qi0fAir49LO7NK4-od2ZcGWbw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 30 Mar 2020 at 11:50, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:

>
>
> On Mon, 9 Mar 2020, 17:27 Peter Eisentraut, <
> peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
>
>> On 2020-02-07 04:14, Craig Ringer wrote:
>> > The attached patch fixes this by having PGXS resolve
>> > $(EXTENSION).control along the VPATH.
>>
>> Simpler patch:
>>
>> diff --git a/src/makefiles/pgxs.mk b/src/makefiles/pgxs.mk
>> index 271e7eaba8..1cd750eecd 100644
>> --- a/src/makefiles/pgxs.mk
>> +++ b/src/makefiles/pgxs.mk
>> @@ -229,7 +229,7 @@ endif # MODULE_big
>>
>> install: all installdirs
>> ifneq (,$(EXTENSION))
>> - $(INSTALL_DATA) $(addprefix $(srcdir)/, $(addsuffix .control,
>> $(EXTENSION))) '$(DESTDIR)$(datadir)/extension/'
>> + $(INSTALL_DATA) $(call vpathsearch,$(addsuffix .control,
>> $(EXTENSION))) '$(DESTDIR)$(datadir)/extension/'
>> endif # EXTENSION
>> ifneq (,$(DATA)$(DATA_built))
>> $(INSTALL_DATA) $(addprefix $(srcdir)/, $(DATA)) $(DATA_built)
>> '$(DESTDIR)$(datadir)/$(datamoduledir)/'
>>
>> Does that work for you?
>>
>
> It wouldn't be my preference because it relies on the VPATH variable.
> AFAICS the extension cannot use finer grained vpath directives for this.
> And if anything relies on VPATH it must be set so you can't really benefit
> from vpath directives for anything else.
>

Any thoughts here? I'd like to get it merged if possible and I hope my
explanation of why I did it that way clears things up.

--
Craig Ringer http://www.2ndQuadrant.com/
2ndQuadrant - PostgreSQL Solutions for the Enterprise

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2020-04-09 03:59:43 Re: Planning counters in pg_stat_statements (using pgss_store)
Previous Message Michael Paquier 2020-04-09 03:40:35 Re: Report error position in partition bound check