5 trap "rm -f /tmp/$$" 0 1 2 3 15
9 ctags --version 2>&1 | grep Exuberant && IS_EXUBERANT="Y"
11 # List of kinds supported by Exuberant Ctags 5.8
12 # generated by ctags --list-kinds
13 # --c-kinds was called --c-types before 2003
16 # e enumerators (values inside an enumeration)
17 # f function definitions
19 # l local variables [off]
20 # m class, struct, and union members
22 # p function prototypes [off]
26 # v variable definitions
27 # x external and forward variable declarations [off]
29 if [ "$IS_EXUBERANT" ]
30 then FLAGS="--c-kinds=+dfmstuv"
34 # this is outputting the tags into the file 'tags', and appending
35 find `pwd`/ -type f -name '*.[chyl]' -print |
36 xargs ctags -a -f tags "$FLAGS"
38 # Exuberant tags has a header that we cannot sort in with the other entries
39 # so we skip the sort step
40 # Why are we sorting this? I guess some tag implementation need this,
41 # particularly for append mode. bjm 2012-02-24
42 if [ ! "$IS_EXUBERANT" ]
45 sort tags >/tmp/$$ && mv /tmp/$$ tags
48 find . \( -name 'CVS' -prune \) -o \( -name .git -prune \) -o -type d -print |
50 do [ "$DIR" != "." ] && ln -f -s `echo "$DIR" | sed 's;/[^/]*;/..;g'`/tags "$DIR"/tags