postgresql/src/pl/plpython/Makefile

61 lines
1.6 KiB
Makefile
Raw Normal View History

# $Header: /cvsroot/pgsql/src/pl/plpython/Makefile,v 1.9 2001/08/27 00:29:49 petere Exp $
2001-05-09 15:54:38 -04:00
subdir = src/pl/plpython
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
2001-05-09 15:54:38 -04:00
# On some platforms we can only build PL/Python if libpython is a
# shared library. Since there is no official way to determine this,
# we see if there is a file that is named like a shared library.
ifneq (,$(wildcard $(python_configdir)/libpython*$(DLSUFFIX)*))
shared_libpython = yes
endif
# If we don't have a shared library and the platform doesn't allow it
# to work without, we have to skip it.
ifneq (,$(findstring yes, $(shared_libpython)$(allow_nonpic_in_shlib)))
override CPPFLAGS := -I$(srcdir) $(python_includespec) $(CPPFLAGS)
2001-05-09 15:54:38 -04:00
override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
NAME = plpython
SO_MAJOR_VERSION = 0
SO_MINOR_VERSION = 0
OBJS = plpython.o
2001-05-09 15:54:38 -04:00
SHLIB_LINK += $(python_libspec)
include $(top_srcdir)/src/Makefile.shlib
2001-05-09 15:54:38 -04:00
all: all-lib
2001-05-09 15:54:38 -04:00
install: all installdirs
$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(libdir)/plpython$(DLSUFFIX)
2001-05-09 15:54:38 -04:00
installdirs:
$(mkinstalldirs) $(DESTDIR)$(libdir)
2001-05-09 15:54:38 -04:00
uninstall:
rm -f $(DESTDIR)$(libdir)/plpython$(DLSUFFIX)
2001-05-09 15:54:38 -04:00
clean distclean maintainer-clean: clean-lib
rm -f $(OBJS)
@rm -f error.diff feature.diff error.output feature.output test.log
2001-05-09 15:54:38 -04:00
installcheck:
PATH=$(bindir):$$PATH $(SHELL) $(srcdir)/test.sh
else # can't build
all:
@echo ""; \
echo "*** Cannot build PL/Python because libpython is not a shared library." ; \
echo "*** You might have to rebuild your Python installation. Refer to"; \
echo "*** the documentation for details."; \
echo ""
endif # can't build