Re: Should contrib modules install .h files?

Andrew Gierth <andrew@tao11.riddles.org.uk>

From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>, Peter Geoghegan <pg@bowt.ie>, Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2018-08-05T22:03:37Z
Lists: pgsql-hackers

Attachments

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

 >> This logic could perhaps be best moved into the pgxs makefile
 >> itself, either unconditionally adding -I options to CPPFLAGS, or
 >> conditionally adding them based on a WANT_EXTENSION_HEADERS flag of
 >> some sort set by the module makefile.

 Tom> I think we'd want to press forward on making that happen, so that
 Tom> hstore_plperl and friends can serve as copy-and-pasteable
 Tom> prototype code for out-of-tree transform modules. Do you have an
 Tom> idea how to fix the other problem you mentioned with the plpython
 Tom> makefiles?

Here's a patch that fixes (not necessarily in the best way) the PGXS
builds of all the contrib/*_pl{perl,python} modules.

Open questions:

 - is there a better way of doing the conditional setting of
   PG_CPPFLAGS?

 - the choice of which .h files to install from plperl and plpython is
   not principled - I just installed the ones needed for the contrib
   modules to work. Particularly for plpython this list needs to be
   reviewed - but I'm not a pythonist and that should be done by someone
   who is.

-- 
Andrew (irc:RhodiumToad)

Commits

  1. Fix out-of-tree build for transform modules.

  2. Provide for contrib and pgxs modules to install include files.