1#!/bin/sh 2 3# This file illustrates how to generate a useful TAGS file via etags 4# for emacs. This should be invoked from the top source directory i.e.: 5# > build/MakeEtags 6# and will create a TAGS file in the top source directory. 7 8# This script falls under the Apache License. 9# See http://www.apache.org/docs/LICENSE 10 11# Once you have created ./TAGS in emacs you'll need to setup 12# tag-table-alist with an entry to assure it finds the single ./TAGS 13# file from the many source directories. Something along these lines: 14# (setq tag-table-alist 15# '(("/home/me/work/httpd-2.0/" 16# . "/home/me/work/httpd-2.0/") 17# )) 18 19# This requires a special version of etags, i.e. the 20# one called "Exuberant ctags" available at: 21# http://fly.hiwaay.net/~darren/ctags/ 22# Once that is setup you'll need to point to the 23# executable here: 24 25etags=~/local/bin/etags 26 27# Exuberant etags is necessary since it can ignore some defined symbols 28# that obscure the function signatures. 29 30ignore=AP_DECLARE,AP_DECLARE_NONSTD,__declspec 31 32# Create an etags file at the root of the source 33# tree, then create symbol links to it from each 34# directory in the source tree. By passing etags 35# absolute pathnames we get a tag file that is 36# NOT portable when we move the directory tree. 37 38find . -name '*.[ch]' -print | $etags -I "$ignore" -L - 39 40