diff options
author | Andrew Gierth <rhodiumtoad@postgresql.org> | 2018-09-16 18:46:45 +0100 |
---|---|---|
committer | Andrew Gierth <rhodiumtoad@postgresql.org> | 2018-09-16 18:46:45 +0100 |
commit | 60f6756f92251d7325d58a048f7e9a81881f8d41 (patch) | |
tree | 6e39786f3b13c034b658685687d7a72fd061e2b1 /contrib/ltree_plpython | |
parent | 3844adbf3c2521c0956064c1c27096c96ca92201 (diff) | |
download | postgresql-60f6756f92251d7325d58a048f7e9a81881f8d41.tar.gz postgresql-60f6756f92251d7325d58a048f7e9a81881f8d41.zip |
Fix out-of-tree build for transform modules.
Neither plperl nor plpython installed sufficient header files to
permit transform modules to be built out-of-tree using PGXS. Fix that
by installing all plperl and plpython header files (other than those
with special purposes such as generated data tables), and also install
plpython's special .mk file for mangling regression tests.
(This commit does not fix the windows install, which does not
currently install _any_ plperl or plpython headers.)
Also fix the existing transform modules for hstore and ltree so that
their cross-module #include directives work as anticipated by commit
df163230b9 et seq. This allows them to serve as working examples of
how to reference other modules when doing separate out-of-tree builds.
Discussion: https://postgr.es/m/87o9ej8bgl.fsf%40news-spur.riddles.org.uk
Diffstat (limited to 'contrib/ltree_plpython')
-rw-r--r-- | contrib/ltree_plpython/Makefile | 6 | ||||
-rw-r--r-- | contrib/ltree_plpython/ltree_plpython.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/contrib/ltree_plpython/Makefile b/contrib/ltree_plpython/Makefile index 7e988c79935..ce2c0cd2e2f 100644 --- a/contrib/ltree_plpython/Makefile +++ b/contrib/ltree_plpython/Makefile @@ -4,19 +4,21 @@ MODULE_big = ltree_plpython$(python_majorversion) OBJS = ltree_plpython.o $(WIN32RES) PGFILEDESC = "ltree_plpython - ltree transform for plpython" -PG_CPPFLAGS = -I$(top_srcdir)/src/pl/plpython $(python_includespec) -I$(top_srcdir)/contrib/ltree -DPLPYTHON_LIBNAME='"plpython$(python_majorversion)"' - EXTENSION = ltree_plpythonu ltree_plpython2u ltree_plpython3u DATA = ltree_plpythonu--1.0.sql ltree_plpython2u--1.0.sql ltree_plpython3u--1.0.sql REGRESS = ltree_plpython REGRESS_PLPYTHON3_MANGLE := $(REGRESS) +PG_CPPFLAGS = $(python_includespec) -DPLPYTHON_LIBNAME='"plpython$(python_majorversion)"' + ifdef USE_PGXS +PG_CPPFLAGS += -I$(includedir_server)/extension PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) else +PG_CPPFLAGS += -I$(top_srcdir)/src/pl/plpython -I$(top_srcdir)/contrib subdir = contrib/ltree_plpython top_builddir = ../.. include $(top_builddir)/src/Makefile.global diff --git a/contrib/ltree_plpython/ltree_plpython.c b/contrib/ltree_plpython/ltree_plpython.c index e88636a0a96..b254aa558d1 100644 --- a/contrib/ltree_plpython/ltree_plpython.c +++ b/contrib/ltree_plpython/ltree_plpython.c @@ -2,7 +2,7 @@ #include "fmgr.h" #include "plpython.h" -#include "ltree.h" +#include "ltree/ltree.h" PG_MODULE_MAGIC; |