mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
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).
This commit is contained in:
@ -1224,9 +1224,10 @@ include $(PGXS)
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>HEADERS</varname></term>
|
||||
<term><varname>HEADERS_built</varname></term>
|
||||
<listitem>
|
||||
<para>
|
||||
files to install under
|
||||
files to (optionally build and) install under
|
||||
<literal><replaceable>prefix</replaceable>/include/server/$MODULEDIR/$MODULE_big</literal>
|
||||
</para>
|
||||
</listitem>
|
||||
@ -1234,12 +1235,21 @@ include $(PGXS)
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>HEADERS_$MODULE</varname></term>
|
||||
<term><varname>HEADERS_built_$MODULE</varname></term>
|
||||
<listitem>
|
||||
<para>
|
||||
files to install under
|
||||
Files to install (after building if specified) 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>
|
||||
in <literal>MODULES</literal> or <literal>MODULE_big</literal>.
|
||||
</para>
|
||||
<para>
|
||||
It is legal to use both variables for the same module, or any
|
||||
combination, unless you have two module names in the
|
||||
<literal>MODULES</literal> list that differ only by the presence of a
|
||||
prefix <literal>built_</literal>, which would cause ambiguity. In
|
||||
that (hopefully unlikely) case, you should use only the
|
||||
<literal>HEADERS_built_$MODULE</literal> variables.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
Reference in New Issue
Block a user