>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
>> 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.
Tom> AFAIR, you're supposed to define at most one of those macros
Tom> anyway, so I don't see why it couldn't be like "use MODULE_big if
Tom> set, else use MODULE if set, else fail if MODULE_NAME isn't set".
OK, I'm working on an updated patch, that will allow this:
if using MODULE_big:
MODULE_big = mymodule
HEADERS = whatever.h
# gets installed as mymodule/whatever.h in whatever dir we decide on
# also works if you define HEADERS_mymodule = whatever.h
if not using MODULE_big:
MODULES = foo bar baz
HEADERS_foo = foo.h
HEADERS_bar = bar.h
# baz doesn't have any headers
# foo.h installed as foo/foo.h
# bar.h installed as bar/bar.h
Two questions arise:
1) include/server has a lot of files and subdirs, so using
include/server/$(MODULE)/ looks likely to be error-prone. So it
should be something like include/server/contrib/$(MODULE)/ or
include/server/extension/$(MODULE)/. Which one, or should it use
$(MODULEDIR) to choose between the two the way that DATA and DOCS do?
Or something else?
2) Specifying HEADERS_blah for some name "blah" that's not listed in
MODULES or MODULE_big should do what:
a) install into blah/ anyway
b) be ignored with a warning
c) be silently ignored
d) be an error
--
Andrew (irc:RhodiumToad)