1 # $Header: /cvsroot/pgsql/src/pl/plpython/Makefile,v 1.10 2001/09/16 16:11:11 petere Exp $
3 subdir = src/pl/plpython
4 top_builddir = ../../..
5 include $(top_builddir)/src/Makefile.global
8 # On some platforms we can only build PL/Python if libpython is a
9 # shared library. Since there is no official way to determine this,
10 # we see if there is a file that is named like a shared library.
11 ifneq (,$(wildcard $(python_configdir)/libpython*$(DLSUFFIX)*))
12 shared_libpython = yes
15 # If we don't have a shared library and the platform doesn't allow it
16 # to work without, we have to skip it.
17 ifneq (,$(findstring yes, $(shared_libpython)$(allow_nonpic_in_shlib)))
19 override CPPFLAGS := -I$(srcdir) $(python_includespec) $(CPPFLAGS)
20 override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
28 SHLIB_LINK += $(python_libspec)
30 include $(top_srcdir)/src/Makefile.shlib
35 install: all installdirs
36 $(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(pkglibdir)/plpython$(DLSUFFIX)
39 $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
42 rm -f $(DESTDIR)$(pkglibdir)/plpython$(DLSUFFIX)
44 clean distclean maintainer-clean: clean-lib
46 @rm -f error.diff feature.diff error.output feature.output test.log
49 PATH=$(bindir):$$PATH $(SHELL) $(srcdir)/test.sh
55 echo "*** Cannot build PL/Python because libpython is not a shared library." ; \
56 echo "*** You might have to rebuild your Python installation. Refer to"; \
57 echo "*** the documentation for details."; \