Add BSD license file
[platform/upstream/db4.git] / dist / s_tags
1 #!/bin/sh -
2 #       $Id$
3 #
4 # Build tags files.
5
6 files=`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         ../cxx/*.cpp \
38         ../libdb_java/*.[ch] | sed 's/[^ ]*stub.c//g'`
39
40 f=tags
41 echo "Building $f"
42 rm -f $f
43
44 # Figure out what flags this ctags accepts.
45 flags=""
46 if ctags -d ../db/db.c 2>/dev/null; then
47         flags="-d $flags"
48 fi
49 if ctags -t ../db/db.c 2>/dev/null; then
50         flags="-t $flags"
51 fi
52 if ctags -w ../db/db.c 2>/dev/null; then
53         flags="-w $flags"
54 fi
55
56 ctags $flags $files 2>/dev/null
57 chmod 444 $f
58
59 for i in test_perf test_repmgr test_server; do
60         test -d ../$i || continue
61
62         f=../$i/tags
63         echo "Building $f"
64         (cd ../$i && ctags $flags *.[ch] 2>/dev/null)
65         chmod 444 $f
66 done