Re: Should contrib modules install .h files? - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: Should contrib modules install .h files?
Date
Msg-id 87h8lhoevw.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: Should contrib modules install .h files?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Should contrib modules install .h files?  (Andres Freund <andres@anarazel.de>)
Re: Should contrib modules install .h files?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.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.

-- 
Andrew (irc:RhodiumToad)


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Old small commitfest items
Next
From: Ashutosh Sharma
Date:
Subject: Re: Test-cases for deferred constraints in plpgsql_transaction.sql