From eaa75b70e31aed8ba2823c7b37ff92230dd8c451 Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Wed, 24 Apr 2002 20:53:30 +0000 Subject: * Makefile.am (check-DEJAGNU): New target. (site.exp): Likewise. * acinclude.m4 (NEWLIB_CONFIGURE): Replace AC_CANONICAL_HOST with AC_CANONICAL_SYSTEM. Remove AC_CANONICAL_BUILD. * libc/locale/locale.c (_setlocale_r): Add UTF-8 support. * libc/stdlib/mbtowc_r.c (_mbtowc_r): Likewise. * libc/stdlib/wctomb_r.c (_wctomb_r): Likewise. * testsuite: New directory. * testsuite/config: Likewise. * testsuite/lib: Likewise. * testsuite/newlib.locale: Likewise. * testsuite/newlib.string: Likewise. * testsuite/config/default.exp: New file. * testsuite/lib/checkoutput.exp: New file. * testsuite/lib/newlib.exp: New file. * testsuite/lib/passfail.exp: New file. * testsuite/newlib.locale/UTF-8.c: New file. * testsuite/newlib.locale/UTF-8.exp: New file. * testsuite/newlib.locale/locale.exp: New file. * testsuite/newlib.string/string.exp: New file. * testsuite/newlib.string/tstring.c: New file. --- newlib/Makefile.am | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) (limited to 'newlib/Makefile.am') diff --git a/newlib/Makefile.am b/newlib/Makefile.am index 8cf1d33..fc16f23 100644 --- a/newlib/Makefile.am +++ b/newlib/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to generate Makefile.in -AUTOMAKE_OPTIONS = cygnus +AUTOMAKE_OPTIONS = cygnus dejagnu # Multilib support variables. MULTISRCTOP = @@ -276,3 +276,67 @@ maintainer-clean-multi: $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean MAKEOVERRIDES= + +# dejagnu support + +RUNTESTFLAGS= + +site.exp: Makefile + @echo 'Making a new site.exp file...' + @test ! -f site.bak || rm -f site.bak + @echo '## these variables are automatically generated by make ##' > $@-t + @echo '# Do not edit here. If you wish to override these values' >> $@-t + @echo '# edit the last section' >> $@-t + @echo 'set tool $(DEJATOOL)' >> $@-t + @echo 'set tool_version $(VERSION)' >> $@-t + @echo 'set srcdir $(srcdir)/testsuite' >> $@-t + @echo 'set objdir' `pwd` >> $@-t + @echo 'set newlib_cflags "$(NEWLIB_CFLAGS)"' >> $@-t + @echo 'set build_alias $(build_alias)' >> $@-t + @echo 'set build_triplet $(build_triplet)' >> $@-t + @echo 'set host_alias $(host_alias)' >> $@-t + @echo 'set host_triplet $(host_triplet)' >> $@-t + @echo 'set target_alias $(host_alias)' >> $@-t + @echo 'set target_triplet $(host_triplet)' >> $@-t + @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t + @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t + @test ! -f site.exp || mv site.exp site.bak + @mv $@-t site.exp + +check-DEJAGNU: site.exp + @if [ -d testsuite ] ; then \ + true ; \ + else \ + mkdir testsuite ; \ + fi + @rm -f testsuite/site.exp + @cp site.exp testsuite/site.exp + @rootme=`pwd` ; \ + export rootme ; \ + srcdir=`cd ${srcdir}; pwd` ; \ + export srcdir ; \ + EXPECT=`if [ -f $${rootme}/${MULTIBUILDTOP}../../expect/expect ] ; then \ + echo $${rootme}/${MULTIBUILDTOP}../../expect/expect ; \ + else \ + echo expect ; \ + fi` ; \ + export EXPECT ; \ + echo "Found expect: $${EXPECT}" ; \ + if [ -f $(top_builddir)/$(MULTIBUILDTOP)../../expect/expect ] ; then \ + TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd` ; \ + export TCL_LIBRARY ; \ + echo "Found TCL library directory: $${TCL_LIBRARY}" ; \ + fi ; \ + RUNTEST=`if [ -f $${srcdir}/../dejagnu/runtest ] ; then \ + echo $${srcdir}/../dejagnu/runtest ; \ + else \ + echo runtest ; \ + fi` ; \ + export RUNTEST ; \ + echo "Found runtest: $${RUNTEST}" ; \ + cd testsuite ; \ + if $(SHELL) -c "$$RUNTEST --version" > /dev/null 2>&1 ; then \ + $$RUNTEST --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite $(RUNTESTFLAGS); \ + else \ + echo "WARNING: could not find \`runtest'" 1>&2 ; \ + fi -- cgit v1.1