OSDN Git Service

Suppress memory leak in COPY WITH OIDS TO wherever.
[pg-rex/syncrep.git] / src / interfaces / python / GNUmakefile.in
1 #-------------------------------------------------------------------
2 #
3 # Makefile for src/interfaces/python, a.k.a. "PyGreSQL"
4 #
5 # Written by Peter Eisentraut  <peter_e@gmx.net>
6 #
7 # $Header: /cvsroot/pgsql/src/interfaces/python/Attic/GNUmakefile.in,v 1.1 2000/06/10 18:02:00 petere Exp $
8 #
9 #-------------------------------------------------------------------
10
11 srcdir = @srcdir@
12 VPATH = @srcdir@
13
14 top_srcdir = @top_srcdir@
15 top_builddir = ../../..
16
17
18 prefix = @prefix@
19 exec_prefix = @exec_prefix@
20 libdir = @libdir@
21 includedir = @includedir@
22
23 INSTALL = @INSTALL@
24 INSTALL_DATA = @INSTALL_DATA@
25
26 LIBS = @LIBS@
27
28 PYTHON = @PYTHON@
29 python_extmakefile = @python_extmakefile@
30 python_moduledir = @python_moduledir@
31
32
33 all: Makefile pgmodule.c libpq-all
34         $(MAKE) -f Makefile
35
36 libpq-all:
37         $(MAKE) -C $(top_builddir)/src/interfaces/libpq all
38
39 Makefile: Setup.in Makefile.pre.in
40         $(MAKE) -f Makefile.pre.in boot srcdir=$(srcdir) VPATH=$(srcdir)
41
42 Makefile.pre.in: $(python_extmakefile)
43         cp $< $@
44
45 Setup.in: Setup.in.raw
46         sed -e "s%__LIBPQ__%${top_srcdir}/src/interfaces/libpq%g" \
47             -e "s%__EXTRA_LIBS__%${LIBS}%g" \
48             -e "s%__INCLUDES__%${top_srcdir}/src/include%g" \
49             < $< > $@
50
51 install: all
52         @echo "Installing Python module"
53         @if ! ( $(INSTALL_DATA) pg.py $(python_moduledir) && \
54             $(MAKE) -f Makefile install ); then \
55                 echo "*****" ;\
56                 echo "* Skipping the installation of the Python interface module for lack"; \
57                 echo "* of permissions. To install it, change to the directory"; \
58                 echo "* "`pwd`", become the appropriate"; \
59                 echo "* user, and do \`$(MAKE) install'."; \
60                 echo "*****"; \
61         fi
62
63
64 # Python sometimes has a different idea what exactly "clean" is.
65
66 clean:
67         -[ -f Makefile ] && $(MAKE) -f Makefile clobber
68         rm -f Makefile.pre.in Makefile Setup Setup.in
69
70 distclean maintainer-clean: clean
71         rm -f GNUmakefile
72
73
74 .PHONY: all libpq-all install clean distclean maintainer-clean