1 #-------------------------------------------------------------------------
3 # Makefile for the pltcl shared object
7 #-------------------------------------------------------------------------
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
)))
32 SHLIB_LINK
= $(TCL_LIB_SPEC
)
33 ifneq ($(PORTNAME
), win32
)
34 SHLIB_LINK
+= $(TCL_LIBS
) -lc
40 REGRESS_OPTS
= --dbname
=$(PL_TESTDB
) --load-language
=pltcl
41 REGRESS
= pltcl_setup pltcl_queries
42 # where to find psql for running the tests
45 include $(top_srcdir
)/src
/Makefile.shlib
47 ifeq ($(TCL_SHARED_BUILD
), 1)
52 install: all installdirs install-lib
55 installdirs: installdirs-lib
58 uninstall: uninstall-lib
62 $(top_builddir
)/src
/test/regress
/pg_regress
--inputdir
=$(srcdir) --psqldir
=$(PSQLDIR
) $(REGRESS_OPTS
) $(REGRESS
)
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.
73 echo
"* Cannot build PL/Tcl because Tcl is not a shared library; skipping it."; \
76 endif # TCL_SHARED_BUILD = 0
78 clean distclean maintainer-clean
: clean-lib
81 rm -f regression.diffs regression.out