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

for i in db btree hash log qam txn; do
	for f in ../$i/*.src; do
		subsystem=`basename $f .src`
		header_file=../include/${subsystem}_auto.h
		source_file=../$i/${subsystem}_auto.c
		template_file=template/rec_${subsystem}
		template_source=.

		echo "Building $source_file, $header_file, $template_file"
		rm -f $header_file $source_file $template_file
		awk -f gen_rec.awk \
		    -v subsystem=$subsystem \
		    -v source_file=$source_file \
		    -v header_file=$header_file \
		    -v template_file=$template_file \
		    -v template_dir=. < $f
		chmod 444 $header_file $source_file $template_file
	done
done
