1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-26 12:21:12 +03:00

Provide for contrib and pgxs modules to install include files.

This allows out-of-tree PLs and similar code to get access to
definitions needed to work with extension data types.

The following existing modules now install headers: contrib/cube,
contrib/hstore, contrib/isn, contrib/ltree, contrib/seg.

Discussion: https://postgr.es/m/87y3euomjh.fsf%40news-spur.riddles.org.uk
This commit is contained in:
Andrew Gierth
2018-07-31 19:58:39 +01:00
parent a56c11d44d
commit d06eebce5f
8 changed files with 130 additions and 2 deletions

View File

@ -1100,13 +1100,15 @@ include $(PGXS)
and include the global <acronym>PGXS</acronym> makefile.
Here is an example that builds an extension module named
<literal>isbn_issn</literal>, consisting of a shared library containing
some C code, an extension control file, a SQL script, and a documentation
text file:
some C code, an extension control file, a SQL script, an include file
(only needed if other modules might need to access the extension functions
without going via SQL), and a documentation text file:
<programlisting>
MODULES = isbn_issn
EXTENSION = isbn_issn
DATA = isbn_issn--1.0.sql
DOCS = README.isbn_issn
HEADERS_isbn_issn = isbn_issn.h
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
@ -1220,6 +1222,28 @@ include $(PGXS)
</listitem>
</varlistentry>
<varlistentry>
<term><varname>HEADERS</varname></term>
<listitem>
<para>
files to install under
<literal><replaceable>prefix</replaceable>/include/server/$MODULEDIR/$MODULE_big</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>HEADERS_$MODULE</varname></term>
<listitem>
<para>
files to install under
<literal><replaceable>prefix</replaceable>/include/server/$MODULEDIR/$MODULE</literal>,
where <literal>$MODULE</literal> must be a module name used
in <literal>MODULES</literal> or <literal>MODULE_big</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>SCRIPTS</varname></term>
<listitem>