#!/bin/sh -
#	$Id: s_tags,v 1.16 2002/03/28 20:13:07 krinsky Exp $
#
# Build tags files.

. ./RELEASE

files="../dbinc/*.h \
	../dbinc/*.in \
	../btree/*.[ch] \
	../clib/*.[ch] \
	../common/*.[ch] \
#	../crypto/*.[ch] \
	../crypto/mersenne/*.[ch] \
	../crypto/rijndael/*.[ch] \
	../db/*.[ch] \
	../db185/*.[ch] \
	../dbm/*.[ch] \
	../dbreg/*.[ch] \
	../env/*.[ch] \
	../fileops/*.[ch] \
	../hash/*.[ch] \
	../hmac/*.[ch] \
	../hsearch/*.[ch] \
	../lock/*.[ch] \
	../log/*.[ch] \
	../mp/*.[ch] \
	../mutex/*.[ch] \
	../os/*.[ch] \
	../qam/*.[ch] \
	../rep/*.[ch] \
	../rpc_client/*.[ch] \
	../rpc_server/c/*.[ch] \
	../tcl/*.[ch] \
	../txn/*.[ch] \
	../xa/*.[ch] \
	../cxx/*.cpp \
	../libdb_java/*.[ch]"

f=tags
echo "Building $f"
rm -f $f

# Figure out what flags this ctags accepts.
flags=""
if ctags -d ../db/db.c 2>/dev/null; then
	flags="-d $flags"
fi
if ctags -t ../db/db.c 2>/dev/null; then
	flags="-t $flags"
fi
if ctags -w ../db/db.c 2>/dev/null; then
	flags="-w $flags"
fi

ctags $flags $files 2>/dev/null
chmod 444 $f

#f=../test_perf/tags
#echo "Building $f"
#(cd ../test_perf && ctags $flags *.[ch] 2>/dev/null)
#chmod 444 $f
