automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[automake-commit] branch master updated: tags: support setting CTAGS, ET


From: Karl Berry
Subject: [automake-commit] branch master updated: tags: support setting CTAGS, ETAGS, CSCOPE vars via ./configure.
Date: Sat, 05 Dec 2020 21:14:10 -0500

This is an automated email from the git hooks/post-receive script.

karl pushed a commit to branch master
in repository automake.

View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=d2ccbd7eb38d6a4277d6f42b994eb5a29b1edf29

The following commit(s) were added to refs/heads/master by this push:
     new d2ccbd7  tags: support setting CTAGS, ETAGS, CSCOPE vars via 
./configure.
d2ccbd7 is described below

commit d2ccbd7eb38d6a4277d6f42b994eb5a29b1edf29
Author: Reuben Thomas <rrt@sc3d.org>
AuthorDate: Sat Dec 5 18:11:55 2020 -0800

    tags: support setting CTAGS, ETAGS, CSCOPE vars via ./configure.
    
    This change fixes https://bugs.gnu.org/45013.
    
    * m4/init.m4: add default settings and AC_SUBST calls for the variables
      `CTAGS', `ETAGS' and `CSCOPE'.
    * lib/am/tags.am: remove default settings of the above variables.
    * doc/automake.texi (Tags): mention and index.
    * NEWS: mention.
---
 NEWS              |  4 ++++
 doc/automake.texi | 18 +++++++++++++-----
 lib/am/tags.am    |  3 ---
 m4/init.m4        | 14 ++++++++++++++
 4 files changed, 31 insertions(+), 8 deletions(-)

diff --git a/NEWS b/NEWS
index df978a5..8821376 100644
--- a/NEWS
+++ b/NEWS
@@ -64,6 +64,10 @@
 
 New in ?.?.?:
 
+* New features added
+
+  - CTAGS, ETAGS, SCOPE variables can be set via configure.
+
 * Bugs fixed
 
   - test-driver less likely to clash with tests writing to the same file.
diff --git a/doc/automake.texi b/doc/automake.texi
index 7e0ad1b..040172e 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -10604,10 +10604,10 @@ GNU Emacs under some circumstances.
 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,
@@ -10619,10 +10619,12 @@ The @code{tags} rule will also be generated if the 
variable
 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:
@@ -10642,6 +10644,9 @@ build @command{vi}-style @file{tags} files.  The 
variable @code{CTAGS}
 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
@@ -10659,6 +10664,9 @@ file names respectively, while @code{AM_CSCOPEFLAGS} 
can be used by the
 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}.
diff --git a/lib/am/tags.am b/lib/am/tags.am
index a485ff8..c1ec377 100644
--- a/lib/am/tags.am
+++ b/lib/am/tags.am
@@ -45,7 +45,6 @@ ID: $(am__tagged_files)
 ## TAGS.  ##
 ## ------ ##
 
-ETAGS = etags
 .PHONY: TAGS tags
 if %?SUBDIRS%
 AM_RECURSIVE_TARGETS += TAGS
@@ -101,7 +100,6 @@ tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 ## vi-style tags.  ##
 ## --------------- ##
 
-CTAGS = ctags
 .PHONY: CTAGS ctags
 if %?SUBDIRS%
 AM_RECURSIVE_TARGETS += CTAGS
@@ -136,7 +134,6 @@ GTAGS:
 ## ------- ##
 
 if %?TOPDIR_P%
-CSCOPE = cscope
 .PHONY: cscope clean-cscope
 AM_RECURSIVE_TARGETS += cscope
 cscope: cscope.files
diff --git a/m4/init.m4 b/m4/init.m4
index ba73676..f82d756 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -116,6 +116,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
                  [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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]