Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/Makefile.am')
-rw-r--r--newlib/Makefile.am66
1 files changed, 65 insertions, 1 deletions
diff --git a/newlib/Makefile.am b/newlib/Makefile.am
index 8cf1d3344..fc16f237f 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