#!/bin/sh -
#	$Id: s_tags,v 1.10 2001/12/10 16:26:40 krinsky Exp $
#
# Build tags files.

files="../include/*.h \
	../include/*.in \
	../btree/*.[ch] \
	../clib/*.[ch] \
	../common/*.[ch] \
	../db/*.[ch] \
	../db185/*.[ch] \
	../dbm/*.[ch] \
	../dbreg/*.[ch] \
	../env/*.[ch] \
	../hash/*.[ch] \
	../hsearch/*.[ch] \
	../lock/*.[ch] \
	../log/*.[ch] \
	../mp/*.[ch] \
	../mutex/*.[ch] \
	../os/*.[ch] \
	../qam/*.[ch] \
	../rep/*.[ch] \
	../rpc_client/*.[ch] \
	../rpc_server/*.[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
