head	1.16;
access;
symbols
	PG95_1_01:1.16
	PG95_1_0:1.15
	PG95_beta_03:1.14
	PG95_beta_02:1.7
	PG95_beta:1.7
	REL_0_4:1.1.1.1
	ANDREW_JOLLY:1.1.1;
locks; strict;
comment	@# @;


1.16
date	96.02.24.01.22.21;	author jolly;	state Exp;
branches;
next	1.15;

1.15
date	95.07.31.01.06.54;	author andrew;	state Exp;
branches;
next	1.14;

1.14
date	95.07.17.22.59.31;	author jolly;	state Exp;
branches;
next	1.13;

1.13
date	95.07.17.02.01.11;	author jolly;	state Exp;
branches;
next	1.12;

1.12
date	95.07.14.07.46.31;	author jolly;	state Exp;
branches;
next	1.11;

1.11
date	95.07.14.06.53.42;	author jolly;	state Exp;
branches;
next	1.10;

1.10
date	95.07.13.23.48.43;	author jolly;	state Exp;
branches;
next	1.9;

1.9
date	95.07.11.20.45.36;	author jolly;	state Exp;
branches;
next	1.8;

1.8
date	95.07.07.21.19.54;	author jolly;	state Exp;
branches;
next	1.7;

1.7
date	95.03.23.01.22.50;	author andrew;	state Exp;
branches;
next	1.6;

1.6
date	95.03.21.09.43.13;	author andrew;	state Exp;
branches;
next	1.5;

1.5
date	95.03.21.06.59.52;	author andrew;	state Exp;
branches;
next	1.4;

1.4
date	95.01.16.22.42.42;	author jolly;	state Exp;
branches;
next	1.3;

1.3
date	94.11.30.23.54.12;	author andrew;	state Exp;
branches;
next	1.2;

1.2
date	94.11.11.22.50.25;	author andrew;	state Exp;
branches;
next	1.1;

1.1
date	94.11.07.05.20.11;	author andrew;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	94.11.07.05.20.12;	author andrew;	state Exp;
branches;
next	;


desc
@@


1.16
log
@added a PQdisplayTuples() to print out tuples in  filled columns
@
text
@#-------------------------------------------------------------------------
#
# Makefile
#    Makefile for libpq library
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
#    $Header: /home/jolly/POSTGRES_MASTER_CVS/src/libpq/Makefile,v 1.15 1995/07/31 01:06:54 andrew Exp $
#
#-------------------------------------------------------------------------

LIB=	pq

MKDIR=	../mk
include $(MKDIR)/postgres.mk

CFLAGS+= -I$(srcdir)/backend/include \
	-I$(srcdir)/backend \
	-I$(CURDIR) \

ifdef KRBVERS
CFLAGS+= $(KRBFLAGS)
endif

# dllist.c is found in backend/lib
VPATH:= $(VPATH):$(srcdir)/backend/lib

LIBSRCS= fe-auth.c fe-connect.c fe-exec.c fe-misc.c fe-lobj.c \
	dllist.c pqsignal.c 
ifeq ($(PORTNAME), next)
VPATH:=$(VPATH):$(srcdir)/backend/port/$(PORTNAME)
LIBSRCS+= getcwd.c putenv.c
endif


.PHONY: beforeinstall-headers install-headers

ifndef NO_BEFOREINSTL
beforeinstall-headers:
	@@-if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
	@@-if [ ! -d $(HEADERDIR)/port ]; then mkdir $(HEADERDIR)/port; fi
	@@-if [ ! -d $(HEADERDIR)/port/$(PORTNAME) ]; \
		then mkdir $(HEADERDIR)/port/$(PORTNAME); fi
	@@-if [ ! -d $(HEADERDIR)/include ]; \
		then mkdir $(HEADERDIR)/include; fi
	@@-if [ ! -d $(HEADERDIR)/lib ]; \
		then mkdir $(HEADERDIR)/lib; fi
	@@-if [ ! -d $(HEADERDIR)/libpq ]; \
		then mkdir $(HEADERDIR)/libpq; fi
	@@-if [ ! -d $(HEADERDIR)/utils ]; \
		then mkdir $(HEADERDIR)/utils; fi
else
beforeinstall-headers: .dosomething
endif

HEADERFILES = include/postgres.h \
	      libpq/pqcomm.h \
	      libpq/libpq-fs.h \
	      lib/dllist.h \
	      utils/geo-decls.h

ifeq ($(PORTNAME), hpux)
HEADERFILES += port/hpux/fixade.h
endif


TEMPDIR=/tmp

install-headers: beforeinstall-headers
	@@for i in ${HEADERFILES}; do \
		echo "Installing $(HEADERDIR)/$$i."; \
		$(INSTALL) $(INSTLOPTS) $(srcdir)/backend/$$i $(HEADERDIR)/$$i; \
	done
	$(INSTALL) $(INSTLOPTS) libpq-fe.h $(HEADERDIR)/libpq-fe.h
	@@mv -f $(HEADERDIR)/include/* $(HEADERDIR)
	@@rmdir $(HEADERDIR)/include
#	XXX - installing fmgr.h depends on the backend being built
	$(INSTALL) $(INSTLOPTS) $(srcdir)/backend/$(objdir)/fmgr.h $(HEADERDIR)/fmgr.h
	@@rm -f $(TEMPDIR)/c.h
	@@echo "#undef PORTNAME" >  $(TEMPDIR)/c.h
	@@echo "#define PORTNAME $(PORTNAME)" >> $(TEMPDIR)/c.h
	@@echo "#undef PORTNAME_$(PORTNAME)" >>  $(TEMPDIR)/c.h
	@@echo "#define PORTNAME_$(PORTNAME)" >> $(TEMPDIR)/c.h
	@@cat $(srcdir)/backend/include/c.h >> $(TEMPDIR)/c.h
	$(INSTALL) $(INSTLOPTS) $(TEMPDIR)/c.h $(HEADERDIR)/c.h
	@@rm -f $(TEMPDIR)/postgres.h
# hardwire NAMEDATALEN and OIDNAMELEN into the postgres.h for this installation
	@@echo "#define NAMEDATALEN $(NAMEDATALEN)" >> $(TEMPDIR)/postgres.h
	@@echo "#define OIDNAMELEN $(OIDNAMELEN)" >> $(TEMPDIR)/postgres.h
	@@cat $(srcdir)/backend/include/postgres.h >> $(TEMPDIR)/postgres.h
	$(INSTALL) $(INSTLOPTS) $(TEMPDIR)/postgres.h $(HEADERDIR)/postgres.h

install:: install-headers

include $(MKDIR)/postgres.lib.mk

@


1.15
log
@more files to include
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/libpq/Makefile,v 1.14 1995/07/17 22:59:31 jolly Exp $
d32 5
d68 3
d74 1
a74 1
		$(INSTALL) -c -m 444 $(srcdir)/backend/$$i $(HEADERDIR)/$$i; \
d76 1
a76 1
	$(INSTALL) -c -m 444 libpq-fe.h $(HEADERDIR)/libpq-fe.h
d80 14
a93 8
	$(INSTALL) -c -m 444 $(srcdir)/backend/$(objdir)/fmgr.h $(HEADERDIR)/fmgr.h
	@@rm -f ${HEADERDIR}/c.h
	@@echo "#undef PORTNAME" >  $(HEADERDIR)/c.h
	@@echo "#define PORTNAME $(PORTNAME)" >> $(HEADERDIR)/c.h
	@@echo "#undef PORTNAME_$(PORTNAME)" >>  $(HEADERDIR)/c.h
	@@echo "#define PORTNAME_$(PORTNAME)" >> $(HEADERDIR)/c.h
	@@cat $(srcdir)/backend/include/c.h >> $(HEADERDIR)/c.h
	@@chmod 444 $(HEADERDIR)/c.h
@


1.14
log
@*** empty log message ***
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/libpq/Makefile,v 1.13 1995/07/17 02:01:11 jolly Exp $
d59 4
@


1.13
log
@minor cleanup
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/libpq/Makefile,v 1.12 1995/07/14 07:46:31 jolly Exp $
d33 1
a33 1
.PHONY: beforeinstall-headers
@


1.12
log
@added libpq-fs.h as an install .h
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/libpq/Makefile,v 1.11 1995/07/14 06:53:42 jolly Exp $
d30 2
a31 2
LIBSRCS= fe-auth.c fe-connect.c fe-exec.c fe-misc.c fe-lobj.c pqsignal.c \
	dllist.c
a32 1

d47 2
d56 2
a57 1
	      lib/dllist.h
@


1.11
log
@shuffled things around so there is now as little dependence as possible
on the backend/libpq directory.
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/libpq/Makefile,v 1.10 1995/07/13 23:48:43 jolly Exp $
d54 1
@


1.10
log
@made PQfn() work
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/libpq/Makefile,v 1.9 1995/07/11 20:45:36 jolly Exp $
d33 28
a60 1
install-headers:
d62 11
@


1.9
log
@libpq has been completely revamped

Major changes:
  - a single front-end can now connect to multiple connections.  All
    calls take in an additional "connection" argument.
  - query results are still accessed by PQ* functions but the number
    of functions has been reduced.  The PortalBuffer structure has
    been replaced with PGresult.  Ragged "groups" of tuples are no longer
    supported.
  - libpq itself takes care of the looping through multiple messages
    when the backend responds with multiple messages
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/libpq/Makefile,v 1.8 1995/07/07 21:19:54 jolly Exp $
d30 2
a31 1
LIBSRCS= fe-auth.c fe-connect.c fe-exec.c fe-misc.c pqsignal.c dllist.c
@


1.8
log
@Major overhaul of the libpq interface.

Now, a frontend client can make multiple connections to the backend because
every PQ function has a PGconn* argument which encapsulates the state of
a fe/be connection.

The PortalBuffer stuff has been replaced with the PGresult data structure.
We no longer deal with groups of tuples.  All queries return the same type
of tuples back.
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/libpgtcl/Makefile,v 1.4 1995/03/23 01:22:49 andrew Exp $
d27 2
a28 1
LIBSRCS= fe-auth.c fe-connect.c fe-exec.c fe-misc.c pqsignal.c
d30 2
@


1.7
log
@works for hpux, sparc and ultrix4 ports
@
text
@d3 1
a3 1
# Makefile.inc--
d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/libpq/Makefile,v 1.6 1995/03/21 09:43:13 andrew Exp $
d19 3
a21 2
VPATH:= $(VPATH):$(srcdir)/backend/libpq:$(srcdir)/backend/utils/error:\
	$(srcdir)/backend/utils/hash:$(srcdir)/backend/lib
d23 2
a24 51
CFLAGS+= -DFRONTEND \
	-I$(srcdir)/backend/$(objdir) \
	-I$(srcdir)/backend/include \
	-I$(srcdir)/backend

#.ifdef KRBVERS
#CFLAGS+= ${KRBFLAGS}
#.endif

LIBSRCS= fe-dumpdata.c fe-pqexec.c fe-pqstubs.c fe-pqufs.c \
	auth.c portal.c portalbuf.c pqcomm.c pqpacket.c pqsignal.c \
	dynahash.c format.c hashfn.c dllist.c

#NOPROFILE=1

#
# We install the necessary header files from the backend directory
# into ${HEADERDIR}.  If this is installed into /usr/include/postgres
# (not the default), then frontend programs could just reference
# the header files as
#
#	#include <postgres/...>
#
# otherwise, the compile line will have to include a directive
# such as in the following example:
#
#	cc -I/usr/local/postgres/include foo.c
#
# -----
#
# We take advantage of the fact that frontend applications
# all will include "c.h" by prepending macro definitions
# to define PORTNAME and PORTNAME_name to c.h.  Otherwise
# the applications would have to define these by hand to get
# the right behavior.
#
# By the way, this is of course a total crock.  The headers
# should be laid out such that the visible public headers
# are all in a separate directory, and just that directory
# would need to be copied out or symlinked to.
#

HEADERFILES= port/$(PORTNAME)/machine.h catalog/pg_user.h \
	storage/ipc.h tcop/fastpath.h libpq/libpq-be.h include/libpq-fe.h \
	libpq/libpq-fs.h libpq/libpq.h include/postgres.h libpq/pqcomm.h \
	lib/dllist.h utils/dynamic_loader.h utils/exc.h \
	utils/geo-decls.h utils/elog.h utils/palloc.h \
	libpq/auth.h libpq/pqsignal.h

ifeq ($(PORTNAME), hpux)
HEADERFILES+= port/$(PORTNAME)/fixade.h
d27 1
a27 1
.PHONY: beforeinstall-headers
d29 2
a30 40
ifndef NO_BEFOREINSTL
beforeinstall-headers:
	@@-if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
	@@-if [ ! -d $(HEADERDIR)/port ]; then mkdir $(HEADERDIR)/port; fi
	@@-if [ ! -d $(HEADERDIR)/port/$(PORTNAME) ]; \
		then mkdir $(HEADERDIR)/port/$(PORTNAME); fi
	@@-if [ ! -d $(HEADERDIR)/catalog ]; \
		then mkdir $(HEADERDIR)/catalog; fi
	@@-if [ ! -d $(HEADERDIR)/storage ]; \
		then mkdir $(HEADERDIR)/storage; fi
	@@-if [ ! -d $(HEADERDIR)/utils ]; \
		then mkdir $(HEADERDIR)/utils; fi
	@@-if [ ! -d $(HEADERDIR)/include ]; \
		then mkdir $(HEADERDIR)/include; fi
	@@-if [ ! -d $(HEADERDIR)/lib ]; \
		then mkdir $(HEADERDIR)/lib; fi
	@@-if [ ! -d $(HEADERDIR)/libpq ]; \
		then mkdir $(HEADERDIR)/libpq; fi
	@@-if [ ! -d $(HEADERDIR)/tcop ]; \
		then mkdir $(HEADERDIR)/tcop; fi
else
beforeinstall-headers: .dosomething
endif

install-headers: beforeinstall-headers
	@@for i in ${HEADERFILES}; do \
		echo "Installing $(HEADERDIR)/$$i."; \
		$(INSTALL) -c -m 444 $(srcdir)/backend/$$i $(HEADERDIR)/$$i; \
	done
	@@mv -f $(HEADERDIR)/include/* $(HEADERDIR)
	@@rmdir $(HEADERDIR)/include
#	XXX - installing fmgr.h depends on the backend being built
	$(INSTALL) -c -m 444 $(srcdir)/backend/$(objdir)/fmgr.h $(HEADERDIR)/fmgr.h
	@@rm -f ${HEADERDIR}/c.h
	@@echo "#undef PORTNAME" >  $(HEADERDIR)/c.h
	@@echo "#define PORTNAME $(PORTNAME)" >> $(HEADERDIR)/c.h
	@@echo "#undef PORTNAME_$(PORTNAME)" >>  $(HEADERDIR)/c.h
	@@echo "#define PORTNAME_$(PORTNAME)" >> $(HEADERDIR)/c.h
	@@cat $(srcdir)/backend/include/c.h >> $(HEADERDIR)/c.h
	@@chmod 444 $(HEADERDIR)/c.h
d35 1
@


1.6
log
@just use -L to search libpq, instead of doing it manually
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/libpq/Makefile,v 1.5 1995/03/21 06:59:52 andrew Exp $
d77 1
d97 3
@


1.5
log
@switch over to gmake
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/libpq/Makefile,v 1.4 1995/01/16 22:42:42 jolly Exp $
d109 1
a109 1
	@@echo "#undef PORTNAME_$(PORTNAME)" >  $(HEADERDIR)/c.h
@


1.4
log
@replaced simplelists with dllists
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/libpq/Makefile,v 1.3 1994/11/30 23:54:12 andrew Exp $
d14 1
a14 1
.include <postgres.global.mk>
d16 2
a17 1
LIB= pq
d19 2
a20 4
.PATH:	${.CURDIR}/../backend/libpq \
	${.CURDIR}/../backend/utils/error \
	${.CURDIR}/../backend/utils/hash \
	${.CURDIR}/../backend/lib
d23 7
a29 7
	-I${.CURDIR}/../backend/${MAKEOBJDIR} \
	-I${.CURDIR}/../backend/include \
	-I${.CURDIR}/../backend

.ifdef KRBVERS
CFLAGS+= ${KRBFLAGS}
.endif
d31 1
a31 1
SRCS=	fe-dumpdata.c fe-pqexec.c fe-pqstubs.c fe-pqufs.c \
d35 1
a35 1
NOPROFILE=1
a36 6
.if defined(OLD_MKDIR)
beforeinstall:
	@@-if test ! -d ${DESTDIR}${LIBDIR}; \
		then mkdir ${DESTDIR}${LIBDIR}; fi
.endif

d53 2
a54 2
# all will include "tmp/c.h" by prepending macro definitions
# to define PORTNAME and PORTNAME_name to tmp/c.h.  Otherwise
d64 1
a64 1
HEADERFILES= port/${PORTNAME}/machine.h catalog/pg_user.h \
d68 2
a69 1
	utils/geo-decls.h libpq/auth.h libpq/pqsignal.h
d71 30
a100 28
.if (${PORTNAME} == "hpux")
HEADERFILES+= port/${PORTNAME}/fixade.h
.endif

install-headers::
.if defined(OLD_MKDIR)
	@@-if [ ! -d ${HEADERDIR} ]; then mkdir ${HEADERDIR}; fi
	@@-if [ ! -d ${HEADERDIR}/port ]; then mkdir ${HEADERDIR}/port; fi
	@@-if [ ! -d ${HEADERDIR}/port/${PORTNAME} ]; \
		then mkdir ${HEADERDIR}/port/${PORTNAME}; fi
	@@-if [ ! -d ${HEADERDIR}/catalog ]; \
		then mkdir ${HEADERDIR}/catalog; fi
	@@-if [ ! -d ${HEADERDIR}/storage ]; \
		then mkdir ${HEADERDIR}/storage; fi
	@@-if [ ! -d ${HEADERDIR}/utils ]; \
		then mkdir ${HEADERDIR}/utils; fi
	@@-if [ ! -d ${HEADERDIR}/include ]; \
		then mkdir ${HEADERDIR}/include; fi
	@@-if [ ! -d ${HEADERDIR}/lib ]; \
		then mkdir ${HEADERDIR}/lib; fi
	@@-if [ ! -d ${HEADERDIR}/libpq ]; \
		then mkdir ${HEADERDIR}/libpq; fi
	@@-if [ ! -d ${HEADERDIR}/tcop ]; \
		then mkdir ${HEADERDIR}/tcop; fi
.endif
	-for i in ${HEADERFILES}; do \
		${INSTALL} -c -m 444 \
			${.CURDIR}/../backend/$$i ${HEADERDIR}/$$i; \
d102 2
a103 2
	-mv -f ${HEADERDIR}/include/* ${HEADERDIR}
	-rmdir ${HEADERDIR}/include
d105 8
a112 7
	${INSTALL} -c -m 444 \
		${.CURDIR}/../backend/${MAKEOBJDIR}/fmgr.h ${HEADERDIR}/fmgr.h
	-rm -f ${HEADERDIR}/c.h
	-echo "#define PORTNAME ${PORTNAME}" > ${HEADERDIR}/c.h
	-echo "#define PORTNAME_${PORTNAME}" >> ${HEADERDIR}/c.h
	-cat ${.CURDIR}/../backend/include/c.h >> ${HEADERDIR}/c.h
	-chmod 444 ${HEADERDIR}/c.h
d114 1
a114 1
.include <postgres.lib.mk>
d116 1
a116 1
install: install-headers
@


1.3
log
@large obj (libpq interface)
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/libpq/Makefile,v 1.2 1994/11/11 22:50:25 andrew Exp $
d34 1
a34 1
	dynahash.c format.c hashfn.c simplelists.c
d74 1
a74 1
	lib/simplelists.h utils/dynamic_loader.h utils/exc.h \
@


1.2
log
@execipc.h, ipci.h removed
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/libpq/Makefile,v 1.1.1.1 1994/11/07 05:20:12 andrew Exp $
d71 1
a71 1
HEADERFILES= port/${PORTNAME}/machine.h catalog/pg_user.h catalog/pg_lobj.h \
@


1.1
log
@Initial revision
@
text
@d10 1
a10 1
#    $Header: $
d72 1
a72 2
	storage/execipc.h storage/ipc.h storage/ipci.h \
	tcop/fastpath.h libpq/libpq-be.h include/libpq-fe.h \
@


1.1.1.1
log
@Copyright (c) 1994, POSTGRES Lite   Andrew Yu and Jolly Chen
@
text
@@
