#!/bin/sh -
#	$Id: s_include,v 1.1.1.1.2.2 2000/02/08 00:44:14 noriko Exp $
#
# Build the automatically generated function prototype files.

msgc="/* DO NOT EDIT: automatically built by dist/distrib. */"

for i in db btree clib common env hash lock log mp mutex os qam rpc_client rpc_server tcl txn xa; do
	f=../include/${i}_ext.h
	echo "Building $f"
	rm -f $f
	(echo "$msgc" &&
	    echo "#ifndef _${i}_ext_h_" &&
	    echo "#define _${i}_ext_h_" &&
	    sed -n "s/^ \* PUBLIC:[	 ]\(.*\)/\1/p" ../$i/*.c;
	[ $i = os ] &&
	    sed -n "s/^ \* PUBLIC:[	 ]\(.*\)/\1/p" ../os_win32/*.c;
	echo "#endif /* _${i}_ext_h_ */") > $f
	chmod 444 $f
done
