diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2016-12-17 21:28:53 -0800 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2016-12-17 21:28:53 -0800 |
commit | 54df2afaa61c6a03cbb4a33c9b90fa572b6d07b8 (patch) | |
tree | 18147b92b969d25ffbe61935fb63035cac820dd0 /db-4.8.30/test/scr001 |
Berkeley DB 4.8 with rust build script for linux.
Diffstat (limited to 'db-4.8.30/test/scr001')
-rw-r--r-- | db-4.8.30/test/scr001/chk.code | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/db-4.8.30/test/scr001/chk.code b/db-4.8.30/test/scr001/chk.code new file mode 100644 index 0000000..4b706ee --- /dev/null +++ b/db-4.8.30/test/scr001/chk.code @@ -0,0 +1,38 @@ +#!/bin/sh - +# +# $Id$ +# +# Check to make sure that the code samples in the documents build. + +d=../../docs_src + +[ -d $d ] || { + echo 'FAIL: cannot find source distribution directory.' + exit 1 +} +[ -f ../libdb.a ] || (cd .. && make libdb.a) || { + echo 'FAIL: unable to find or build libdb.a' + exit 1 +} + +exitv=0 +for i in `find $d -name '*.cs' | sed '/\/ref_xml\//d'`; do + echo " compiling $i" + sed -e 's/m4_include(\(.*\))/#include <\1>/g' \ + -e 's/m4_[a-z]*[(\[)]*//g' \ + -e 's/(\[//g' \ + -e '/argv/!s/])//g' \ + -e 's/dnl//g' \ + -e 's/__GT__/>/g' \ + -e 's/__LB__/[/g' \ + -e 's/__LT__/</g' \ + -e 's/__RB__/]/g' < $i > t.c + if cc -pthread -Wall -Werror -I.. t.c ../libdb.a -o t; then + : + else + echo "FAIL: unable to compile $i" + exitv=1 + fi +done + +exit $exitv |