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


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

1.15
date	95.10.18.03.15.38;	author jolly;	state Exp;
branches;
next	1.14;

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

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

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

1.11
date	95.05.25.22.51.07;	author andrew;	state Exp;
branches;
next	1.10;

1.10
date	95.05.05.18.07.21;	author andrew;	state Exp;
branches;
next	1.9;

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

1.8
date	95.05.01.03.05.18;	author andrew;	state Exp;
branches;
next	1.7;

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

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

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

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

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

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

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

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


desc
@@


1.16
log
@*** empty log message ***
@
text
@#-------------------------------------------------------------------------
#
# Makefile.inc--
#    Makefile for bin/psql
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
#    $Header: /home/jolly/POSTGRES_MASTER_CVS/src/bin/psql/Makefile,v 1.15 1995/10/18 03:15:38 jolly Exp $
#
#-------------------------------------------------------------------------

PROG= psql

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

#
#USE_READLINE is set in Makefile.global
# 

ifeq ($(USE_READLINE), true)
   CFLAGS += -I$(READLINE_INCDIR) -I$(HISTORY_INCDIR)

# if you are using an older readline that uses #include "readline.h" instead
# of #include <readline/readline.h>,
# uncomment this
# CFLAGS += -DOLD_READLINE

   LIBCURSES=	-lcurses
   LD_ADD += -L$(READLINE_LIBDIR) -L$(HISTORY_LIBDIR) -lreadline -lhistory $(LIBCURSES)
# use the following if your readline has no separate history lib
#   LD_ADD += -L$(READLINE_LIBDIR) -lreadline $(LIBCURSES)

   ifeq ($(PORTNAME), ultrix4)
   LD_ADD += -ltermcap
   else
   ifeq ($(PORTNAME), sparc)
   LD_ADD += -ltermcap
   else
   ifeq ($(PORTNAME), linux)
   LD_ADD += -ltermcap
   endif
   ifeq ($(PORTNAME), next)
   LD_ADD += -ltermcap
   endif
   endif
   endif
else
   CFLAGS += -DNOREADLINE
endif

SRCS= psql.c stringutils.c 

ifneq ($(USE_READLINE), true)
SRCS+= rlstubs.c
endif

include $(MKDIR)/postgres.prog.mk




@


1.15
log
@add in #ifdef for OLD_READLINE
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.14 1995/07/11 20:39:55 jolly Exp $
d20 3
a22 8
# About the use of readline:
#    psql does not require the GNU readline and history libraries. Hence, we
#    do not compile with them by default. However, there are hooks in the
#    program which supports the use of GNU readline and history. Should you
#    decide to use them, change USE_READLINE to true and change READLINE_INCDIR
#    and READLINE_LIBDIR to reflect the location of the readline and histroy
#    headers and libraries.
#USE_READLINE= true
d25 1
a25 1
   CFLAGS += -I$(READLINE_INCDIR)
d28 1
a28 1
# of #include <readline.h>,
d33 3
a35 1
   LD_ADD += -L$(READLINE_LIBDIR) -lreadline -lhistory $(LIBCURSES)
d42 7
@


1.14
log
@migrated psql to use the new libpq.  Eliminates the need for the libtdb
layer.

psql checks for async notification with each command
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.13 1995/05/26 01:23:04 jolly Exp $
d31 6
@


1.13
log
@moved READLINE_INCDIR and READLINE_LIBDIR out of here up into
Makefile.global
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.12 1995/05/26 01:19:03 jolly Exp $
d14 2
d18 1
a28 6

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

d45 1
a45 9
LIB=	tdb
LIBSRCS= tdb.c tgPrint.c pqutils.c stringutils.c

PROG= psql
ifndef LINUX_ELF
SRCS= psql.c $(LIBSRCS)
else
SRCS= psql.c
endif
a50 15
ifndef LINUX_ELF
$(PROG):	libtdb.a

LD_ADD+= -L$(srcdir)/libpq/$(objdir) -L$(LIBDIR) -lpq

all:: $(PROG) 
else
LD_ADD+= $(objdir)/libtdb.so.1 \
	-L$(srcdir)/libpq/$(objdir) -L$(LIBDIR) -lpq
  
all:: libtdb.so.1 $(PROG) 
endif


include $(MKDIR)/postgres.lib.mk
@


1.12
log
@USE_READLINE is by turned off by default

to turn it on, set it in Makefile.global
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.11 1995/05/25 22:51:07 andrew Exp $
a25 3
# directories for the readline and history libraries.
READLINE_INCDIR=  /usr/sww/include
READLINE_LIBDIR=  /usr/sww/lib
a26 1

@


1.11
log
@Brian Gallew's Linux ELF patch
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.10 1995/05/05 18:07:21 andrew Exp $
d24 1
a24 1
USE_READLINE= true
d36 1
a36 3
ifeq ($(USE_READLINE), false)
   CFLAGS += -DNOREADLINE
else
d48 2
d62 1
a62 1
ifeq ($(USE_READLINE), false)
@


1.10
log
@psql depends on libtdb.a
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.9 1995/05/05 16:30:48 jolly Exp $
d56 1
d58 3
d66 1
d72 7
@


1.9
log
@make the sources for libtdb part of the SRCS and don't both with linking
with -ltdb at all.  In this way, changes in tdb.c will force a recompile
of psql
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.8 1995/05/01 03:05:18 andrew Exp $
d62 1
d66 1
a66 1
all:: libtdb.a $(PROG) 
@


1.8
log
@psql can now be compiled without the readline libraries
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.7 1995/04/30 07:03:14 andrew Exp $
d56 1
a56 1
SRCS= psql.c
d63 1
a63 2
LD_ADD+= $(objdir)/libtdb.a \
	-L$(srcdir)/libpq/$(objdir) -L$(LIBDIR) -lpq
a66 1

d71 2
@


1.7
log
@READLINE_{INCDIR,LIBDIR} moved to src/Makefile.global
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.6 1995/03/22 20:05:53 andrew Exp $
d17 12
d30 2
a31 1
CFLAGS += -I$(CURDIR) -I$(READLINE_INCDIR) \
d36 2
a37 5
LIBCURSES=	-lcurses
LD_ADD += -L$(READLINE_LIBDIR) -lreadline -lhistory $(LIBCURSES)

ifeq ($(PORTNAME), ultrix4)
LD_ADD += -ltermcap
d39 11
a49 2
ifeq ($(PORTNAME), sparc)
LD_ADD += -ltermcap
a50 2
endif

d58 5
@


1.6
log
@put postgres.lib.mk before postgres.prog.mk so that the library gets
installed first
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.5 1995/03/21 09:42:49 andrew Exp $
a16 3
# directories for the readline and history libraries
READLINE_INCDIR =  /usr/sww/include
READLINE_LIBDIR =  /usr/sww/lib
@


1.5
log
@makefile for psql now fixed
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.4 1995/02/03 00:55:36 jolly Exp $
d50 1
a51 1
include $(MKDIR)/postgres.lib.mk
@


1.4
log
@*** empty log message ***
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.3 1994/12/26 23:43:03 andrew Exp $
d14 2
a15 1
.include <postgres.global.mk>
d21 15
a35 7
CFLAGS += -I${.CURDIR} -I${READLINE_INCDIR} 
LDFLAGS += -L${READLINE_LIBDIR}
LDADD += -lreadline -lhistory ${LIBCURSES}

.if (${PORTNAME} == "ultrix4" || ${PORTNAME} == "sparc")
LDADD += -ltermcap
.endif
d37 4
d42 1
d44 2
a45 1
SRCS= tdb.c tgPrint.c pqutils.c stringutils.c psql.c
d47 1
a47 1
LIB = tdb
a48 2
${PROG}: psql.o libtdb.a
	${CC} -o ${.TARGET} psql.o libtdb.a ${LDFLAGS} ${LDADD} 
d50 2
a51 1
.include <postgres.prog.mk>
a52 1
.include <postgres.lib.mk>
@


1.3
log
@sparc needs termcap too
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.2 1994/11/11 21:24:56 andrew Exp $
d30 1
a30 1
SRCS= tdb.c tgPrint.c pqutils.c stringutils.c
@


1.2
log
@ultrix need -ltermcap
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/psql/Makefile,v 1.1.1.1 1994/11/07 05:20:11 andrew Exp $
d24 1
a24 1
.if (${PORTNAME} == "ultrix4")
@


1.1
log
@Initial revision
@
text
@d10 1
a10 1
#    $Header: $
d23 4
@


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