+Sat May 25 10:19:53 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * automake.in (handle_tests): Handle dejagnu.
+ (handle_options): Recognize dejagnu option.
+
+ * dejagnu.am: New file.
+
Thu May 23 10:01:13 1996 Tom Tromey <tromey@creche.cygnus.com>
* automake.in (handle_dist): Run installcheck target from
# CONFIG_HEADER = config.h
pkgdata_DATA = clean-kr.am clean.am compile-kr.am compile-vars.am \
-compile.am data.am depend.am \
-dist-vars.am footer.am header.am header-vars.am \
-kr-vars.am \
-libraries.am library.am mans-vars.am \
-program.am programs.am remake-hdr.am \
-remake-subd.am remake.am scripts.am subdirs.am tags.am tags-subd.am \
-tags-clean.am \
-texi-version.am texinfos-vars.am texinfos.am \
-libraries-clean.am programs-clean.am data-clean.am \
-COPYING INSTALL texinfo.tex \
-ansi2knr.c ansi2knr.1 \
-aclocal.m4
+compile.am data.am dejagnu.am depend.am dist-vars.am footer.am \
+header.am header-vars.am kr-vars.am libraries.am library.am \
+mans-vars.am program.am programs.am remake-hdr.am remake-subd.am \
+remake.am scripts.am subdirs.am tags.am tags-subd.am tags-clean.am \
+texi-version.am texinfos-vars.am texinfos.am libraries-clean.am \
+programs-clean.am data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c \
+ansi2knr.1 aclocal.m4
## These must all be executable when installed.
pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh mkinstalldirs
# CONFIG_HEADER = config.h
pkgdata_DATA = clean-kr.am clean.am compile-kr.am compile-vars.am \
-compile.am data.am depend.am \
-dist-vars.am footer.am header.am header-vars.am \
-kr-vars.am \
-libraries.am library.am mans-vars.am \
-program.am programs.am remake-hdr.am \
-remake-subd.am remake.am scripts.am subdirs.am tags.am tags-subd.am \
-tags-clean.am \
-texi-version.am texinfos-vars.am texinfos.am \
-libraries-clean.am programs-clean.am data-clean.am \
-COPYING INSTALL texinfo.tex \
-ansi2knr.c ansi2knr.1 \
-aclocal.m4
+compile.am data.am dejagnu.am depend.am dist-vars.am footer.am \
+header.am header-vars.am kr-vars.am libraries.am library.am \
+mans-vars.am program.am programs.am remake-hdr.am remake-subd.am \
+remake.am scripts.am subdirs.am tags.am tags-subd.am tags-clean.am \
+texi-version.am texinfos-vars.am texinfos.am libraries-clean.am \
+programs-clean.am data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c \
+ansi2knr.1 aclocal.m4
pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh mkinstalldirs
New in 0.34:
* Bug fixes
* distcheck target runs install and installcheck targets
+* Added support for DejaGNU.
\f
New in 0.33:
* More bug fixes
Check to make sure various scripts are executable (IE when looking for
them in a directory)
-Testing: allow support for Cygnus-style dejagnu-based test suites via
-an option
-
Think about ways to make automake fit better with Cygnus-style trees.
Use recode in dist target when MAINT_CHARSET specified. Read caveats
&set_strictness ($_);
}
elsif ($_ eq 'no-installman' || $_ eq 'ansi2knr'
- || $_ eq 'dist-shar' || $_ eq 'dist-zip')
+ || $_ eq 'dist-shar' || $_ eq 'dist-zip'
+ || $_ eq 'dejagnu')
{
# Explicitly recognize these.
}
$output_rules .= "\n";
}
-# Handle TESTS variable.
+# Handle TESTS variable and other checks.
sub handle_tests
{
- return if ! &variable_defined ('TESTS');
-
- push (@check, 'check-TESTS');
- push (@phony, 'check-TESTS');
- # FIXME use $(SHELL) here? That is what Ulrich suggests. Maybe a
- # new macro, $(TEST_SHELL), a la $(CONFIG_SHELL)? For now we just
- # execute the file directly; this allows test files which are
- # compiled -- a possibly useful feature.
- $output_rules .= 'check-TESTS: $(TESTS)
+ if (&variable_defined ('DEJATOOL') && ! defined $options{'dejagnu'})
+ {
+ # Error.
+ &am_line_error ('DEJATOOL',
+ "\`DEJATOOL' defined but \`dejagnu' not in \`AUTOMAKE_OPTIONS'");
+ return;
+ }
+
+ if (defined $options{'dejagnu'})
+ {
+ push (@check, 'check-DEJAGNU');
+ push (@phony, 'check-DEJAGNU');
+ $output_rules .= &file_contents ('dejagnu');
+ }
+ elsif (&variable_defined ('TESTS'))
+ {
+ push (@check, 'check-TESTS');
+ push (@phony, 'check-TESTS');
+ # FIXME use $(SHELL) here? That is what Ulrich suggests.
+ # Maybe a new macro, $(TEST_SHELL), a la $(CONFIG_SHELL)? For
+ # now we just execute the file directly; this allows test
+ # files which are compiled -- a possibly useful feature.
+ $output_rules .= 'check-TESTS: $(TESTS)
@failed=0; all=0; \\
srcdir=$(srcdir); export srcdir; \\
for tst in $(TESTS); do \\
echo "$$failed of $$all tests failed"; \\
fi
';
+ }
}
################################################################
@node Tests
@chapter Support for test suites
-Automake supports a simple form of test suite. If the variable
-@code{TESTS} is defined, its value is taken to be a list of programs to
-run in order to do the testing. The programs can either be derived
-objects or source objects; the generated rule will look both in
-@var{srcdir} and @file{.}.
-
-The testing is done via @samp{make check}. The number of failures will
-be printed at the end of the run.
-
-In the future there will be some support for test suites which use
-@code{DejaGnu}.
+Automake supports a two forms of test suite.
+
+If the variable @code{TESTS} is defined, its value is taken to be a list
+of programs to run in order to do the testing. The programs can either
+be derived objects or source objects; the generated rule will look both
+in @var{srcdir} and @file{.}. The number of failures will be printed at
+the end of the run.
+
+If @samp{dejagnu} appears in @code{AUTOMAKE_OPTIONS}, then the a
+@code{dejagnu}-based test suite is assumed. The value of the variable
+@code{DEJATOOL} is passed as the @code{--tool} argument to
+@code{runtest}. The variables @code{EXPECT}, @code{RUNTEST} and
+@code{RUNTESTFLAGS} can also be overridden to provide project-specific
+values. For instance, you will need to do this if you are testing a
+compiler toolchain, because the default values do not take into account
+host and target names.
+@opindex dejagnu
+@vindex DEJATOOL
+@vindex EXPECT
+@vindex RUNTEST
+@vindex RUNTESTFLAGS
+@c FIXME xref dejagnu
+
+In either case, the testing is done via @samp{make check}.
@node Options
--- /dev/null
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+## 02111-1307, USA.
+
+## Work if expect is in our tree.
+EXPECT = ` \
+ if [ -f $$rootme/../expect/expect ] ; then \
+ echo $$rootme/../expect/expect ; \
+ else echo expect ; fi`
+
+## If DejaGNU is in our tree, we must run it out of srcdir.
+RUNTEST = ` \
+ if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then \
+ echo $(top_srcdir)/../dejagnu/runtest ; \
+ else echo runtest ; fi`
+
+## Flags for DejaGNU.
+RUNTESTFLAGS =
+
+## Name of tool to use. Default is the same as the package.
+DEJATOOL = $(PACKAGE)
+
+check-DEJAGNU:
+ rootme=`cd $(top_builddir) && pwd`; \
+## Life is easiest with an absolute srcdir, so do that.
+ srcdir=`cd $(srcdir) && pwd`; export srcdir; \
+ EXPECT=$(EXPECT); export EXPECT; \
+## Allow this to work when expect and DejaGNU are in tree.
+ if [ -f $$rootme/../expect/expect ]; then \
+ TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
+ export TCL_LIBRARY; \
+ fi; \
+ $(RUNTEST) --tool $(DEJATOOL) --srcdir $$srcdir $(RUNTESTFLAGS)
# CONFIG_HEADER = config.h
pkgdata_DATA = clean-kr.am clean.am compile-kr.am compile-vars.am \
-compile.am data.am depend.am \
-dist-vars.am footer.am header.am header-vars.am \
-kr-vars.am \
-libraries.am library.am mans-vars.am \
-program.am programs.am remake-hdr.am \
-remake-subd.am remake.am scripts.am subdirs.am tags.am tags-subd.am \
-tags-clean.am \
-texi-version.am texinfos-vars.am texinfos.am \
-libraries-clean.am programs-clean.am data-clean.am \
-COPYING INSTALL texinfo.tex \
-ansi2knr.c ansi2knr.1 \
-aclocal.m4
+compile.am data.am dejagnu.am depend.am dist-vars.am footer.am \
+header.am header-vars.am kr-vars.am libraries.am library.am \
+mans-vars.am program.am programs.am remake-hdr.am remake-subd.am \
+remake.am scripts.am subdirs.am tags.am tags-subd.am tags-clean.am \
+texi-version.am texinfos-vars.am texinfos.am libraries-clean.am \
+programs-clean.am data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c \
+ansi2knr.1 aclocal.m4
## These must all be executable when installed.
pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh mkinstalldirs
--- /dev/null
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+## 02111-1307, USA.
+
+## Work if expect is in our tree.
+EXPECT = ` \
+ if [ -f $$rootme/../expect/expect ] ; then \
+ echo $$rootme/../expect/expect ; \
+ else echo expect ; fi`
+
+## If DejaGNU is in our tree, we must run it out of srcdir.
+RUNTEST = ` \
+ if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then \
+ echo $(top_srcdir)/../dejagnu/runtest ; \
+ else echo runtest ; fi`
+
+## Flags for DejaGNU.
+RUNTESTFLAGS =
+
+## Name of tool to use. Default is the same as the package.
+DEJATOOL = $(PACKAGE)
+
+check-DEJAGNU:
+ rootme=`cd $(top_builddir) && pwd`; \
+## Life is easiest with an absolute srcdir, so do that.
+ srcdir=`cd $(srcdir) && pwd`; export srcdir; \
+ EXPECT=$(EXPECT); export EXPECT; \
+## Allow this to work when expect and DejaGNU are in tree.
+ if [ -f $$rootme/../expect/expect ]; then \
+ TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
+ export TCL_LIBRARY; \
+ fi; \
+ $(RUNTEST) --tool $(DEJATOOL) --srcdir $$srcdir $(RUNTESTFLAGS)
-@set UPDATED 17 May 1996
+@set UPDATED 25 May 1996
@set EDITION 0.34
@set VERSION 0.34