diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2022-11-14 14:17:55 +0000 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2023-01-12 14:40:47 +0000 |
commit | e2dc08c6f0642ca2c94e91997a8d4e971bea9971 (patch) | |
tree | af771a6eab4dba0169074df0a0479d6d43498c57 /libctf/Makefile.am | |
parent | 5e8b4bbcc8593e1f1f81c4fd3562d637a07ee0cc (diff) | |
download | gdb-e2dc08c6f0642ca2c94e91997a8d4e971bea9971.zip gdb-e2dc08c6f0642ca2c94e91997a8d4e971bea9971.tar.gz gdb-e2dc08c6f0642ca2c94e91997a8d4e971bea9971.tar.bz2 |
libctf: skip the testsuite from inside dejagnu
The libctf testsuite uses Tcl try/catch to trap run_output errors. This
is only supported in reasonably recent Tcls, so we detect the lack of
try/catch and suppress the testsuite via an Automake conditional in its
absence.
But this turns out not to work: Automake produces a check-DEJAGNU target
regardless of the value of this conditional and sticks it in an
unconditionally-executed part of the makefile, so the testsuite gets
executed anyway, and fails with a nasty-looking syntax error. We can't
disable it by taking "dejagnu" out of AUTOMAKE_OPTIONS, because if you
do that Automake stops you using RUNTEST, RUNTESTFLAGS and other
variables users would expect to work.
So move to disabling the testsuite from inside the testsuite itself,
importing the value of the former Automake conditional as a Tcl variable
and exiting very early in default.exp if it's false.
* configure.ac (TCL_TRY): No longer an Automake conditional.
Rename to...
(HAVE_TCL_TRY): ... this.
* Makefile.am: Drop TCL_TRY.
(development.exp): Set have_tcl_try.
* testsuite/config/default.exp: Exit if have_tcl_try is false.
* configure: Regenerated.
* Makefile.in: Likewise.
Diffstat (limited to 'libctf/Makefile.am')
-rw-r--r-- | libctf/Makefile.am | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libctf/Makefile.am b/libctf/Makefile.am index c4809f7..c959b09 100644 --- a/libctf/Makefile.am +++ b/libctf/Makefile.am @@ -72,7 +72,6 @@ EXPECT = expect RUNTEST = runtest RUNTESTFLAGS = -if TCL_TRY CC_FOR_TARGET = ` \ if [ -f $$r/../gcc/xgcc ] ; then \ if [ -f $$r/../newlib/Makefile ] ; then \ @@ -105,6 +104,7 @@ check-DEJAGNU: site.exp development.exp development.exp: $(BFDDIR)/development.sh $(AM_V_GEN)$(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh \ | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@ + echo "set have_tcl_try @HAVE_TCL_TRY@" >> $@ # development.sh is used to determine -Werror default. CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh @@ -112,6 +112,5 @@ CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh EXTRA_DEJAGNU_SITE_CONFIG = development.exp DISTCLEANFILES += site.exp development.exp -endif include doc/local.mk |