head	1.21;
access;
symbols
	start:1.1.1.1 jtv:1.1.1;
locks; strict;
comment	@# @;


1.21
date	2002.03.30.23.01.53;	author jtv;	state dead;
branches;
next	1.20;

1.20
date	2002.03.26.20.41.20;	author jtv;	state Exp;
branches;
next	1.19;

1.19
date	2002.03.22.01.35.22;	author jtv;	state Exp;
branches;
next	1.18;

1.18
date	2002.03.20.00.26.04;	author jtv;	state Exp;
branches;
next	1.17;

1.17
date	2002.03.19.23.29.28;	author jtv;	state Exp;
branches;
next	1.16;

1.16
date	2002.03.05.17.22.51;	author jtv;	state Exp;
branches;
next	1.15;

1.15
date	2002.03.04.23.35.40;	author jtv;	state Exp;
branches;
next	1.14;

1.14
date	2002.03.04.20.46.53;	author jtv;	state Exp;
branches;
next	1.13;

1.13
date	2002.03.03.23.27.11;	author jtv;	state Exp;
branches;
next	1.12;

1.12
date	2002.03.03.15.30.07;	author jtv;	state Exp;
branches;
next	1.11;

1.11
date	2002.02.28.22.34.56;	author jtv;	state Exp;
branches;
next	1.10;

1.10
date	2002.02.26.23.06.14;	author jtv;	state Exp;
branches;
next	1.9;

1.9
date	2002.02.26.22.01.17;	author jtv;	state Exp;
branches;
next	1.8;

1.8
date	2002.02.24.03.57.33;	author jtv;	state Exp;
branches;
next	1.7;

1.7
date	2002.02.03.05.15.34;	author jtv;	state Exp;
branches;
next	1.6;

1.6
date	2002.02.03.05.07.38;	author jtv;	state Exp;
branches;
next	1.5;

1.5
date	2002.02.03.04.59.20;	author jtv;	state Exp;
branches;
next	1.4;

1.4
date	2002.02.02.14.29.21;	author jtv;	state Exp;
branches;
next	1.3;

1.3
date	2002.01.26.20.15.16;	author jtv;	state Exp;
branches;
next	1.2;

1.2
date	2002.01.26.20.05.06;	author jtv;	state Exp;
branches;
next	1.1;

1.1
date	2002.01.26.20.00.39;	author jtv;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2002.01.26.20.00.39;	author jtv;	state Exp;
branches;
next	;


desc
@@


1.21
log
@Integrated John Anderson's configure scripts & Ray Dassen's fixes
@
text
@# Quick & ugly makefile hack, edit to fit your own environment
#
# Set O variable to determine compiler optimization level; defaults to 1 for
# that little extra code analysis, but O=0 should improve compilation speed.

# Options for the "dist" target (source distribution):
# What to call the source distribution tarball
ARCHIVE_SRC=libpqxx.tar.gz
# What the source directory (where this file resides) is called
SRCDIR=libpqxx

# Options used to connect to test database when running the self test.  Suit to 
# your own environment, but best keep it out of the way of any database you 
# actually use for anything else.  Recommended practice is to set up a database 
# with this name locally.
DBNAME=libpqxx
DBUSER=`whoami`
CONNSTR="dbname=$(DBNAME)"

# Set SQL dialect to use
# Comment out to use standard SQL; uncomment to use PostgreSQL dialect.  Using 
# PostgreSQL dialect will make some features faster.
# Some code still ignores this setting.
SQL_DIALECT=-DDIALECT_POSTGRESQL

# Set different namespace for standard library (defaults to std)
#STD=-DPGSTD=_STL

# Location where PostgreSQL headers are found
PGSQLINC=/usr/include/postgresql

# What to call the library file, and how to link it into an executable.
LIBNAME=lib/libpqxx.a
LIBOPT=-lpqxx

# Commands and command line options used by GNU Make's default rules
CXX=colorgcc
CXXFLAGS=-Wall -pedantic -ffor-scope -Wshadow -Wcast-align -Wpointer-arith \
	-Wwrite-strings -Woverloaded-virtual -Wtraditional -O$O $(EXTRACXX)

CPPFLAGS=-I$(PGSQLINC) -I$(PGSQLINC)/internal -Iinclude -DLACK_ITERATOR \
	-DLACK_LIMITS $(SQL_DIALECT) $(STD)
LD=g++
AR=ar
LDFLAGS=-L/usr/lib/postgresql -Llib
LOADLIBES=-lpq $(LIBOPT) -lstdc++
RM=rm -f



# *****************************************************************************
# No more configuration items below this point--any editing from here on is
# customization at best.  Which is not saying it'll never be necessary.
# *****************************************************************************


EXECS=test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 \
	test12 test13 test14 test15 test16 test17 test18 test19 test20
EXECOBJS=test1.o test2.o test3.o test4.o test5.o test6.o test7.o test8.o \
	test9.o test10.o test11.o test12.o test13.o test14.o test15.o \
	test16.o test17.o test18.o test19.o test20.o
LIBOBJS=connection.o cursor.o nontransaction.o result.o robusttransaction.o \
	tablereader.o tablestream.o tablewriter.o transaction.o \
	transactionitf.o


.PHONY: all clean distclean dist check

vpath %.cxx src test
vpath %.o obj

%.o : %.cxx
	$(CXX) -c $< $(CPPFLAGS) $(CXXFLAGS)

all: $(EXECS)

$(EXECS) : $(LIBNAME)


$(LIBNAME): $(LIBOBJS)
	$(AR) -r $(LIBNAME) $(LIBOBJS)

check: $(EXECS)
	env DBNAME=$(DBNAME) CONNSTR=$(CONNSTR) DBUSER=$(DBUSER) ./selftest

clean: 
	$(RM) $(LIBOBJS) $(EXECOBJS) a.out

distclean: clean
	$(RM) $(LIBNAME) $(EXECS)

dist: distclean
	tar -C.. -czf ../$(ARCHIVE_SRC) $(SRCDIR)
	tar tvzf ../$(ARCHIVE_SRC)

@


1.20
log
@Moved self test code from Makefile to separate script
@
text
@@


1.19
log
@Renamed *.cc to *.cxx so MS Visual C++ recognizes 'em as C++
@
text
@d84 1
a84 31
	@@echo "Cleaning up any garbage from previous failed test runs"
	psql $(DBNAME) -c "DELETE FROM events WHERE year=1977"
	@@echo
	@@echo "======== STARTING TEST RUN ========"
	./test1 $(CONNSTR)
	./test2 $(CONNSTR)
	./test3 $(CONNSTR) 10
	./test4 $(CONNSTR)
	./test5 $(CONNSTR)
	./test6 $(CONNSTR) orgevents events
	./test7 $(CONNSTR)
	./test8 $(CONNSTR)
	./test9 $(CONNSTR)
	./test10 $(CONNSTR)
	./test11 $(CONNSTR)
	./test12 $(CONNSTR)
	./test13 $(CONNSTR)
	./test14 $(CONNSTR)
	./test15 $(CONNSTR)
	./test16 $(CONNSTR)
	./test17 $(CONNSTR)
	./test18 $(CONNSTR)
	./test19 $(CONNSTR)
	./test20 $(CONNSTR)
	@@echo
	@@echo "======== TEST RUN COMPLETED ========"
	@@echo
	@@echo "Checking for remaining transaction records:"
	psql $(DBNAME) -c "SELECT * FROM PQXXLOG_$(DBUSER)"
	@@echo "Checking for remaining test garbage:"
	psql $(DBNAME) -c "SELECT * FROM events WHERE year=1977"
@


1.18
log
@Renamed source files to reflect Great Renaming of header files
@
text
@d69 1
a69 1
vpath %.cc src test
d71 3
@


1.17
log
@Reorganized source files
@
text
@d59 2
a60 3
EXECOBJS=test1.o test2.o test3.o test4.o test5.o \
	test6.o test7.o test8.o test9.o test10.o \
	test11.o test12.o test13.o test14.o test15.o \
d62 3
a64 4
LIBOBJS=pg_connection.o pg_cursor.o pg_nontransaction.o \
	pg_result.o pg_robusttransaction.o pg_tablereader.o \
	pg_tablestream.o pg_tablewriter.o pg_transaction.o \
	pg_transactionitf.o
@


1.16
log
@Transactors now use TRANSACTIONTYPE abstraction; added test18; Makefile
now displays any remaining log records after regression test.
@
text
@d2 3
d32 4
d39 1
a39 1
	-Wwrite-strings -Woverloaded-virtual -Wtraditional -O $(EXTRACXX)
d41 2
a42 2
CPPFLAGS=-I$(PGSQLINC) -I$(PGSQLINC)/internal -DLACK_ITERATOR -DLACK_LIMITS \
	$(SQL_DIALECT) $(STD)
d45 2
a46 2
LDFLAGS=-L/usr/lib/postgresql -L.
LOADLIBES=-lpq
a49 4
# What to call the library file, and how to link it into an executable.
LIBNAME=libpqxx.a
LIBOPT=-lpqxx

d58 8
a65 6
	test12 test13 test14 test15 test16 test17 test18
EXECOBJS=test1.o test2.o test3.o test4.o test5.o test6.o test7.o test8.o \
	test9.o test10.o test11.o test12.o test13.o test14.o test15.o \
	test16.o test17.o test18.o
LIBOBJS=pg_connection.o pg_cursor.o pg_nontransaction.o pg_result.o pg_robusttransaction.o \
	pg_tablereader.o pg_tablestream.o pg_tablewriter.o pg_transaction.o \
d69 4
a72 1
.PHONY: all clean distclean dist
d76 1
a76 53
test1: test1.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)

test2: test2.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)

test3: test3.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)

test4: test4.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)

test5: test5.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)

test6: test6.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)

test7: test7.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)

test8: test8.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)

test9: test9.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)

test10: test10.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)

test11: test11.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)

test12: test12.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)

test13: test13.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)

test14: test14.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)

test15: test15.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)

test16: test16.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)

test17: test17.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)

test18: test18.o $(LIBNAME)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOPT) $(LOADLIBES)
d83 4
d105 6
d112 2
@


1.15
log
@Implemented RobustTransaction
@
text
@d14 1
d55 1
a55 1
	test12 test13 test14 test15 test16 test17
d58 1
a58 1
	test16.o test17.o
d119 3
d144 2
@


1.14
log
@Created RobustTransaction class, which will eventually be able to deal with
"in-doubt" transactions.
@
text
@d54 1
a54 1
	test12 test13 test14 test15
d56 2
a57 1
	test9.o test10.o test11.o test12.o test13.o test14.o test15.o
d112 6
d138 2
@


1.13
log
@Made choice of Transaction class parameterizable
@
text
@d57 1
a57 1
LIBOBJS=pg_connection.o pg_cursor.o pg_nontransaction.o pg_result.o \
@


1.12
log
@Now checks for in-doubt window on transaction commit; compile fixes for
PostgreSQL 7.2; minor improvements in error handling.
@
text
@d54 1
a54 1
	test12 test13
d56 4
a59 3
	test9.o test10.o test11.o test12.o test13.o
LIBOBJS=pg_connection.o pg_cursor.o pg_result.o pg_tablereader.o \
	pg_tablestream.o pg_tablewriter.o pg_transaction.o 
d105 6
d129 2
@


1.11
log
@Added test13; full test coverage for Transactor
@
text
@d25 2
d33 1
a33 1
CPPFLAGS=-I/usr/include/postgresql -DLACK_ITERATOR -DLACK_LIMITS \
@


1.10
log
@Added test12, completing test coverage for Result & nested classes
@
text
@d52 1
a52 1
	test12
d54 1
a54 1
	test9.o test10.o test11.o test12.o
d99 3
d119 1
@


1.9
log
@Created to better test Result's metadata query functions
@
text
@d51 2
a52 1
EXECS=test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11
d54 1
a54 1
	test9.o test10.o test11.o
d96 3
d115 1
@


1.8
log
@Improved & documented test coverage, added test10, fixed Transaction
implicit abort.
@
text
@d51 1
a51 1
EXECS=test1 test2 test3 test4 test5 test6 test7 test8 test9 test10
d53 1
a53 1
	test9.o test10.o
d92 3
d110 1
@


1.7
log
@*** empty log message ***
@
text
@d51 3
a53 2
EXECS=test1 test2 test3 test4 test5 test6 test7 test8 test9
EXECOBJS=test1.o test2.o test3.o test4.o test5.o test6.o test7.o test8.o test9.o
d89 4
d106 1
@


1.6
log
@No longer removes old library
@
text
@d3 6
d109 2
a110 1
	tar -C.. -czf ../libpqxx.tar.gz libpqxx
@


1.5
log
@Now builds static library
@
text
@a82 1
	$(RM) $(LIBNAME)
@


1.4
log
@*** empty log message ***
@
text
@d3 4
d11 3
a13 2
# Comment out to use standard SQL; uncomment to use PostgreSQL dialect.
# Using PostgreSQL dialect will make some features faster.
d19 2
d28 2
a29 1
LDFLAGS=-L/usr/lib/postgresql
d31 13
d50 3
d55 2
d58 2
a59 5
test1: test1.o $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOBJS) $(LOADLIBES)

test2: test2.o $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOBJS) $(LOADLIBES)
d61 2
a62 2
test3: test3.o $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOBJS) $(LOADLIBES)
d64 2
a65 2
test4: test4.o $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOBJS) $(LOADLIBES)
d67 2
a68 2
test5: test5.o $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOBJS) $(LOADLIBES)
d70 2
a71 2
test6: test6.o $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOBJS) $(LOADLIBES)
d73 2
a74 2
test7: test7.o $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOBJS) $(LOADLIBES)
d76 2
a77 2
test8: test8.o $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOBJS) $(LOADLIBES)
d79 2
a80 2
test9: test9.o $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@@ $< $(LIBOBJS) $(LOADLIBES)
d82 3
d101 1
a101 1
	$(RM) $(EXECS)
@


1.3
log
@Added "dist" target to create source archive
@
text
@d8 1
a8 1
# Using PostgreSQL dialect will keep some SQL a bit shorter.
@


1.2
log
@Fixed option for overriding std namespace (syntactically broken)
@
text
@d77 3
@


1.1
log
@Initial revision
@
text
@d12 1
a12 1
#PGSTD=-DPGSTD=_STL
d19 1
a19 1
	$(SQL_DIALECT) $(
@


1.1.1.1
log
@Imported sources
@
text
@@
