1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-27 22:56:53 +03:00
postgres/contrib/xml2/Makefile
Tom Lane 7af8e8d671 Fix contrib/xml2 so regression test still works when it's built without libxslt.
This involves modifying the module to have a stable ABI, that is, the
xslt_process() function still exists even without libxslt.  It throws a
runtime error if called, but doesn't prevent executing the CREATE FUNCTION
call.  This is a good thing anyway to simplify cross-version upgrades.
2010-03-01 18:08:27 +00:00

35 lines
749 B
Makefile

# This makefile will build the new XML and XSLT routines.
# This module will not work without libxml2, but it will work without libxslt.
# To build without libxslt, run "gmake USE_LIBXSLT=0", or comment out the
# following line:
USE_LIBXSLT = 1
MODULE_big = pgxml
OBJS = xpath.o xslt_proc.o
PG_CPPFLAGS := $(shell xml2-config --cflags)
ifeq ($(USE_LIBXSLT),1)
PG_CPPFLAGS += -DUSE_LIBXSLT
SHLIB_LINK = -lxslt -lxml2
else
SHLIB_LINK = -lxml2
endif
DATA_built = pgxml.sql
DATA = uninstall_pgxml.sql
REGRESS = xml2
DOCS = README.xml2
ifdef USE_PGXS
PGXS := $(shell pg_config --pgxs)
include $(PGXS)
else
subdir = contrib/xml2
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif