1#!/bin/sh -
2#	$Id: s_tags,v 12.4 2007/08/06 16:28:03 bostic Exp $
3#
4# Build tags files.
5
6files=`echo ../dbinc/*.h \
7	../dbinc/*.in \
8	../btree/*.[ch] \
9	../clib/*.[ch] \
10	../common/*.[ch] \
11	../crypto/*.[ch] \
12	../crypto/mersenne/*.[ch] \
13	../crypto/rijndael/*.[ch] \
14	../db/*.[ch] \
15	../db185/*.[ch] \
16	../dbm/*.[ch] \
17	../dbreg/*.[ch] \
18	../env/*.[ch] \
19	../fileops/*.[ch] \
20	../hash/*.[ch] \
21	../hmac/*.[ch] \
22	../hsearch/*.[ch] \
23	../lock/*.[ch] \
24	../log/*.[ch] \
25	../mp/*.[ch] \
26	../mutex/*.[ch] \
27	../os/*.[ch] \
28	../os_qnx/*.[ch] \
29	../qam/*.[ch] \
30	../rep/*.[ch] \
31	../repmgr/*.[ch] \
32	../rpc_client/*.[ch] \
33	../rpc_server/c/*.[ch] \
34	../sequence/*.[ch] \
35	../tcl/*.[ch] \
36	../txn/*.[ch] \
37	../xa/*.[ch] \
38	../cxx/*.cpp \
39	../libdb_java/*.[ch] | sed 's/[^ ]*stub.c//g'`
40
41f=tags
42echo "Building $f"
43rm -f $f
44
45# Figure out what flags this ctags accepts.
46flags=""
47if ctags -d ../db/db.c 2>/dev/null; then
48	flags="-d $flags"
49fi
50if ctags -t ../db/db.c 2>/dev/null; then
51	flags="-t $flags"
52fi
53if ctags -w ../db/db.c 2>/dev/null; then
54	flags="-w $flags"
55fi
56
57ctags $flags $files 2>/dev/null
58chmod 444 $f
59
60for i in test_perf test_rep test_server; do
61	test -d ../$i || continue
62
63	f=../$i/tags
64	echo "Building $f"
65	(cd ../$i && ctags $flags *.[ch] 2>/dev/null)
66	chmod 444 $f
67done
68