aboutsummaryrefslogtreecommitdiff
path: root/libcpp
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 /libcpp
parent85289ba36c2e62de84cc0232c954d9a74bda708a (diff)
downloadgcc-909b30a17e71253772d2cb174d0dae6d0b8c9401.zip
gcc-909b30a17e71253772d2cb174d0dae6d0b8c9401.tar.gz
gcc-909b30a17e71253772d2cb174d0dae6d0b8c9401.tar.bz2
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 'libcpp')
-rw-r--r--libcpp/Makefile.in4
-rwxr-xr-xlibcpp/configure6
-rw-r--r--libcpp/configure.ac5
3 files changed, 14 insertions, 1 deletions
diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
index 34e4206..6b6554b 100644
--- a/libcpp/Makefile.in
+++ b/libcpp/Makefile.in
@@ -264,11 +264,13 @@ po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
sed 's:$(srcdir)/::g' <po/$(PACKAGE).pot.tmp >po/$(PACKAGE).pot
rm po/$(PACKAGE).pot.tmp
+ETAGS = @ETAGS@
+
TAGS_SOURCES = $(libcpp_a_SOURCES) internal.h system.h ucnid.h \
include/cpplib.h include/line-map.h include/mkdeps.h include/symtab.h
TAGS: $(TAGS_SOURCES)
- cd $(srcdir) && etags $(TAGS_SOURCES)
+ cd $(srcdir) && $(ETAGS) $(TAGS_SOURCES)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/libcpp/configure b/libcpp/configure
index 9674cd9..2797292 100755
--- a/libcpp/configure
+++ b/libcpp/configure
@@ -652,6 +652,7 @@ noexception_flags
WARN_PEDANTIC
c_warn
warn
+ETAGS
AUTOHEADER
AUTOCONF
ACLOCAL
@@ -4896,6 +4897,11 @@ done
test -n "$AUTOHEADER" || AUTOHEADER="$MISSING autoheader"
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+
+
# Figure out what compiler warnings we can enable.
# See config/warnings.m4 for details.
diff --git a/libcpp/configure.ac b/libcpp/configure.ac
index 1efa96f..bc2373c 100644
--- a/libcpp/configure.ac
+++ b/libcpp/configure.ac
@@ -22,6 +22,11 @@ AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal])
AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf])
AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader])
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+AC_SUBST([ETAGS])
+
# Figure out what compiler warnings we can enable.
# See config/warnings.m4 for details.