Re: Should contrib modules install .h files?

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

From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org, Andres Freund <andres@anarazel.de>
Date: 2018-07-02T10:04:14Z
Lists: pgsql-hackers

Attachments

>>>>> "Peter" == Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:

 >> So I have this immediate problem: a PGXS build of a module,
 >> specifically an hstore transform for a non-core PL, is much harder
 >> than it should be because it has no way to get at hstore.h since
 >> that file is never installed anywhere.
 >> 
 >> Should that be changed?

 Peter> Yes, just install it, I think.

I'm thinking that $(includedir_server)/$(MODULEDIR) would be a
reasonable place? MODULEDIR defaults to either "contrib" or "extension"
depending on whether EXTENSION is set.

Something like the attached patch seem reasonable?

-- 
Andrew (irc:RhodiumToad)

Commits

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

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