Re: add server include files to default installation? - Mailing list pgsql-hackers

From Thomas Hallgren
Subject Re: add server include files to default installation?
Date
Msg-id 40AA8AD8.50705@mailblocks.com
Whole thread Raw
In response to Re: add server include files to default installation?  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: add server include files to default installation?
List pgsql-hackers
Fabien COELHO wrote:
> Any idea? The best I have would be to create a "src" subdir in the
> installation, so that top_builddir could be set to
> ".../include/postgresql/config" and everything would work from that
> point of view.
>
This is from an extension module author's point of view. My module will 
reference these two files only:

Makefile.global
Makefile.shlib

I'm not the least interested in how these files are organized internally 
or where they are placed in reference to what they contain. I don't care 
where the include files, config files, or other files are located, as 
long as these two files will set my flags accordingly. I think it's 
important to recognize this separation of concern. Extension modules 
should not need to worry about anything but where to find these two files.

If I have a "pg_config --makefiledir" that tells me where to find the 
files, that should be all I need:
        makefiledir := $(shell pg_config --makefiledir)        include $(makefiledir)/Makefile.global        ...
include$(makefiledir)/Makefile.shlib
 

If I go in and parse the makefiles to dig out information or do 
something equally horrible, I'm either doing something wrong or 
something is missing in the "contract" between the backend and the 
extension module and should be rectified there. The contract, the way I 
see it, is constituted  by the two files.

Just trying to give you a bit more freedom to place your files :-)

Kind regards,

Thomas Hallgren



pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: Re: Why new features only in magior releases ?
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Call for 7.5 feature completion