1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Refactor installation of extension headers.

Commit be54b3777 failed on gmake 3.80 due to a chained conditional,
which on closer examination could be removed entirely with some
refactoring elsewhere for a net simplification and more robustness
against empty expansions. Along the way, add some more comments.

Also make explicit in the documentation and comments that built
headers are not removed by 'make clean', since we don't typically want
that for headers generated by a separate ./configure step, and it's
much easier to add your own 'distclean' rule or use EXTRA_CLEAN than
to try and override a deletion rule in pgxs.mk.

Per buildfarm member prariedog and comments by Michael Paquier, though
all the actual changes are my fault.
This commit is contained in:
Andrew Gierth
2018-09-07 13:51:30 +01:00
parent 23aad181f4
commit 094ffd6846
2 changed files with 55 additions and 32 deletions

View File

@ -1227,8 +1227,13 @@ include $(PGXS)
<term><varname>HEADERS_built</varname></term>
<listitem>
<para>
files to (optionally build and) install under
<literal><replaceable>prefix</replaceable>/include/server/$MODULEDIR/$MODULE_big</literal>
Files to (optionally build and) install under
<literal><replaceable>prefix</replaceable>/include/server/$MODULEDIR/$MODULE_big</literal>.
</para>
<para>
Unlike <literal>DATA_built</literal>, files in <literal>HEADERS_built</literal>
are not removed by the <literal>clean</literal> target; if you want them removed,
also add them to <literal>EXTRA_CLEAN</literal> or add your own rules to do it.
</para>
</listitem>
</varlistentry>
@ -1243,6 +1248,11 @@ include $(PGXS)
where <literal>$MODULE</literal> must be a module name used
in <literal>MODULES</literal> or <literal>MODULE_big</literal>.
</para>
<para>
Unlike <literal>DATA_built</literal>, files in <literal>HEADERS_built_$MODULE</literal>
are not removed by the <literal>clean</literal> target; if you want them removed,
also add them to <literal>EXTRA_CLEAN</literal> or add your own rules to do it.
</para>
<para>
It is legal to use both variables for the same module, or any
combination, unless you have two module names in the