head	1.9;
access;
symbols
	REL_0_4:1.1.1.1
	ANDREW_JOLLY:1.1.1;
locks; strict;
comment	@# @;


1.9
date	95.05.01.08.04.26;	author andrew;	state Exp;
branches;
next	1.8;

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

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

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

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

1.4
date	95.03.22.20.07.40;	author andrew;	state Exp;
branches;
next	1.3;

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

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

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

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


desc
@@


1.9
log
@new sample.regress.out. change time queries with 'now' so that we can
do diff more easily.
@
text
@#-------------------------------------------------------------------------
#
# Makefile--
#    Makefile for regress (the regression test)
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
#    $Header: /usr/local/devel/pglite/cvs/src/test/regress/Makefile,v 1.8 1995/04/08 03:48:36 andrew Exp $
#
#-------------------------------------------------------------------------

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

#
# try locating libpq.a in the following places
#
LIBPQ:=  -L$(srcdir)/libpq/$(objdir) -L$(LIBDIR) -lpq

LDADD+= $(LIBPQ)

#
# build sample apps
#
TESTPROGS=	iportal
TESTOBJS=	iportal.o

iportal: $(objdir)/iportal.o
	$(CC) $(LDFLAGS) -o $(objdir)/$@@ $(objdir)/$(<F) $(LDADD)


#
# build dynamically-loaded object files
#
DLOBJS= regress.o 

#
# ... plus test query inputs
#
CREATEFILES= $(DLOBJS:%=$(objdir)/%) $(TESTPROGS) $(TESTOBJS:%=$(objdir)/%) \
	create.sql queries.sql errors.sql destroy.sql security.sql


include $(MKDIR)/postgres.user.mk


OUTFILES= stud_emp.data onek.data regress.out aportal.out

CLEANFILES+= $(notdir $(CREATEFILES)) $(OUTFILES)

$(OUTFILES): $(CREATEFILES)
	$(SHELL) ./regress.sh 2>&1 | tee $(objdir)/regress.out
	@@echo "RESULTS OF REGRESSION ARE SAVED IN $(objdir)/regress.out"

#
# prepare to run the test (including clean-up after the last run)
#
all:: $(CREATEFILES)
	cd $(objdir); rm -f $(OUTFILES)

#
# run the test
#
runtest: regress.out

#
# installation
#
install: localobj all
@


1.8
log
@have install do localobj also
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/test/regress/Makefile,v 1.7 1995/03/28 18:42:18 andrew Exp $
d43 1
a43 1
	create.sql queries.sql errors.sql destroy.sql
@


1.7
log
@fix iportal.o left in obj/..
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/test/regress/Makefile,v 1.6 1995/03/23 21:45:09 andrew Exp $
d71 1
a71 1
install: all
@


1.6
log
@use LDADD in linking iportal
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/test/regress/Makefile,v 1.5 1995/03/23 01:22:58 andrew Exp $
d42 1
a42 1
CREATEFILES= $(DLOBJS:%=$(objdir)/%) $(TESTPROGS) $(TESTOBJS) \
@


1.5
log
@works for hpux, sparc and ultrix4 ports
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/test/regress/Makefile,v 1.4 1995/03/22 20:07:40 andrew Exp $
d22 1
d31 1
a31 1
	$(CC) $(LDFLAGS) -o $(objdir)/$@@ $(objdir)/$(<F) $(LIBPQ)
@


1.4
log
@fix dependencies
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/test/regress/Makefile,v 1.3 1995/03/21 07:00:21 andrew Exp $
d20 1
a20 3
libpq1:=  $(srcdir)/libpq/$(objdir)/libpq.a
libpq2:=  $(LIBDIR)/libpq.a
LIBPQ:=   $(shell if [ -e $(libpq1) ]; then echo $(libpq1); elif [ -e $(libpq2) ]; then echo $(libpq2); else echo '-lpq'; fi;)
@


1.3
log
@switch over to gmake
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/test/regress/Makefile,v 1.2 1994/11/30 00:29:59 andrew Exp $
d31 1
a31 1
iportal: iportal.o
d43 1
a43 1
CREATEFILES= $(DLOBJS) $(TESTPROGS) $(TESTOBJS) \
d52 1
a52 1
CLEANFILES+= $(CREATEFILES) $(OUTFILES)
d62 1
a62 1
	rm -f $(OUTFILES)
@


1.2
log
@iportal stuff
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/test/regress/Makefile,v 1.1.1.1 1994/11/07 05:20:01 andrew Exp $
d14 2
a15 1
.include <postgres.global.mk>
d18 1
a18 1
# try locating libpq.a in the following places (bletch...)
d20 3
a22 20
L1= ${.CURDIR}/../../libpq/${MAKEOBJDIR}/libpq.a
L2= ${.CURDIR}/../../libpq/libpq.a
L3= ${LIBDIR}/libpq.a
L4= ${.CURDIR}/../../../lib/libpq.a

.if exists(${L1})
LIBPQ= ${L1}
.elif exists(${L2})
LIBPQ= ${L2}
.elif exists(${L3})
LIBPQ= ${L3}
.elif exists(${L4})
LIBPQ= ${L4}
.elifmake all || runtest
.BEGIN:
        @@echo "regress: Makefile error: can't find where you installed libpq.a,"
        @@echo 'try running "bmake all install" again.'
${PROG}: STOP_THE_MAKEFILE
        false
.endif
a23 1
LDADD+= ${LIBPQ}
d28 2
a30 4
TESTPROGS= iportal

TESTOBJS= iportal.o

d32 1
a32 1
	${CC} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} ${LDADD}
a33 1
.include <postgres.prog.mk>
d43 2
a44 4
CREATEFILES= ${DLOBJS} \
	${TESTPROGS} \
	${TESTOBJS} \
	create.pq queries.pq errors.pq destroy.pq
d47 2
a48 24
#
# ... plus exports files
#
.if defined(EXPSUFF)
CREATEFILES+= ${DLOBJS:S/.o/${EXPSUFF}/g}
.  if (${PORTNAME} == "aix")
UFP: .USE
	${LD} -H512 -T512 -o ${.TARGET} -e _nostart \
		-bI:${LIBDIR}/pg_ufp.exp -bE:$*${EXPSUFF} $*.o \
		-lm -lc 2>/dev/null
.  endif
.endif

#
# ... plus shared libraries
#
.if defined(SLSUFF)
.  if (${SLSUFF} != ".o")
CREATEFILES+= ${DLOBJS:S/.o/${SLSUFF}/g}
.    if (${PORTNAME} == "alpha")
CLEANFILES+= so_locations
.    endif
.  endif
.endif
a50 1
CLEANFILES+= ${CREATEFILES} ${OUTFILES}
d52 1
a52 3
${OUTFILES}: ${CREATEFILES} ${PROG}
	${SHCMD} ${.CURDIR}/regress.sh 2>&1 | tee regress.out
	@@echo "RESULTS OF REGRESSION ARE SAVED IN ${MAKEOBJDIR}/regress.out"
d54 4
d61 2
a62 2
all: ${CREATEFILES}
	rm -f ${OUTFILES}
d68 5
@


1.1
log
@Initial revision
@
text
@d10 1
a10 1
#    $Header: $
d46 7
d64 2
@


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