4 # Build the automatically generated logging/recovery files.
13 trap 'rm -f /tmp/__db_[abcdef]; exit 1' 1 2 3 13 15
14 trap 'rm -f /tmp/__db_[abcdef]; exit 0' 0
16 DIR="db dbreg btree fileops hash qam txn"
18 # Check to make sure we haven't duplicated a log record entry, and build
19 # the list of log record types that the test suite uses.
21 for f in ../$i/*.src; do
22 # Grab the PREFIX; there should only be one per file, and
23 # so it's okay to just take the first.
24 grep '^PREFIX' $f | sed q
25 egrep '^BEGIN[ ]|^IGNORED[ ]|^DEPRECATED[ ]' $f |
26 awk '{print $1 "\t" $2 "\t" $3 "\t" $4}'
29 grep -v '^PREFIX' $loglist |
30 awk '{print $2 "\t" $3 "\t" $4}' | sort -n -k 3 | uniq -d -f 1 > $tmp
32 echo "DUPLICATE LOG VALUES:"
37 f=../test/logtrack.list
38 cmp $loglist $f > /dev/null 2>&1 ||
39 (echo "Building $f" && rm -f $f && cp $loglist $f && chmod 444 $f)
41 # Build DB's recovery routines.
43 for f in ../$i/*.src; do
44 subsystem=`basename $f .src`
46 -v header_file=$header \
48 -v source_file=$source \
49 -v template_file=$template < $f
51 f=../dbinc_auto/${subsystem}_auto.h
52 cmp $header $f > /dev/null 2>&1 ||
53 (echo "Building $f" &&
54 rm -f $f && cp $header $f && chmod 444 $f)
55 f=../$i/${subsystem}_auto.c
56 cmp $source $f > /dev/null 2>&1 ||
57 (echo "Building $f" &&
58 rm -f $f && cp $source $f && chmod 444 $f)
59 f=../$i/${subsystem}_autop.c
60 cmp $print $f > /dev/null 2>&1 ||
61 (echo "Building $f" &&
62 rm -f $f && cp $print $f && chmod 444 $f)
63 f=template/rec_${subsystem}
64 cmp $template $f > /dev/null 2>&1 ||
65 (echo "Building $f" &&
66 rm -f $f && cp $template $f && chmod 444 $f)
70 # Build the example application's recovery routines.
71 (cd ../examples_c/ex_apprec && sh auto_rebuild)