]> granicus.if.org Git - postgresql/blob - src/pl/plpython/Makefile
Install dynamically loadable modules into a private subdirectory
[postgresql] / src / pl / plpython / Makefile
1 # $Header: /cvsroot/pgsql/src/pl/plpython/Makefile,v 1.10 2001/09/16 16:11:11 petere Exp $
2
3 subdir = src/pl/plpython
4 top_builddir = ../../..
5 include $(top_builddir)/src/Makefile.global
6
7
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
13 endif
14
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)))
18
19 override CPPFLAGS := -I$(srcdir) $(python_includespec) $(CPPFLAGS)
20 override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
21 rpath :=
22
23 NAME = plpython
24 SO_MAJOR_VERSION = 0
25 SO_MINOR_VERSION = 0
26 OBJS = plpython.o
27
28 SHLIB_LINK += $(python_libspec)
29
30 include $(top_srcdir)/src/Makefile.shlib
31
32
33 all: all-lib
34
35 install: all installdirs
36         $(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(pkglibdir)/plpython$(DLSUFFIX)
37
38 installdirs:
39         $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
40
41 uninstall:
42         rm -f $(DESTDIR)$(pkglibdir)/plpython$(DLSUFFIX)
43
44 clean distclean maintainer-clean: clean-lib
45         rm -f $(OBJS)
46         @rm -f error.diff feature.diff error.output feature.output test.log
47
48 installcheck:
49         PATH=$(bindir):$$PATH $(SHELL) $(srcdir)/test.sh
50
51 else # can't build
52
53 all:
54         @echo ""; \
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."; \
58          echo ""
59
60 endif # can't build