pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Allow extensions to install built as well as unbuilt headers.
10+ messages / 4 participants
[nested] [flat]

* pgsql: Allow extensions to install built as well as unbuilt headers.
@ 2018-09-05 21:45  Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 10+ messages in thread

From: Andrew Gierth @ 2018-09-05 21:45 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Allow extensions to install built as well as unbuilt headers.

Commit df163230b overlooked the case that an out-of-tree extension
might need to build its header files (e.g. via ./configure). If it is
also doing a VPATH build, the HEADERS_* rules in the original commit
would then fail to find the files, since they would be looking only
under $(srcdir) and not in the build directory.

Fix by adding HEADERS_built and HEADERS_built_$(MODULE) which behave
like DATA_built in that they look in the build dir rather than the
source dir (and also make the files dependencies of the "all" target).

No Windows support appears to be needed for this, since it is only
relevant to out-of-tree builds (no support exists in Mkvcbuild.pm to
build extension header files in any case).

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/235526a20a2efb199c4138c5d793260ce37d7231

Modified Files
--------------
doc/src/sgml/extend.sgml | 16 +++++++++++++---
src/makefiles/pgxs.mk    | 49 +++++++++++++++++++++++++++++++++++++++---------
2 files changed, 53 insertions(+), 12 deletions(-)



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* pgsql: Allow extensions to install built as well as unbuilt headers.
@ 2018-09-05 21:45  Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 1 reply; 10+ messages in thread

From: Andrew Gierth @ 2018-09-05 21:45 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Allow extensions to install built as well as unbuilt headers.

Commit df163230b overlooked the case that an out-of-tree extension
might need to build its header files (e.g. via ./configure). If it is
also doing a VPATH build, the HEADERS_* rules in the original commit
would then fail to find the files, since they would be looking only
under $(srcdir) and not in the build directory.

Fix by adding HEADERS_built and HEADERS_built_$(MODULE) which behave
like DATA_built in that they look in the build dir rather than the
source dir (and also make the files dependencies of the "all" target).

No Windows support appears to be needed for this, since it is only
relevant to out-of-tree builds (no support exists in Mkvcbuild.pm to
build extension header files in any case).

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/be54b3777ff189e79661d8746d3f25b0564393d2

Modified Files
--------------
doc/src/sgml/extend.sgml | 16 +++++++++++++---
src/makefiles/pgxs.mk    | 49 +++++++++++++++++++++++++++++++++++++++---------
2 files changed, 53 insertions(+), 12 deletions(-)



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: pgsql: Allow extensions to install built as well as unbuilt headers.
@ 2018-09-06 05:16  Michael Paquier <michael@paquier.xyz>
  parent: Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 1 reply; 10+ messages in thread

From: Michael Paquier @ 2018-09-06 05:16 UTC (permalink / raw)
  To: Andrew Gierth <rhodiumtoad@postgresql.org>; +Cc: pgsql-committers; Postgres hackers <pgsql-hackers@postgresql.org>

Hi Andrew,

On Wed, Sep 05, 2018 at 09:45:49PM +0000, Andrew Gierth wrote:
> Allow extensions to install built as well as unbuilt headers.
> 
> Commit df163230b overlooked the case that an out-of-tree extension
> might need to build its header files (e.g. via ./configure). If it is
> also doing a VPATH build, the HEADERS_* rules in the original commit
> would then fail to find the files, since they would be looking only
> under $(srcdir) and not in the build directory.
> 
> Fix by adding HEADERS_built and HEADERS_built_$(MODULE) which behave
> like DATA_built in that they look in the build dir rather than the
> source dir (and also make the files dependencies of the "all" target).
> 
> No Windows support appears to be needed for this, since it is only
> relevant to out-of-tree builds (no support exists in Mkvcbuild.pm to
> build extension header files in any case).

prairiedog is unhappy with this commit:
make -C ../../../contrib/spi
../../src/makefiles/pgxs.mk:140: Extraneous text after `else' directive
../../src/makefiles/pgxs.mk:144: *** only one `else' per conditional.
Stop.
make[2]: *** [submake-contrib-spi] Error 2
make[2]: *** Waiting for unfinished jobs....
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prairiedog&dt=2018-09-05%2023%3A21%3A01
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: pgsql: Allow extensions to install built as well as unbuilt headers.
@ 2018-09-06 05:26  Andrew Gierth <andrew@tao11.riddles.org.uk>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 2 replies; 10+ messages in thread

From: Andrew Gierth @ 2018-09-06 05:26 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-committers; Postgres hackers <pgsql-hackers@postgresql.org>

>>>>> "Michael" == Michael Paquier <michael@paquier.xyz> writes:

 Michael> prairiedog is unhappy with this commit:

What version of GNU Make is on there, do you know? Tom? I don't see it
mentioned in the output anywhere.

-- 
Andrew.




^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: pgsql: Allow extensions to install built as well as unbuilt headers.
@ 2018-09-06 05:52  Michael Paquier <michael@paquier.xyz>
  parent: Andrew Gierth <andrew@tao11.riddles.org.uk>
  1 sibling, 1 reply; 10+ messages in thread

From: Michael Paquier @ 2018-09-06 05:52 UTC (permalink / raw)
  To: Andrew Gierth <andrew@tao11.riddles.org.uk>; +Cc: pgsql-committers; Postgres hackers <pgsql-hackers@postgresql.org>

On Thu, Sep 06, 2018 at 06:26:51AM +0100, Andrew Gierth wrote:
> What version of GNU Make is on there, do you know? Tom? I don't see it
> mentioned in the output anywhere.

I don't know it.  What I can see is that the use of "else ifdef" is
forbidden.  You could bypass the problem with more ifdef-only tweaks,
but it seems to me that it would be cleaner to somewhat reduce the level
of dependency between all the different header concepts.

By the way, when you use at least two layers in ifdef/endif in pgxs.mk,
putting a comment close to the endif to mention which part gets closed
improves readability.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: pgsql: Allow extensions to install built as well as unbuilt headers.
@ 2018-09-06 06:09  Andrew Gierth <andrew@tao11.riddles.org.uk>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 10+ messages in thread

From: Andrew Gierth @ 2018-09-06 06:09 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-committers; Postgres hackers <pgsql-hackers@postgresql.org>

>>>>> "Michael" == Michael Paquier <michael@paquier.xyz> writes:

 >> What version of GNU Make is on there, do you know? Tom? I don't see
 >> it mentioned in the output anywhere.

 Michael> I don't know it.

Consulting old manuals suggests it may have version 3.80 (c. 2002),
which lacks the 'else if..' syntax introduced in 3.81 (c. 2006).

-- 
Andrew (irc:RhodiumToad)




^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: pgsql: Allow extensions to install built as well as unbuilt headers.
@ 2018-09-06 13:38  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Andrew Gierth <andrew@tao11.riddles.org.uk>
  1 sibling, 0 replies; 10+ messages in thread

From: Tom Lane @ 2018-09-06 13:38 UTC (permalink / raw)
  To: Andrew Gierth <andrew@tao11.riddles.org.uk>; +Cc: Michael Paquier <michael@paquier.xyz>; pgsql-committers; Postgres hackers <pgsql-hackers@postgresql.org>

Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> "Michael" == Michael Paquier <michael@paquier.xyz> writes:
>  Michael> prairiedog is unhappy with this commit:

> What version of GNU Make is on there, do you know? Tom? I don't see it
> mentioned in the output anywhere.

$ make -v
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: pgsql: Allow extensions to install built as well as unbuilt headers.
@ 2018-09-06 13:41  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Andrew Gierth <andrew@tao11.riddles.org.uk>
  0 siblings, 1 reply; 10+ messages in thread

From: Tom Lane @ 2018-09-06 13:41 UTC (permalink / raw)
  To: Andrew Gierth <andrew@tao11.riddles.org.uk>; +Cc: Michael Paquier <michael@paquier.xyz>; pgsql-committers; Postgres hackers <pgsql-hackers@postgresql.org>

Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> Consulting old manuals suggests it may have version 3.80 (c. 2002),
> which lacks the 'else if..' syntax introduced in 3.81 (c. 2006).

Right; I haven't updated it because that's specifically called out to
be the minimum supported version in our docs (cf installation.sgml).

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: pgsql: Allow extensions to install built as well as unbuilt headers.
@ 2018-09-06 16:18  Andrew Gierth <andrew@tao11.riddles.org.uk>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 10+ messages in thread

From: Andrew Gierth @ 2018-09-06 16:18 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Michael Paquier <michael@paquier.xyz>; pgsql-committers; Postgres hackers <pgsql-hackers@postgresql.org>

>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 > Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
 >> Consulting old manuals suggests it may have version 3.80 (c. 2002),
 >> which lacks the 'else if..' syntax introduced in 3.81 (c. 2006).

 Tom> Right; I haven't updated it because that's specifically called out to
 Tom> be the minimum supported version in our docs (cf installation.sgml).

Yeah; I checked the other constructs I used for what version they were
added in, but that one slipped through. Fix coming shortly.

-- 
Andrew (irc:RhodiumToad)




^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: pgsql: Allow extensions to install built as well as unbuilt headers.
@ 2018-09-07 20:52  Michael Paquier <michael@paquier.xyz>
  parent: Andrew Gierth <andrew@tao11.riddles.org.uk>
  0 siblings, 0 replies; 10+ messages in thread

From: Michael Paquier @ 2018-09-07 20:52 UTC (permalink / raw)
  To: Andrew Gierth <andrew@tao11.riddles.org.uk>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers; Postgres hackers <pgsql-hackers@postgresql.org>

On Thu, Sep 06, 2018 at 05:18:10PM +0100, Andrew Gierth wrote:
> Yeah; I checked the other constructs I used for what version they were
> added in, but that one slipped through. Fix coming shortly.

For the sake of the archives, Andrew has pushed 7b6b167 to address the
issue, which looks fine at quick glance.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 10+ messages in thread


end of thread, other threads:[~2018-09-07 20:52 UTC | newest]

Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05 21:45 pgsql: Allow extensions to install built as well as unbuilt headers. Andrew Gierth <rhodiumtoad@postgresql.org>
2018-09-06 05:16 ` Michael Paquier <michael@paquier.xyz>
2018-09-06 05:26   ` Andrew Gierth <andrew@tao11.riddles.org.uk>
2018-09-06 05:52     ` Michael Paquier <michael@paquier.xyz>
2018-09-06 06:09       ` Andrew Gierth <andrew@tao11.riddles.org.uk>
2018-09-06 13:41         ` Tom Lane <tgl@sss.pgh.pa.us>
2018-09-06 16:18           ` Andrew Gierth <andrew@tao11.riddles.org.uk>
2018-09-07 20:52             ` Michael Paquier <michael@paquier.xyz>
2018-09-06 13:38     ` Tom Lane <tgl@sss.pgh.pa.us>
2018-09-05 21:45 pgsql: Allow extensions to install built as well as unbuilt headers. Andrew Gierth <rhodiumtoad@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox