Fix xslt_process() to ensure that it inserts a NULL terminator after the
[PostgreSQL.git] / src / pl / tcl / Makefile
blob72436396c72b8a99c5a170f7b4d6c7fb6565f2fb
1 #-------------------------------------------------------------------------
3 # Makefile for the pltcl shared object
5 # $PostgreSQL$
7 #-------------------------------------------------------------------------
9 subdir = src/pl/tcl
10 top_builddir = ../../..
11 include $(top_builddir)/src/Makefile.global
14 override CPPFLAGS := $(TCL_INCLUDE_SPEC) $(CPPFLAGS)
17 # Find out whether Tcl was built as a shared library --- if not, we
18 # can't link a shared library that depends on it, and have to forget
19 # about building pltcl. In Tcl 8, tclConfig.sh sets TCL_SHARED_BUILD
20 # for us, but in older Tcl releases it doesn't. In that case we guess
21 # based on the name of the Tcl library.
23 ifndef TCL_SHARED_BUILD
24 ifneq (,$(findstring $(DLSUFFIX),$(TCL_LIB_FILE)))
25 TCL_SHARED_BUILD=1
26 else
27 TCL_SHARED_BUILD=0
28 endif
29 endif
32 SHLIB_LINK = $(TCL_LIB_SPEC)
33 ifneq ($(PORTNAME), win32)
34 SHLIB_LINK += $(TCL_LIBS) -lc
35 endif
37 NAME = pltcl
38 OBJS = pltcl.o
40 REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-language=pltcl
41 REGRESS = pltcl_setup pltcl_queries
42 # where to find psql for running the tests
43 PSQLDIR = $(bindir)
45 include $(top_srcdir)/src/Makefile.shlib
47 ifeq ($(TCL_SHARED_BUILD), 1)
49 all: all-lib
50 $(MAKE) -C modules $@
52 install: all installdirs install-lib
53 $(MAKE) -C modules $@
55 installdirs: installdirs-lib
56 $(MAKE) -C modules $@
58 uninstall: uninstall-lib
59 $(MAKE) -C modules $@
61 installcheck: submake
62 $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
64 .PHONY: submake
65 submake:
66 $(MAKE) -C $(top_builddir)/src/test/regress pg_regress$(X)
68 else # TCL_SHARED_BUILD = 0
70 # Provide dummy targets for the case where we can't build the shared library.
71 all:
72 @echo "*****"; \
73 echo "* Cannot build PL/Tcl because Tcl is not a shared library; skipping it."; \
74 echo "*****"
76 endif # TCL_SHARED_BUILD = 0
78 clean distclean maintainer-clean: clean-lib
79 rm -f $(OBJS)
80 rm -rf results
81 rm -f regression.diffs regression.out
82 $(MAKE) -C modules $@