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.in | |
parent | 5e8b4bbcc8593e1f1f81c4fd3562d637a07ee0cc (diff) | |
download | binutils-e2dc08c6f0642ca2c94e91997a8d4e971bea9971.zip binutils-e2dc08c6f0642ca2c94e91997a8d4e971bea9971.tar.gz binutils-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.in')
-rw-r--r-- | libctf/Makefile.in | 95 |
1 files changed, 42 insertions, 53 deletions
diff --git a/libctf/Makefile.in b/libctf/Makefile.in index f2b852e..c6cb55c 100644 --- a/libctf/Makefile.in +++ b/libctf/Makefile.in @@ -127,10 +127,9 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ @NEED_CTF_QSORT_R_TRUE@am__append_1 = ctf-qsort_r.c -@TCL_TRY_TRUE@am__append_2 = site.exp development.exp -@BUILD_INFO_TRUE@am__append_3 = doc/ctf-spec.texi -@BUILD_INFO_TRUE@am__append_4 = texput.log -@BUILD_INFO_TRUE@am__append_5 = doc/ctf-spec.info +@BUILD_INFO_TRUE@am__append_2 = doc/ctf-spec.texi +@BUILD_INFO_TRUE@am__append_3 = texput.log +@BUILD_INFO_TRUE@am__append_4 = doc/ctf-spec.info subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \ @@ -312,7 +311,7 @@ DVIS = doc/ctf-spec.dvi PDFS = doc/ctf-spec.pdf PSS = doc/ctf-spec.ps HTMLS = doc/ctf-spec.html -TEXINFOS = $(am__append_3) +TEXINFOS = $(am__append_2) TEXI2DVI = texi2dvi TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html @@ -407,6 +406,7 @@ FGREP = @FGREP@ GENCAT = @GENCAT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ +HAVE_TCL_TRY = @HAVE_TCL_TRY@ INCINTL = @INCINTL@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -522,9 +522,9 @@ ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd AUTOMAKE_OPTIONS = dejagnu foreign info-in-builddir no-texinfo.tex # Variables that we might accumulate conditionally or in subdirs. -info_TEXINFOS = $(am__append_3) -DISTCLEANFILES = $(am__append_2) $(am__append_4) -MAINTAINERCLEANFILES = $(am__append_5) +info_TEXINFOS = $(am__append_2) +DISTCLEANFILES = site.exp development.exp $(am__append_3) +MAINTAINERCLEANFILES = $(am__append_4) # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is # -I../zlib, unless we were configured with --with-system-zlib, in which @@ -559,25 +559,25 @@ libctf_la_LDFLAGS = $(libctf_ldflags_nover) @VERSION_FLAGS@ libctf_la_SOURCES = $(libctf_nobfd_la_SOURCES) ctf-open-bfd.c RUNTEST = runtest RUNTESTFLAGS = -@TCL_TRY_TRUE@CC_FOR_TARGET = ` \ -@TCL_TRY_TRUE@ if [ -f $$r/../gcc/xgcc ] ; then \ -@TCL_TRY_TRUE@ if [ -f $$r/../newlib/Makefile ] ; then \ -@TCL_TRY_TRUE@ echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \ -@TCL_TRY_TRUE@ else \ -@TCL_TRY_TRUE@ echo $$r/../gcc/xgcc -B$$r/../gcc/; \ -@TCL_TRY_TRUE@ fi; \ -@TCL_TRY_TRUE@ else \ -@TCL_TRY_TRUE@ if [ "@host@" = "@target@" ] ; then \ -@TCL_TRY_TRUE@ echo $(CC); \ -@TCL_TRY_TRUE@ else \ -@TCL_TRY_TRUE@ echo gcc | sed '$(transform)'; \ -@TCL_TRY_TRUE@ fi; \ -@TCL_TRY_TRUE@ fi` +CC_FOR_TARGET = ` \ + if [ -f $$r/../gcc/xgcc ] ; then \ + if [ -f $$r/../newlib/Makefile ] ; then \ + echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \ + else \ + echo $$r/../gcc/xgcc -B$$r/../gcc/; \ + fi; \ + else \ + if [ "@host@" = "@target@" ] ; then \ + echo $(CC); \ + else \ + echo gcc | sed '$(transform)'; \ + fi; \ + fi` # development.sh is used to determine -Werror default. -@TCL_TRY_TRUE@CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh -@TCL_TRY_TRUE@EXTRA_DEJAGNU_SITE_CONFIG = development.exp +CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh +EXTRA_DEJAGNU_SITE_CONFIG = development.exp @BUILD_INFO_TRUE@AM_MAKEINFOFLAGS = --no-split all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am @@ -1235,18 +1235,6 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files - -@TCL_TRY_FALSE@check-DEJAGNU: site.exp -@TCL_TRY_FALSE@ srcdir='$(srcdir)'; export srcdir; \ -@TCL_TRY_FALSE@ EXPECT=$(EXPECT); export EXPECT; \ -@TCL_TRY_FALSE@ if $(SHELL) -c "$(RUNTEST) --version" > /dev/null 2>&1; then \ -@TCL_TRY_FALSE@ exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \ -@TCL_TRY_FALSE@ if $(RUNTEST) $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ -@TCL_TRY_FALSE@ then :; else exit_status=1; fi; \ -@TCL_TRY_FALSE@ done; \ -@TCL_TRY_FALSE@ else echo "WARNING: could not find '$(RUNTEST)'" 1>&2; :;\ -@TCL_TRY_FALSE@ fi; \ -@TCL_TRY_FALSE@ exit $$exit_status site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG) @echo 'Making a new site.exp file ...' @echo '## these variables are automatically generated by make ##' >site.tmp @@ -1685,23 +1673,24 @@ uninstall-am: uninstall-dvi-am uninstall-html-am \ .PRECIOUS: Makefile -@TCL_TRY_TRUE@check-DEJAGNU: site.exp development.exp -@TCL_TRY_TRUE@ srcroot=`cd $(srcdir) && pwd`; export srcroot; \ -@TCL_TRY_TRUE@ r=`pwd`; export r; \ -@TCL_TRY_TRUE@ LC_ALL=C; export LC_ALL; \ -@TCL_TRY_TRUE@ EXPECT=$(EXPECT); export EXPECT; \ -@TCL_TRY_TRUE@ runtest=$(RUNTEST); \ -@TCL_TRY_TRUE@ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ -@TCL_TRY_TRUE@ $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \ -@TCL_TRY_TRUE@ CC="$(CC)" CC_FOR_TARGET="$(CC_FOR_TARGET)" \ -@TCL_TRY_TRUE@ CFLAGS="$(CFLAGS) -I$(INCDIR) -I$(srcdir) -I$(builddir) -I$(builddir)/../bfd $(ZLIBINC)" \ -@TCL_TRY_TRUE@ LIBS="$(libctf_nobfd_la_LIBADD) $(LIBS)" $(RUNTESTFLAGS); \ -@TCL_TRY_TRUE@ else echo "WARNING: could not find \`runtest'" 1>&2; :;\ -@TCL_TRY_TRUE@ fi - -@TCL_TRY_TRUE@development.exp: $(BFDDIR)/development.sh -@TCL_TRY_TRUE@ $(AM_V_GEN)$(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh \ -@TCL_TRY_TRUE@ | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@ +check-DEJAGNU: site.exp development.exp + srcroot=`cd $(srcdir) && pwd`; export srcroot; \ + r=`pwd`; export r; \ + LC_ALL=C; export LC_ALL; \ + EXPECT=$(EXPECT); export EXPECT; \ + runtest=$(RUNTEST); \ + if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ + $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \ + CC="$(CC)" CC_FOR_TARGET="$(CC_FOR_TARGET)" \ + CFLAGS="$(CFLAGS) -I$(INCDIR) -I$(srcdir) -I$(builddir) -I$(builddir)/../bfd $(ZLIBINC)" \ + LIBS="$(libctf_nobfd_la_LIBADD) $(LIBS)" $(RUNTESTFLAGS); \ + else echo "WARNING: could not find \`runtest'" 1>&2; :;\ + fi + +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@" >> $@ @BUILD_INFO_TRUE@html-local: doc/ctf-spec/index.html @BUILD_INFO_TRUE@doc/ctf-spec/index.html: doc/ctf-spec.texi doc/$(am__dirstamp) |