Automake will generate rules to generate TAGS files for use with GNU Emacs under some circumstances.
If any C, C++ or Fortran 77 source code or headers are present, then
TAGS rules will be generated for the directory.
All files listed using the
_LISP primaries will be used to generate tags. Note that
generated source files that are not distributed must be declared in
nodist_prog_SOURCES or they will be ignored.
tags rule will be output at the topmost directory of a
multi-directory package. When run from this topmost directory,
‘make tags’ will generate a TAGS file that includes by
reference all TAGS files from subdirectories.
tags rule will also be generated if the variable
ETAGS_ARGS is defined. This variable is intended for use in
directories that contain taggable source that
not understand. The user can use the
ETAGSFLAGS to pass
additional flags to
AM_ETAGSFLAGS is also
available for use in Makefile.am.
Here is how Automake generates tags for its source, and for nodes in its Texinfo file:
ETAGS_ARGS = automake.in --lang=none \ --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi
If you add file names to
ETAGS_ARGS, you will probably also
want to define
TAGS_DEPENDENCIES. The contents of this variable
are added directly to the dependencies for the
Automake also generates a
ctags rule that can be used to
vi-style tags files. The variable
is the name of the program to invoke (by default
CTAGSFLAGS can be used by the user to pass additional flags,
AM_CTAGSFLAGS can be used by the Makefile.am.
Automake will also generate an
ID rule that will run
mkid on the source. This is only supported on a
cscope rule will create a list of all the source
files in the tree and run
cscope to build an inverted index
database. The variable
CSCOPE is the name of the program to invoke
CSCOPE_ARGS can be used by the user to pass additional flags and
file names respectively, while
AM_CSCOPEFLAGS can be used by the
Makefile.am. Note that, currently, the Automake-provided
cscope support, when used in a VPATH build, might not work well
with non-GNU make implementations (especially with make implementations
performing VPATH rewrites in The Autoconf Manual).
Finally, Automake also emits rules to support the
GNU Global Tags program.
GTAGS rule runs Global Tags and puts the
result in the top build directory. The variable
holds arguments that are passed to