head	1.24;
access;
symbols
	REL7_2_8:1.23
	REL7_2_7:1.23
	REL7_2_6:1.23
	REL7_2_5:1.23
	REL7_2_4:1.23
	REL7_2_3:1.23
	REL7_2_STABLE:1.23.0.2
	REL7_2:1.23
	REL7_2_RC2:1.23
	REL7_2_RC1:1.23
	REL7_2_BETA5:1.23
	REL7_2_BETA4:1.23
	REL7_2_BETA3:1.23
	REL7_2_BETA2:1.22
	REL7_2_BETA1:1.22
	REL7_1_2:1.15
	REL7_1_STABLE:1.15.0.2
	REL7_1_BETA:1.7
	REL7_1_BETA3:1.8
	REL7_1_BETA2:1.8
	REL7_1:1.15;
locks; strict;
comment	@# @;


1.24
date	2002.08.22.22.43.12;	author scrappy;	state dead;
branches;
next	1.23;

1.23
date	2001.11.12.00.54.28;	author inoue;	state Exp;
branches;
next	1.22;

1.22
date	2001.10.09.22.32.33;	author petere;	state Exp;
branches;
next	1.21;

1.21
date	2001.09.23.13.32.24;	author petere;	state Exp;
branches;
next	1.20;

1.20
date	2001.09.22.22.54.32;	author petere;	state Exp;
branches;
next	1.19;

1.19
date	2001.09.11.23.27.10;	author petere;	state Exp;
branches;
next	1.18;

1.18
date	2001.08.27.00.38.55;	author petere;	state Exp;
branches;
next	1.17;

1.17
date	2001.08.21.05.21.09;	author inoue;	state Exp;
branches;
next	1.16;

1.16
date	2001.05.11.01.46.33;	author momjian;	state Exp;
branches;
next	1.15;

1.15
date	2001.03.26.09.34.17;	author inoue;	state Exp;
branches;
next	1.14;

1.14
date	2001.02.20.19.20.29;	author petere;	state Exp;
branches;
next	1.13;

1.13
date	2001.02.14.05.45.38;	author momjian;	state Exp;
branches;
next	1.12;

1.12
date	2001.02.10.16.51.40;	author petere;	state Exp;
branches;
next	1.11;

1.11
date	2001.02.10.15.59.16;	author momjian;	state Exp;
branches;
next	1.10;

1.10
date	2001.02.10.11.31.35;	author momjian;	state Exp;
branches;
next	1.9;

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

1.8
date	2000.12.16.18.14.25;	author petere;	state Exp;
branches;
next	1.7;

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

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

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

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

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

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

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


desc
@@


1.24
log
@
Remove all traces of the ODBC driver, which is now on GBorg as the psqlodbc
project ...
@
text
@#-------------------------------------------------------------------------
#
# GNUMakefile for psqlodbc (Postgres ODBC driver)
#
# $Header: /cvsroot/pgsql-server/src/interfaces/odbc/GNUmakefile,v 1.23 2001/11/12 00:54:28 inoue Exp $
#
#-------------------------------------------------------------------------

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

# Shared library parameters
ifeq ($(with_unixodbc),yes)
NAME = odbcpsql
else
NAME = psqlodbc
endif
SO_MAJOR_VERSION = 0
SO_MINOR_VERSION = 27

override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) -DFRONTEND -DMD5_ODBC


OBJS = info.o bind.o columninfo.o connection.o convert.o drvconn.o \
        environ.o execute.o lobj.o md5.o misc.o options.o \
        pgtypes.o psqlodbc.o qresult.o results.o socket.o parse.o statement.o \
        tuple.o tuplelist.o dlg_specific.o odbcapi.o

ifdef MULTIBYTE
OBJS += multibyte.o
endif

SHLIB_LINK += $(filter -lm -lnsl -lsocket, $(LIBS))
ifeq ($(with_unixodbc),yes)
SHLIB_LINK += -lodbcinst
endif
ifeq ($(with_iodbc),yes)
SHLIB_LINK += -liodbcinst
endif
ifeq ($(with_unixodbc)$(with_iodbc),nono)
OBJS += gpps.o
override CPPFLAGS += -DODBCINSTDIR='"$(odbcinst_ini_dir)"'
endif

all: all-lib odbc-drop.sql

# Shared library stuff
include $(top_srcdir)/src/Makefile.shlib

# Symbols must be resolved to the version in the shared library because
# the driver manager (e.g., iodbc) provides some symbols with the same
# names and we don't want those.  (This issue is probably ELF specific.)
LINK.shared += $(shlib_symbolic)

odbc-drop.sql: odbc.sql
	sed -n '/^CREATE OR REPLACE FUNCTION/s/CREATE OR REPLACE FUNCTION \([^ (][^ (]*([^)]*)\).*/DROP FUNCTION \1;/p' $< >$@@

install: all installdirs
	$(INSTALL_DATA) $(srcdir)/odbc.sql $(DESTDIR)$(datadir)/odbc.sql
	$(INSTALL_DATA) odbc-drop.sql $(DESTDIR)$(datadir)/odbc-drop.sql
	$(MAKE) install-lib

installdirs:
	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(datadir)

uninstall: uninstall-lib
	rm -f $(DESTDIR)$(datadir)/odbc.sql $(DESTDIR)$(datadir)/odbc-drop.sql

clean distclean maintainer-clean: clean-lib
	rm -f $(OBJS)
	rm -f odbc-drop.sql
@


1.23
log
@Add md5 authentication support thanks to Bruce Momjian.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.22 2001/10/09 22:32:33 petere Exp $
@


1.22
log
@Allow optional () after current_user, session_user, user, current_time,
current_timestamp, current_date for ODBC compatibility.

Add more functions to odbc.sql catalog extension, use new CREATE OR
REPLACE FUNCTION.

Document iODBC/unixODBC build options.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.21 2001/09/23 13:32:24 petere Exp $
d22 1
a22 1
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
d26 1
a26 1
        environ.o execute.o lobj.o misc.o options.o \
@


1.21
log
@Don't refer to odbcinst.ini by absolute path.  SQLGetPrivateProfileString
handles this.

Don't install our own odbcinst.ini.  That's the driver manager's business.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.20 2001/09/22 22:54:32 petere Exp $
d46 1
a46 1
all: all-lib
d56 2
d61 1
d68 1
a68 1
	rm -f $(DESTDIR)$(datadir)/odbc.sql
d72 1
@


1.20
log
@Provide some initial support for building the ODBC driver for
an already installed iODBC or unixODBC driver manager.  In particular,
use the include files provided by the driver manager over our own,
and use the odbcinst library of the driver manager rather than gpps.c.

Migrate portability sections common to several files into psqlodbc.h.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.19 2001/09/11 23:27:10 petere Exp $
d22 1
a22 1
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) -DODBCINSTDIR='"$(odbcinst_ini_dir)"'
d43 1
a57 1
	$(INSTALL_DATA) $(srcdir)/odbcinst.ini $(DESTDIR)$(odbcinst_ini_dir)/odbcinst.ini
d62 1
a62 1
	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(odbcinst_ini_dir) $(DESTDIR)$(datadir)
a65 1
# XXX Uninstall the .ini file as well?
@


1.19
log
@Link ODBC driver with -lnsl and -lsocket, for Solaris.

reported by Bob Deblier (bob@@virtualunlimited.com)
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.18 2001/08/27 00:38:55 petere Exp $
d14 3
d18 1
d22 1
a22 1
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) -DHAVE_CONFIG_H -DODBCINSTDIR='"$(odbcinst_ini_dir)"'
d28 1
a28 1
        gpps.o tuple.o tuplelist.o dlg_specific.o odbcapi.o $(OBJX)
d34 10
a43 1
SHLIB_LINK = $(filter -lm -lnsl -lsocket, $(LIBS))
@


1.18
log
@Do not install the odbc header files, per discussion on odbc list.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.17 2001/08/21 05:21:09 inoue Exp $
d30 1
a30 1
SHLIB_LINK = $(filter -lm, $(LIBS))
@


1.17
log
@Fix a lot of compile errors on unix.
Fix '\\' handling for bytea type.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.16 2001/05/11 01:46:33 momjian Exp $
a41 2
odbc_headers = isql.h isqlext.h iodbc.h
odbc_includedir = $(includedir)/iodbc
a43 1
	for i in $(odbc_headers); do $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(odbc_includedir)/$$i || exit 1; done
d49 1
a49 1
	$(mkinstalldirs) $(DESTDIR)$(odbc_includedir) $(DESTDIR)$(libdir) $(DESTDIR)$(odbcinst_ini_dir) $(DESTDIR)$(datadir)
a51 1
	rm -f $(addprefix $(DESTDIR)$(odbc_includedir)/, $(odbc_headers))
a56 7

depend dep:
	$(CC) -MM $(CFLAGS) *.c >depend

ifeq (depend,$(wildcard depend))
include depend
endif
@


1.16
log
@Stamp CVS as 7.2.  Update all interface version numbers.  This is the
time to do it, not during beta because people are using this stuff in
production sometimes.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.15 2001/03/26 09:34:17 inoue Exp $
d24 1
a24 1
        gpps.o tuple.o tuplelist.o dlg_specific.o $(OBJX)
@


1.15
log
@Add multibyte support
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.14 2001/02/20 19:20:29 petere Exp $
d16 1
a16 1
SO_MINOR_VERSION = 26
@


1.14
log
@Make sure -L and -I's for our source tree are always before system include
or library directories on the command line.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.13 2001/02/14 05:45:38 momjian Exp $
d25 4
@


1.13
log
@Back out all ODBC formatting changes, and back out removal of <6.4
protocol. I have left in Tom's SOCK_get_next_byte() fix, and the new
win32.mak file addition.  I have also left in the 'X' connection close
fix.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.8 2000/12/16 18:14:25 petere Exp $
d18 1
a18 1
override CPPFLAGS += -I$(srcdir) -DHAVE_CONFIG_H -DODBCINSTDIR='"$(odbcinst_ini_dir)"'
@


1.12
log
@Repair BSD/OS shared library fixes.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.11 2001/02/10 15:59:16 momjian Exp $
d27 1
a35 1

@


1.11
log
@ODBC BSD/OS fix.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.10 2001/02/10 11:31:35 momjian Exp $
d35 1
a35 5
#
# BSD/OS fails with libc and crt1.o undefined symbols without this.
# bjm 2001-02-09
#
ifneq ($(PORTNAME), bsdi)
a36 4
else
LINK.shared = gcc -shared -Wl,-Bsymbolic,-soname,$(soname)
SHLIB_LINK += -lc
endif
@


1.10
log
@Allow -Bsymbolic on BSDI for ODBC.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.9 2001/02/10 05:50:27 momjian Exp $
d39 1
d41 3
a43 2
ifeq ($(PORTNAME), bsdi)
SHLIB_LINK += -lc -R /usr/lib/crt1.o
@


1.9
log
@Properly exit ODBC with 'X', allow linking on BSD/OS.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.8 2000/12/16 18:14:25 petere Exp $
a38 1
ifneq ($(PORTNAME), bsdi)
d40 2
@


1.8
log
@Fix linker options for ODBC driver.  See comment in
src/interfaces/odbc/GNUmakefile.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.7 2000/10/28 15:10:36 petere Exp $
a26 1

d35 5
d41 1
@


1.7
log
@Remove compiler warnings (add missing include files).  Only link against
-lm if it's actually there.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.6 2000/10/23 21:43:58 petere Exp $
d32 5
@


1.6
log
@Polish shared library build to reduce number of special hacks.  In
particular, allow linking with arbitrary commands rather than only $(AR) or
$(LD), and treat C++ without hacks.

Add option to disable shared libraries.  This takes the place of the
BSD_SHLIB variable.  The regression test driver ignores the plpgsql test
if there are no shared libraries available.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.5 2000/10/20 21:04:13 petere Exp $
d26 1
a26 1
SHLIB_LINK= -lm
@


1.5
log
@Add support for VPATH builds, that is, building somewhere else than in the
source directory.  This involves mostly makefiles using $(srcdir) when they
might have used ".".  (Regression tests don't work with this, yet.)

Sort out usage of CPPFLAGS, CFLAGS (and CXXFLAGS).  Add "override" keyword
in most places, to preserve necessary flags even when the user overrode the
flags.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.4 2000/09/18 20:11:37 petere Exp $
d26 1
a26 1
SHLIB_LINK= $(LD_FLAGS)
a31 2

LDFLAGS_SL+= $(LDFLAGS_ODBC)
@


1.4
log
@Move contrib/odbc/odbc.sql together with odbc driver, remove old files;
revise ODBC "installation instructions"; update some other outdated
documentation; update contrib documentation
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.3 2000/09/17 13:02:51 petere Exp $
d18 1
a18 1
CPPFLAGS += -I$(srcdir) -DHAVE_CONFIG_H -DODBCINSTDIR='"$(odbcinst_ini_dir)"'
d38 5
a42 1
install: all installdirs install-headers install-ini install-lib install-data
a45 12

.PHONY: install-headers
install-headers: $(odbc_headers)
	for i in $^; do $(INSTALL_DATA) $$i $(DESTDIR)$(odbc_includedir)/$$i || exit 1; done

.PHONY: install-ini
install-ini: odbcinst.ini
	$(INSTALL_DATA) $< $(DESTDIR)$(odbcinst_ini_dir)/$<

.PHONY: install-data
install-data: odbc.sql
	$(INSTALL_DATA) $< $(DESTDIR)$(datadir)/$<
@


1.3
log
@Support for DESTDIR make variable. This is used as in `make install
DESTDIR=/else/where' and prepends the value of DESTDIR to the full
installation paths (e.g., /else/where/usr/local/pgsql/bin). This allows
users to install the package into a location different from the one that
was configured and hard-coded into various scripts, e.g., for creating
binary packages.

DESTDIR is in many cases preferrable over `make install
prefix=/else/where' because

a) `prefix' affects the path that is hard-coded into the files, which can
lead to a `make install prefix=xxx' (as done by the regression test
driver) corrupting the files in the source tree with wrong paths.

b) it doesn't work at all if a directory was overridden to not depend on
`prefix', e.g., --sysconfdir=/etc.

(Updating the regression test driver to use DESTDIR is a separate
undertaking.)

See also autoconf@@gnu.org, From: Akim Demaille <akim@@epita.fr>, Date: 08
Sep 2000 12:48:59 +0200, Message-ID:
<mv4em2vb1lw.fsf@@nostromo.lrde.epita.fr>, Subject: Re: HTML format
documentation.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.2 2000/08/31 16:11:55 petere Exp $
d38 1
a38 1
install: all installdirs install-headers install-ini install-lib
d41 1
a41 1
	$(mkinstalldirs) $(DESTDIR)$(odbc_includedir) $(DESTDIR)$(libdir) $(DESTDIR)$(odbcinst_ini_dir)
d45 1
a45 1
	for i in $^; do $(INSTALL_DATA) $$i $(DESTDIR)$(odbc_includedir) || exit 1; done
d49 5
a53 1
	$(INSTALL_DATA) $< $(DESTDIR)$(odbcinst_ini_dir)
d57 2
@


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
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/GNUmakefile,v 1.1 2000/06/28 18:29:54 petere Exp $
d41 1
a41 1
	$(mkinstalldirs) $(odbc_includedir) $(libdir) $(odbcinst_ini_dir)
d45 1
a45 1
	for i in $^; do $(INSTALL_DATA) $$i $(odbc_includedir) || exit 1; done
d49 1
a49 1
	$(INSTALL_DATA) $< $(odbcinst_ini_dir)
d52 1
a52 1
	rm -f $(addprefix $(odbc_includedir)/, $(odbc_headers))
@


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
@d5 1
a5 1
# $Header$
d11 1
a11 1
include ../../Makefile.global
d18 1
a18 1
CFLAGS += -I$(srcdir) -DHAVE_CONFIG_H -DODBCINSTDIR='"$(odbcinst_ini_dir)"'
@
