Re: Should contrib modules install .h files?

From: Andres Freund <andres(at)anarazel(dot)de>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Should contrib modules install .h files?
Date: 2018-07-02 15:19:02
Message-ID: 20180702151901.43fr537mxq375eeu@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2018-07-02 16:11:07 +0100, Andrew Gierth wrote:
> >>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>
> >> A slight snag in trying to use a subdir for each module is that
> >> there is not in fact anywhere in the existing makefiles that uses or
> >> assigns such a name. Indeed some contrib subdirs install multiple
> >> modules.
>
> Tom> So, given that we have to add something to the module makefiles
> Tom> anyway, we could also add a macro specifying the subdirectory name
> Tom> to use. (Although in practice this should always be equal to the
> Tom> contrib/ subdirectory name, so maybe we could extract it on that
> Tom> basis?)
>
> Using the subdir name may work for in-tree contrib/ builds but it's not
> so good for PGXS, which should not be making assumptions about the build
> directory name.
>
> How about this: it's most likely that modules that install include files
> will also be using MODULE_big, so use that as the default name; if a
> makefile that uses only MODULES also wants to install include files,
> have it define MODULE_NAME (or some such variable) itself.

For LLVM bitcode generation I made it so MODULE_big uses that as the
directory name, whereas MODULES just iterates over the components. Now
for the bitcode there was less need to make it selective, so it's a bit
easier. We could just define that HEADERS_$component is referenced for
each component in MODULES or something like that?

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-07-02 15:20:43 Re: ERROR: cannot start subtransactions during a parallel operation
Previous Message Andres Freund 2018-07-02 15:16:15 Re: branches_of_interest.txt