If any C, C++ or Fortran 77 source code or headers are present, then
@code{tags} and @code{TAGS} rules will be generated for the directory.
All files listed using the @code{_SOURCES}, @code{_HEADERS}, and
-@code{_LISP} primaries will be used to generate tags. Note that
-generated source files that are not distributed must be declared in
-variables like @code{nodist_noinst_HEADERS} or
-@code{nodist_@var{prog}_SOURCES} or they will be ignored.
+@code{_LISP} primaries will be used to generate tags. Generated
+source files that are not distributed must be declared in variables
+like @code{nodist_noinst_HEADERS} or @code{nodist_@var{prog}_SOURCES}
+or they will be ignored.
A @code{tags} rule will be output at the topmost directory of a
multi-directory package. When run from this topmost directory,
directories that contain taggable source that @command{etags} does
not understand. The user can use the @code{ETAGSFLAGS} to pass
additional flags to @command{etags}; @code{AM_ETAGSFLAGS} is also
-available for use in @file{Makefile.am}.
+available for use in @file{Makefile.am}. The variable @code{ETAGS}
+is the name of the program to invoke (by default @command{etags}).
@vindex ETAGS_ARGS
@vindex ETAGSFLAGS
@vindex AM_ETAGSFLAGS
+@vindex ETAGS
Here is how Automake generates tags for its source, and for nodes in its
Texinfo file:
is the name of the program to invoke (by default @command{ctags});
@code{CTAGSFLAGS} can be used by the user to pass additional flags,
and @code{AM_CTAGSFLAGS} can be used by the @file{Makefile.am}.
+@vindex CTAGS_ARGS
+@vindex CTAGSFLAGS
+@vindex CTAGS
@trindex id
Automake will also generate an @code{ID} rule that will run
with non-GNU make implementations (especially with make implementations
performing @ref{Automatic Rule Rewriting, , VPATH rewrites, autoconf,
The Autoconf Manual}).
+@vindex CSCOPE_ARGS
+@vindex CSCOPEFLAGS
+@vindex CSCOPE
Finally, Automake also emits rules to support the
@uref{https://www.gnu.org/software/global/, GNU Global Tags program}.
[m4_define([AC_PROG_OBJCXX],
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
])
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+ CTAGS=ctags
+fi
+AC_SUBST([CTAGS])
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+AC_SUBST([ETAGS])
+if test -z "$CSCOPE"; then
+ CSCOPE=cscope
+fi
+AC_SUBST([CSCOPE])
+
AC_REQUIRE([AM_SILENT_RULES])dnl
dnl The testsuite driver may need to know about EXEEXT, so add the
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This