File: MakeEtags

package info (click to toggle)
apr 1.6.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 7,132 kB
  • sloc: ansic: 60,108; sh: 3,610; perl: 900; awk: 393; makefile: 366; python: 142
file content (41 lines) | stat: -rwxr-xr-x 1,507 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh

# This file illustrates how to generate a useful TAGS file via etags
# for emacs.  This should be invoked from the top source directory i.e.:
#   > build/MakeEtags
# and will create a TAGS file in the top source directory.

# This script falls under the Apache License.
# See http://www.apache.org/docs/LICENSE

# Once you have created ./TAGS in emacs you'll need to setup
# tag-table-alist with an entry to assure it finds the single ./TAGS
# file from the many source directories.  Something along these lines:
# (setq tag-table-alist
#	'(("/home/me/work/apr-x.y/" . "/home/me/work/apr-x.y/")
#	  ("/home/me/work/apr-util-x.y/" . "/home/me/work/apr-util-x.y/")
#	  ("/home/me/work/httpd-x.y/" . "/home/me/work/httpd-x.y/")
#	 ))

# This requires a special version of etags, i.e. the
# one called "Exuberant ctags" available at:
#    http://ctags.sourceforge.net/
# Once that is setup you'll need to point to the
# executable here:

etags=${ETAGS-etags}

# Exuberant etags is necessary since it can ignore some defined symbols
# that obscure the function signatures.

ignore=AP_DECLARE,AP_DECLARE_NONSTD,__declspec,APR_DECLARE,APR_DECLARE_NONSTD
ignore=$ignore,APU_DECLARE,APU_DECLARE_NONSTD

# Create an etags file at the root of the source
# tree, then create symbol links to it from each
# directory in the source tree.  By passing etags
# absolute pathnames we get a tag file that is
# NOT portable when we move the directory tree.

find . -name '*.[ch]' -print | $etags -I "$ignore"  -L -