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 87lgatohzp.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?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 > Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
 >> 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?

 Tom> FWIW, I agree with Andres' thought that each contrib module should
 Tom> have its own subdirectory under $(includedir_server). Otherwise
 Tom> we're going to be faced with questions about whether .h files need
 Tom> to be renamed because they're not globally unique enough. There
 Tom> are already some that are pretty shaky from this standpoint:

I'm not suggesting that all modules should install a .h file or that all
of a module's .h files should be installed.

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> Not sure about whether the MODULEDIR part is useful. Seems like
 Tom> making a distinction between extensions and other contrib is
 Tom> likely to create more headaches than it avoids.

Sure, but that's just copied from DATA and DOCS which already do it that
way. For DATA there seems some justification based on CREATE EXTENSION,
but for docs?

-- 
Andrew (irc:RhodiumToad)


pgsql-hackers by date:

Previous
From: Jesper Pedersen
Date:
Subject: Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA
Next
From: Tom Lane
Date:
Subject: Re: Should contrib modules install .h files?