#!/bin/sh - # # $Id: chk.code,v 1.2 2002/11/13 05:20:01 bostic Exp $ # # Check to make sure that the code samples in the documents build. d=../.. [ -d $d/docs_src ] || { echo 'FAIL: cannot find source distribution directory.' exit 1 } for i in `find $d/docs_src/ref/xml -name '*.cxs'`; 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__/ t.cpp if g++ -c -Wall -W -Werror \ -I../../include \ -I../../../src/db-4.1.24/build_unix \ -I../../../src/db-4.1.24/dbinc \ -I../../../src/xerces-c-src2_1_0/src \ t.cpp ; then : else echo "FAIL: unable to compile $i" exit 1 fi done exit 0