head	1.17;
access;
symbols
	REL7_3_21:1.13
	REL7_3_20:1.13
	REL7_3_19:1.13
	REL7_3_18:1.13
	REL7_3_17:1.13
	REL7_3_16:1.13
	REL7_3_15:1.13
	REL7_3_14:1.13
	REL7_3_13:1.13
	REL7_3_12:1.13
	REL7_3_11:1.13
	REL7_2_8:1.13
	REL7_3_10:1.13
	REL7_2_7:1.13
	REL7_3_9:1.13
	REL7_3_8:1.13
	REL7_2_6:1.13
	REL7_2_5:1.13
	REL7_3_7:1.13
	REL7_3_6:1.13
	REL7_3_4:1.13
	REL7_3_2:1.13
	REL7_2_4:1.13
	REL7_3_STABLE:1.13.0.4
	REL7_2_3:1.13
	REL7_2_STABLE:1.13.0.2
	REL7_2:1.13
	REL7_2_RC2:1.13
	REL7_2_RC1:1.13
	REL7_2_BETA5:1.13
	REL7_2_BETA4:1.12
	REL7_2_BETA3:1.11
	REL7_2_BETA2:1.11
	REL7_2_BETA1:1.11
	REL7_1_2:1.6
	REL7_1_STABLE:1.6.0.2
	REL7_1_BETA:1.2
	REL7_1_BETA3:1.3
	REL7_1_BETA2:1.3
	REL7_1:1.6;
locks; strict;
comment	@# @;


1.17
date	2003.08.01.04.19.04;	author scrappy;	state dead;
branches;
next	1.16;

1.16
date	2003.03.21.17.18.34;	author petere;	state Exp;
branches;
next	1.15;

1.15
date	2002.12.11.04.07.39;	author momjian;	state Exp;
branches;
next	1.14;

1.14
date	2002.12.04.18.14.11;	author momjian;	state Exp;
branches;
next	1.13;

1.13
date	2001.12.13.18.39.04;	author petere;	state Exp;
branches;
next	1.12;

1.12
date	2001.12.03.12.39.44;	author darcy;	state Exp;
branches;
next	1.11;

1.11
date	2001.08.24.14.07.50;	author petere;	state Exp;
branches;
next	1.10;

1.10
date	2001.07.10.16.33.02;	author petere;	state Exp;
branches;
next	1.9;

1.9
date	2001.05.25.15.32.33;	author momjian;	state Exp;
branches;
next	1.8;

1.8
date	2001.05.25.14.29.39;	author momjian;	state Exp;
branches;
next	1.7;

1.7
date	2001.05.12.17.49.32;	author petere;	state Exp;
branches;
next	1.6;

1.6
date	2001.03.25.19.44.03;	author petere;	state Exp;
branches;
next	1.5;

1.5
date	2001.02.07.18.22.10;	author petere;	state Exp;
branches;
next	1.4;

1.4
date	2001.02.04.13.21.46;	author petere;	state Exp;
branches;
next	1.3;

1.3
date	2000.12.30.00.24.09;	author petere;	state Exp;
branches;
next	1.2;

1.2
date	2000.08.31.16.12.01;	author petere;	state Exp;
branches;
next	1.1;

1.1
date	2000.06.28.18.30.07;	author petere;	state Exp;
branches;
next	;


desc
@@


1.17
log
@
remove python module, as its moved to http://www.pygresql.org
@
text
@# $Header: /cvsroot/pgsql-server/src/interfaces/python/GNUmakefile,v 1.16 2003/03/21 17:18:34 petere Exp $

subdir = src/interfaces/python
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global

NAME = _pgmodule
SO_MAJOR_VERSION = 2
SO_MINOR_VERSION = 4
OBJS = pgmodule.o
SHLIB_LINK = $(libpq)
ifeq ($(PORTNAME), cygwin)
override CPPFLAGS += -DUSE_DL_IMPORT
SHLIB_LINK += $(python_libspec)
endif


include $(top_srcdir)/src/Makefile.shlib

override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) $(python_includespec)

all: all-lib

all-lib: libpq-all

.PHONY: libpq-all
libpq-all:
	$(MAKE) -C $(libpq_builddir) all

install-warning-msg := { \
echo "*** Skipping the installation of the Python interface module for lack"; \
echo "*** of permissions.  To install it, change to the directory"; \
echo "***     `pwd`,"; \
echo "*** become the appropriate user, and do '$(MAKE) install'."; }

install: all installdirs
	@@if test -w $(DESTDIR)$(python_moduleexecdir) && test -w $(DESTDIR)$(python_moduledir); then \
	  echo "$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(python_moduleexecdir)/_pgmodule$(DLSUFFIX)"; \
	  $(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(python_moduleexecdir)/_pgmodule$(DLSUFFIX); \
	\
	  echo "$(INSTALL_DATA) $(srcdir)/pg.py $(DESTDIR)$(python_moduledir)/pg.py"; \
	  $(INSTALL_DATA) $(srcdir)/pg.py $(DESTDIR)$(python_moduledir)/pg.py; \
	\
	  echo "$(INSTALL_DATA) $(srcdir)/pgdb.py $(DESTDIR)$(python_moduledir)/pgdb.py"; \
	  $(INSTALL_DATA) $(srcdir)/pgdb.py $(DESTDIR)$(python_moduledir)/pgdb.py; \
	else \
	  $(install-warning-msg); \
	fi

installdirs:
	$(mkinstalldirs) $(DESTDIR)$(python_moduleexecdir) $(DESTDIR)$(python_moduledir)

uninstall:
	rm -f $(DESTDIR)$(python_moduleexecdir)/_pgmodule$(DLSUFFIX) \
	      $(DESTDIR)$(python_moduledir)/pg.py \
	      $(DESTDIR)$(python_moduledir)/pgdb.py

clean distclean maintainer-clean: clean-lib
	rm -f $(OBJS)
@


1.16
log
@Make "win" a separate port from "cygwin".  This means you can now
configure under native Windows (MinGW that is), but you won't get very far
compiling yet.  The dynaloader files are from Jan Wieck's patch set.
@
text
@d1 1
a1 1
# $Header: /cvsroot/pgsql-server/src/interfaces/python/GNUmakefile,v 1.15 2002/12/11 04:07:39 momjian Exp $
@


1.15
log
@Bump version for 7.3 and 7.4.
@
text
@d1 1
a1 1
# $Header: /cvsroot/pgsql-server/src/interfaces/python/GNUmakefile,v 1.14 2002/12/04 18:14:11 momjian Exp $
d12 1
a12 1
ifeq ($(PORTNAME), win)
@


1.14
log
@Stamp minor version numbers for 7.4 release.
@
text
@d1 1
a1 1
# $Header: /cvsroot/pgsql-server/src/interfaces/python/GNUmakefile,v 1.13 2001/12/13 18:39:04 petere Exp $
d9 1
a9 1
SO_MINOR_VERSION = 3
@


1.13
log
@revert last change
@
text
@d1 1
a1 1
# $Header: /cvsroot/pgsql/src/interfaces/python/GNUmakefile,v 1.11 2001/08/24 14:07:50 petere Exp $
d8 2
a9 2
SO_MAJOR_VERSION = 0
SO_MINOR_VERSION = 0
@


1.12
log
@Bump version to 3.3.  Mostly this is because there is some confusion about
the latest version and I wanted to make sure that there was a clean release.

I also change the build files as I discussed in my letter of Nov 6, 2001.  At
the time I was asked to hold off until after the release.
@
text
@d22 1
a22 8
PY_SCRIPTS = pg.py pgdb.py
ifeq ($(with_python_compile), yes)
PY_COMPILED_SCRIPTS = $(PY_SCRIPTS:%.py=%.pyc) $(PY_SCRIPTS:%.py=%.pyo)
else
PY_COMPILED_SCRIPTS =
endif

all: all-lib $(PY_COMPILED_SCRIPTS)
a25 6
%.pyc: %.py
	$(PYTHON) -c "import py_compile; py_compile.compile(\"$<\")"

%.pyo: %.py
	$(PYTHON) -O -c "import py_compile; py_compile.compile(\"$<\")"

d41 5
a45 4
	  for i in $(PY_SCRIPTS) $(PY_COMPILED_SCRIPTS); do \
		echo $(INSTALL_DATA) $$i $(python_moduledir); \
		$(INSTALL_DATA) $$i $(python_moduledir); \
	  done \
@


1.11
log
@Rename config.h to pg_config.h and os.h to pg_config_os.h, fix a number of
places that were including the wrong files.
@
text
@d1 1
a1 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/python/GNUmakefile,v 1.10 2001/07/10 16:33:02 petere Exp $
d22 8
a29 1
all: all-lib
d33 6
d54 4
a57 5
	  echo "$(INSTALL_DATA) $(srcdir)/pg.py $(DESTDIR)$(python_moduledir)/pg.py"; \
	  $(INSTALL_DATA) $(srcdir)/pg.py $(DESTDIR)$(python_moduledir)/pg.py; \
	\
	  echo "$(INSTALL_DATA) $(srcdir)/pgdb.py $(DESTDIR)$(python_moduledir)/pgdb.py"; \
	  $(INSTALL_DATA) $(srcdir)/pgdb.py $(DESTDIR)$(python_moduledir)/pgdb.py; \
@


1.10
log
@Support fake root install, separate build dir, dependency tracking, our
choice of compiler and flags, uninstall, and peculiar Python installation
layouts for PyGreSql.  Also install into site-packages now, as officially
recommended.  And pgdb.py is also installed now, used to be forgotten.
@
text
@d1 1
a1 1
# $Header$
a19 1
# (Python also has a config.h file.  Be sure to use ours.)
@


1.9
log
@Back out, per Peter E.

> > The attached patch changes src/interfaces/python/GNUmakefile to use the
> > value of DESTDIR like the rest (or at least most) of the PostgreSQL
> > makefiles.  I found this problem when trying to package a pre-built
> > Cygwin PostgreSQL distribution, but this problem is platform independent.
@
text
@d1 1
a1 9
#-------------------------------------------------------------------
#
# GNUmakefile for src/interfaces/python, a.k.a. "PyGreSQL"
#
# Written by Peter Eisentraut  <peter_e@@gmx.net>
#
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/python/GNUmakefile,v 1.7 2001/05/12 17:49:32 petere Exp $
#
#-------------------------------------------------------------------
d7 19
a25 2
all: Makefile pgmodule.c libpq-all
	$(MAKE) -f Makefile
d31 19
a49 2
Makefile: Setup.in Makefile.pre.in
	$(MAKE) -f Makefile.pre.in boot srcdir=$(srcdir) VPATH=$(srcdir)
d51 2
a52 2
Makefile.pre.in: $(python_makefile_pre_in)
	cp $< $@@
d54 4
a57 18
Setup.in: Setup.in.raw
	sed -e 's,@@libpq_srcdir@@,$(libpq_srcdir),g' \
	    -e 's,@@libpq_builddir@@,$(libpq_builddir),g' \
	    -e 's%@@EXTRA_LIBS@@%$(filter -L%, $(LDFLAGS)) $(LIBS)%g' \
	    -e 's%@@INCLUDES@@%$(filter -I%, $(CPPFLAGS))%g' \
	    $< > $@@

install: all
	@@echo "Installing Python module"
	@@if ( $(INSTALL_DATA) pg.py $(python_moduledir) && \
	    $(MAKE) -f Makefile install ); then : ; else \
		echo "*****" ;\
		echo "* Skipping the installation of the Python interface module for lack"; \
		echo "* of permissions. To install it, change to the directory"; \
		echo "* "`pwd`", become the appropriate"; \
		echo "* user, and do \`$(MAKE) install'."; \
		echo "*****"; \
	fi
d59 2
a60 12
uninstall:
	@@echo "*****"; \
	 echo "* Unfortunately, the Python interface module cannot be uninstalled"; \
	 echo "* automatically. To do it yourself, look in or near the directory"; \
	 echo "* \`$(python_moduledir)' for files \`pg.py' and \`_pgmodule$(DLSUFFIX)'."; \
	 echo "*****"

# Python sometimes has a different idea what exactly "clean" is.

clean distclean maintainer-clean:
	-[ -f Makefile ] && $(MAKE) -f Makefile clobber
	rm -f Makefile.pre.in Makefile Setup Setup.in
@


1.8
log
@The attached patch changes src/interfaces/python/GNUmakefile to use the
value of DESTDIR like the rest (or at least most) of the PostgreSQL
makefiles.  I found this problem when trying to package a pre-built
Cygwin PostgreSQL distribution, but this problem is platform independent.

The problem manifests itself when one tries to install into a stagging
area (e.g., to build a tarball) instead of a real install.  In this case,
pg.py and _pgmodule$(SO) still end up being installed in the configured
prefix directory ignoring the value of DESTDIR.

Unfortunately, this patch does not handle the case where PostgreSQL
and Python are configured with different prefixes.  Since the Python
Makefile is automatically generated and does not use DESTDIR, I believe
that this issue will be difficult to correct.  If anyone has ideas on
how to fix this issue, then I'm quite willing to rework the patch to
take the suggestion into account.

Jason Tishler
@
text
@d35 1
a35 1
install: all installdirs
d37 2
a38 2
	@@if ( $(INSTALL_DATA) pg.py $(DESTDIR)$(python_moduledir) && \
	    $(MAKE) -f Makefile prefix=$(DESTDIR)$(prefix) install ); then :; else \
a45 3

installdirs:
	$(mkinstalldirs) $(DESTDIR)$(python_moduledir)
@


1.7
log
@PL/Python should build portably now, if you can get over the fact that
there's no shared libpython.  Test suite works as well. Also, add some
documentation.
@
text
@d7 1
a7 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/python/GNUmakefile,v 1.6 2001/03/25 19:44:03 petere Exp $
d35 1
a35 1
install: all
d37 2
a38 2
	@@if ( $(INSTALL_DATA) pg.py $(python_moduledir) && \
	    $(MAKE) -f Makefile install ); then : ; else \
d46 3
@


1.6
log
@Pick up any extra -I options for Python build.
@
text
@d7 1
a7 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/python/GNUmakefile,v 1.5 2001/02/07 18:22:10 petere Exp $
d25 1
a25 1
Makefile.pre.in: $(python_extmakefile)
@


1.5
log
@Only pass the -L* portions of LDFLAGS to the Python build environment.
Other flags can have unpredictable effects when Python uses different
commands to build than we do.
@
text
@d7 1
a7 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/python/GNUmakefile,v 1.4 2001/02/04 13:21:46 petere Exp $
d32 1
a32 1
	    -e 's,@@pg_includedir@@,$(top_srcdir)/src/include,g' \
@


1.4
log
@Pass LDFLAGS along with LIBS to the Python build stuff, especially to pick
up -L options.
@
text
@d7 1
a7 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/python/GNUmakefile,v 1.3 2000/12/30 00:24:09 petere Exp $
d31 1
a31 1
	    -e 's%@@EXTRA_LIBS@@%$(LDFLAGS) $(LIBS)%g' \
@


1.3
log
@Fix unportable use of '!' in shell commands.
@
text
@d7 1
a7 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/python/GNUmakefile,v 1.2 2000/08/31 16:12:01 petere Exp $
d31 1
a31 1
	    -e 's,@@EXTRA_LIBS@@,$(LIBS),g' \
@


1.2
log
@Fix relative path references so that make knowns which dependencies refer
to one another. Sort out builddir vs srcdir variable namings. Remove some
now obsoleted make variables.
@
text
@d7 1
a7 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/python/GNUmakefile,v 1.1 2000/06/28 18:30:07 petere Exp $
d37 2
a38 2
	@@if ! ( $(INSTALL_DATA) pg.py $(python_moduledir) && \
	    $(MAKE) -f Makefile install ); then \
@


1.1
log
@Makefile cleanup for interface tree. Now essentially with all the
standard targets and behaviour. Replaced Makefile.in's with
Makefile's and declared the respective variables in Makefile.global.

maintainer-clean target now available at top level, although it does
not work in the backend tree yet.

Cleanup pass over Makefile.shlib, renamed some targets and variables.
The shared library symlink tests are now done by make, not the shell.

ecpg: Remove one warning in sloppy flex output.

PL/Perl and Perl interface: the MakeMaker documentation is confusing,
the realclean target *does* "delete derived files", but it also
uninstalls them. Don't use that.

The submake targets in the various bin directories that update libpq
should `make all', not `make libpq.a'. That is a) unportable, and
b) doesn't build the shared library.
@
text
@d7 1
a7 1
# $Header$
d13 1
a13 1
include ../../Makefile.global
d20 1
a20 1
	$(MAKE) -C $(top_builddir)/src/interfaces/libpq all
d29 5
a33 4
	sed -e "s%__LIBPQ__%${top_srcdir}/src/interfaces/libpq%g" \
	    -e "s%__EXTRA_LIBS__%${LIBS}%g" \
	    -e "s%__INCLUDES__%${top_srcdir}/src/include%g" \
	    < $< > $@@
@
