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.in | 91 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 83 insertions(+), 8 deletions(-) (limited to 'newlib/Makefile.in') diff --git a/newlib/Makefile.in b/newlib/Makefile.in index 4172dbfab..f8b528a50 100644 --- a/newlib/Makefile.in +++ b/newlib/Makefile.in @@ -57,8 +57,12 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_alias = @build_alias@ +build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ +target_alias = @target_alias@ +target_triplet = @target@ AR = @AR@ AS = @AS@ AWK = @AWK@ @@ -96,7 +100,7 @@ newlib_basedir = @newlib_basedir@ oext = @oext@ sys_dir = @sys_dir@ -AUTOMAKE_OPTIONS = cygnus +AUTOMAKE_OPTIONS = cygnus dejagnu # Multilib support variables. MULTISRCTOP = @@ -224,6 +228,10 @@ CLEANFILES = targ-include stmp-targ-include CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host MAKEOVERRIDES = + +# dejagnu support + +RUNTESTFLAGS = ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_CLEAN_FILES = @@ -261,6 +269,8 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best DIST_SUBDIRS = libc libm doc . +EXPECT = `if test -f $(top_builddir)/../expect/expect; then echo $(top_builddir)/../expect/expect; else echo expect; fi` +RUNTEST = `if test -f $(top_srcdir)/../dejagnu/runtest; then echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi` SOURCES = libm.a.c libc.a.c $(libm_la_SOURCES) $(libc_la_SOURCES) OBJECTS = libm.a.o libc.a.o $(libm_la_OBJECTS) $(libc_la_OBJECTS) @@ -549,11 +559,16 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + +DEJATOOL = $(PACKAGE) + +RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir info-am: info: info-recursive dvi-am: dvi: dvi-recursive check-am: + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU check: check-recursive installcheck-am: installcheck: installcheck-recursive @@ -637,13 +652,13 @@ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ all-recursive check-recursive installcheck-recursive info-recursive \ dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ -distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ -dvi-am dvi check check-am installcheck-am installcheck install-info-am \ -install-info install-exec-am install-exec install-data-local \ -install-data-am install-data install-am install uninstall-am uninstall \ -all-redirect all-am all installdirs-am installdirs mostlyclean-generic \ -distclean-generic clean-generic maintainer-clean-generic clean \ -mostlyclean distclean maintainer-clean +distclean-tags clean-tags maintainer-clean-tags distdir check-DEJAGNU \ +info-am info dvi-am dvi check check-am installcheck-am installcheck \ +install-info-am install-info install-exec-am install-exec \ +install-data-local install-data-am install-data install-am install \ +uninstall-am uninstall all-redirect all-am all installdirs-am \ +installdirs mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean # objects listed later in LIBM_OBJECTLISTS will override those listed earlier @@ -778,6 +793,66 @@ distclean-multi: maintainer-clean-multi: $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean +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 + # 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. .NOEXPORT: -- cgit v1.2.3