Get extensions directory programmatically in another Makefile - Mailing list pgsql-general

From Igor Stassiy
Subject Get extensions directory programmatically in another Makefile
Date
Msg-id CAKVOjezO1oPP5V0yVOZ-7pEYG__74CyAnncNnjQhAXcGHe1-Jw@mail.gmail.com
Whole thread Raw
List pgsql-general
Hello,

This might seem like an XY problem, but I need to solve it. 

I am using pgxs to install an extension but I need to refer to the location of the installation directory in another Makefile. 

How safe is it to assume that MODULE_PATHNAME that I use for CREATE FUNCTION ... AS 'MODULE_PATHNAME'

can be used as 

PG_CONFIG = pg_config
PGXS_PKGLIBDIR = $(shell $(PG_CONFIG) --pkglibdir)
PGXS_MODULESDIR = $(shell $(PG_CONFIG) --sharedir)/extension

in another Makefile?

Thanks,
Igor

pgsql-general by date:

Previous
From: Prajilal KP
Date:
Subject: Re: Reg: PostgreSQL Server "base/data" recovery
Next
From: Steven Erickson
Date:
Subject: Re: Name spacing functions and stored procedures