summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorEric Gallager <egallager@gcc.gnu.org>2021-11-29 13:24:12 -0500
committerEric Gallager <egallager@gcc.gnu.org>2021-11-29 13:24:12 -0500
commit909b30a17e71253772d2cb174d0dae6d0b8c9401 (patch)
tree13c5f856e33de36cf3c91991bea3914f85d74a52 /libiberty
parent85289ba36c2e62de84cc0232c954d9a74bda708a (diff)
downloadgcc-909b30a17e71253772d2cb174d0dae6d0b8c9401.tar.gz
Make etags path used by build system configurable
This commit allows users to specify a path to their "etags" executable for use when doing "make tags". I based this patch off of this one from upstream automake: https://git.savannah.gnu.org/cgit/automake.git/commit/m4?id=d2ccbd7eb38d6a4277d6f42b994eb5a29b1edf29 This means that I just supplied variables that the user can override for the tags programs, rather than having the configure scripts actually check for them. I handle etags and ctags separately because the intl subdirectory has separate targets for them. This commit only affects the subdirectories that use handwritten Makefiles; the ones that use automake will have to wait until we update the version of automake used to be 1.16.4 or newer before they'll be fixed. Addresses #103021 gcc/ChangeLog: PR other/103021 * Makefile.in: Substitute CTAGS, ETAGS, and CSCOPE variables. Use ETAGS variable in TAGS target. * configure: Regenerate. * configure.ac: Allow CTAGS, ETAGS, and CSCOPE variables to be overridden. gcc/ada/ChangeLog: PR other/103021 * gcc-interface/Make-lang.in: Use ETAGS variable in TAGS target. gcc/c/ChangeLog: PR other/103021 * Make-lang.in: Use ETAGS variable in TAGS target. gcc/cp/ChangeLog: PR other/103021 * Make-lang.in: Use ETAGS variable in TAGS target. gcc/d/ChangeLog: PR other/103021 * Make-lang.in: Use ETAGS variable in TAGS target. gcc/fortran/ChangeLog: PR other/103021 * Make-lang.in: Use ETAGS variable in TAGS target. gcc/go/ChangeLog: PR other/103021 * Make-lang.in: Use ETAGS variable in TAGS target. gcc/objc/ChangeLog: PR other/103021 * Make-lang.in: Use ETAGS variable in TAGS target. gcc/objcp/ChangeLog: PR other/103021 * Make-lang.in: Use ETAGS variable in TAGS target. intl/ChangeLog: PR other/103021 * Makefile.in: Use ETAGS variable in TAGS target, CTAGS variable in CTAGS target, and MKID variable in ID target. * configure: Regenerate. * configure.ac: Allow CTAGS, ETAGS, and MKID variables to be overridden. libcpp/ChangeLog: PR other/103021 * Makefile.in: Use ETAGS variable in TAGS target. * configure: Regenerate. * configure.ac: Allow ETAGS variable to be overridden. libiberty/ChangeLog: PR other/103021 * Makefile.in: Use ETAGS variable in TAGS target. * configure: Regenerate. * configure.ac: Allow ETAGS variable to be overridden.
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/Makefile.in4
-rwxr-xr-xlibiberty/configure6
-rw-r--r--libiberty/configure.ac5
3 files changed, 14 insertions, 1 deletions
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 884cc6c4af2..0d41a79cc98 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -429,8 +429,10 @@ stamp-noasandir:
.PHONY: all etags tags TAGS ls clean stage1 stage2
+ETAGS = @ETAGS@
+
etags tags TAGS: etags-subdir
- cd $(srcdir) && etags $(CFILES)
+ cd $(srcdir) && $(ETAGS) $(CFILES)
# The standalone demangler (c++filt) has been moved to binutils.
# But make this target work anyway for demangler hacking.
diff --git a/libiberty/configure b/libiberty/configure
index 3c7e588b16b..0a797255c70 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -659,6 +659,7 @@ HAVE_PERL
PERL
BUILD_INFO
MAKEINFO
+ETAGS
NOTMAINT
MAINT
libiberty_topdir
@@ -2558,6 +2559,11 @@ else
NOTMAINT=''
fi
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+
+
# Do we have a single-tree copy of texinfo? Even if we do, we can't
# rely on it - libiberty is built before texinfo.
# Extract the first word of "makeinfo", so it can be a program name with args.
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
index 4b78c1830c7..84a7b378fad 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
@@ -61,6 +61,11 @@ fi
AC_SUBST(MAINT)dnl
AC_SUBST(NOTMAINT)dnl
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+AC_SUBST([ETAGS])
+
# Do we have a single-tree copy of texinfo? Even if we do, we can't
# rely on it - libiberty is built before texinfo.
AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, )