dbsql/test/scr030/chk.build
Gregory Burd c39ba47f61 Finished a pass over all the non-SQLite derrived tests (which all
live in scr050) and brought them up to date, some minor fixes along
the way.  A few tests don't work properly, I've noted those in the
TODO file for some other time.
2009-09-01 19:21:41 -04:00

87 lines
1.9 KiB
Bash

#!/bin/sh -
#
# Build a program that calls the run-time API configuration functions.
t=__1
trap 'rm -rf $t ; exit 0' 0
trap 'rm -rf $t ; exit 1' 1 2 3 13 15
[ -d ../../dist ] || {
echo 'FAIL: unable to find top-level dist directory'
exit 1
}
s="\
--disable-cryptography \
--disable-hash \
--disable-largefile \
--disable-queue \
--disable-replication \
--disable-statistics \
--disable-verify \
--enable-compat185 \
--enable-debug \
--enable-debug_rop \
--enable-debug_wop \
--enable-diagnostic \
--enable-dump185 \
--enable-posixmutexes \
--enable-rpc \
--enable-smallbuild \
--enable-umrw \
--with-mutex=UNIX/fcntl \
--with-mutex=x86/gcc-assembly \
--with-mutexalign=64 \
--with-uniquename=__KEITH__"
# Configure and build.
# $1: config flags
r()
{
echo "run: $1 (`date`)"
rm -rf $t
mkdir $t
cd $t
../../../dist/configure $1 > config.OUT 2>&1
if test $? -ne 0; then
echo "$i: FAILED in configure"
exit 1
fi
(echo /^CFLAGS=/ &&
echo \
's/-c /-c -W -Werror -Wall -Wpointer-arith -Wmissing-prototypes /p' &&
echo '/^db_server_svc.*: db_server_svc.c$/' &&
echo '+1s/\$(CFLAGS)/-c \$(CPPFLAGS)/' &&
echo '/^db_server_xdr.*: db_server_xdr.c$/' &&
echo '+1s/\$(CFLAGS)/-c \$(CPPFLAGS)/' &&
echo '/^gen_db_server.*: gen_db_server.c$/' &&
echo '+1s/\$(CFLAGS)/-c \$(CPPFLAGS)/' &&
echo '/^db_java_wrap.*: .*db_java_wrap.c$/' &&
echo '+1s/\$(CFLAGS)/-c \$(CPPFLAGS)/' &&
echo '/^tcl_db_pkg.*: .*tcl_db_pkg.c$/' &&
echo '+1s/\$(CFLAGS)/-c \$(CPPFLAGS)/' &&
echo w &&
echo q) | ed Makefile > /dev/null
make > mklog 2>&1
if test $? -ne 0; then
echo "$i: FAILED in make"
exit 1
fi
cd ..
rm -rf $t
}
# Run through all of the standard single options.
for i in $s; do
r "$i --disable-shared"
done
# Build specific runs of interest.
r
r "--disable-static"
r "--enable-cxx"
r "--enable-java"
r "--with-tcl=/usr/local/tcl8.4/lib"
r "--enable-test --with-tcl=/usr/local/tcl8.4/lib"
r "--enable-cxx --enable-java --with-tcl=/usr/local/tcl8.4/lib"