-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Eric Blake on 10/13/2008 5:55 AM: > >> AUTOTEST = $(AUTOM4TE) --language=autotest >> -$(TESTSUITE): $(srcdir)/testsuite.at >> +$(TESTSUITE): $(srcdir)/package.m4 $(srcdir)/testsuite.at > > This looks like a correct dependency (at any rate, GNU M4 uses it). I'll > probably apply this hunk of the patch soon. On the other hand, the sample shows that testsuite, but not package.m4, is listed in EXTRA_DIST. Depending on a generated file, without also distributing the generated file, is a recipe for disaster. Thus, the example also needs to demonstrate the earlier statement that package.m4 must be distributed. Here's what I'm considering checking in; I'd like some feedback to make sure I'm not missing anything. For that matter, since the 'missing' script supports autom4te, should we update the example to use missing, so that if a user touches testsuite.at but lacks Autoconf, they get nicer behavior than a failed make run? I guess I'll have to play with m4-head to see how to nicely inject the missing script into the mix. (Autoconf itself is immune to the rule about distributing a pre-built testsuite, or needing to use the missing script, because it is the only package that can guarantee that you have autoconf present and thus can rebuild the testsuite on the fly). (this patch also available from http://repo.or.cz/w/autoconf/ericb.git?a=shortlog;h=refs/heads/testsuite) $ git pull git://repo.or.cz/autoconf/ericb.git testsuite - -- Don't work too hard, make some time for fun as well! Eric Blake ebb9@xxxxxxx -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkj3RPMACgkQ84KuGfSFAYD1DgCeL2VniwJbfGucdrquLMYO1kVv ENgAnR93wtIUWl1tYGhqKLhqCvlKohv3 =0GKZ -----END PGP SIGNATURE-----
>From b8b50abae45f1bf30b83eb6faaa83b75bee9c5b3 Mon Sep 17 00:00:00 2001 From: Eric Blake <ebb9@xxxxxxx> Date: Thu, 16 Oct 2008 07:38:07 -0600 Subject: [PATCH] Improve wording related to automake and autotest. * doc/autoconf.texi (Making testsuite Scripts): Clarify wording in relation to automake. Mention dependency on package.m4. Consolidate examples. * THANKS: Update. Reported by William Pursell. Signed-off-by: Eric Blake <ebb9@xxxxxxx> --- ChangeLog | 9 +++++++++ doc/autoconf.texi | 51 +++++++++++++++++++++++++-------------------------- 2 files changed, 34 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8eef61d..4349ee3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-10-16 Eric Blake <ebb9@xxxxxxx> + + Improve wording related to automake and autotest. + * doc/autoconf.texi (Making testsuite Scripts): Clarify wording in + relation to automake. Mention dependency on package.m4. + Consolidate examples. + * THANKS: Update. + Reported by William Pursell. + 2008-10-16 Paolo Bonzini <bonzini@xxxxxxx> Add a testcase using more then one language. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 43227a6..29437db 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -21319,25 +21319,10 @@ Making testsuite Scripts address to which bug reports should be sent. For sake of completeness, we suggest that you also define @code{AT_PACKAGE_NAME}, @code{AT_PACKAGE_TARNAME}, and @code{AT_PACKAGE_VERSION}. -@xref{Initializing configure}, for a description of these variables. We -suggest the following makefile excerpt: - -@smallexample -# The `:;' works around a Bash 3.2 bug when the output is not writeable. -$(srcdir)/package.m4: $(top_srcdir)/configure.ac - :;@{ \ - echo '# Signature of the current package.' && \ - echo 'm4_define([AT_PACKAGE_NAME], [@@PACKAGE_NAME@@])' && \ - echo 'm4_define([AT_PACKAGE_TARNAME], [@@PACKAGE_TARNAME@@])' && \ - echo 'm4_define([AT_PACKAGE_VERSION], [@@PACKAGE_VERSION@@])' && \ - echo 'm4_define([AT_PACKAGE_STRING], [@@PACKAGE_STRING@@])' && \ - echo 'm4_define([AT_PACKAGE_BUGREPORT], [@@PACKAGE_BUGREPORT@@])'; \ - @} >'$(srcdir)/package.m4' -@end smallexample - -@noindent +@xref{Initializing configure}, for a description of these variables. Be sure to distribute @file{package.m4} and to put it into the source -hierarchy: the test suite ought to be shipped! +hierarchy: the test suite ought to be shipped! See below for an example +@file{Makefile} excerpt. @item Invoke @code{AC_CONFIG_TESTDIR}. @@ -21356,16 +21341,28 @@ Making testsuite Scripts @file{tests/atlocal}. @item -The @file{tests/Makefile.in} should be modified so the validation in +The appropriate @file{Makefile} should be modified so the validation in your package is triggered by @samp{make check}. An example is provided below. @end itemize -With Automake, here is a minimal example about how to link @samp{make -check} with a validation suite. +With Automake, here is a minimal example for inclusion in +@file{tests/Makefile.am}, in order to link @samp{make check} with a +validation suite. @example -EXTRA_DIST = testsuite.at $(TESTSUITE) atlocal.in +# The `:;' works around a Bash 3.2 bug when the output is not writeable. +$(srcdir)/package.m4: $(top_srcdir)/configure.ac + :;@{ \ + echo '# Signature of the current package.' && \ + echo 'm4_define([AT_PACKAGE_NAME], [@@PACKAGE_NAME@@])' && \ + echo 'm4_define([AT_PACKAGE_TARNAME], [@@PACKAGE_TARNAME@@])' && \ + echo 'm4_define([AT_PACKAGE_VERSION], [@@PACKAGE_VERSION@@])' && \ + echo 'm4_define([AT_PACKAGE_STRING], [@@PACKAGE_STRING@@])' && \ + echo 'm4_define([AT_PACKAGE_BUGREPORT], [@@PACKAGE_BUGREPORT@@])'; \ + @} >'$(srcdir)/package.m4' + +EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE) atlocal.in TESTSUITE = $(srcdir)/testsuite check-local: atconfig atlocal $(TESTSUITE) @@ -21385,10 +21382,15 @@ Making testsuite Scripts mv $@@.tmp $@@ @end example +Note that the built testsuite is distributed; this is necessary because +users might not have Autoconf installed, and thus would not be able to +rebuild it. + You might want to list explicitly the dependencies, i.e., the list of the files @file{testsuite.at} includes. -If you don't use Automake, you might need to add lines inspired from the +If you don't use Automake, you should include the above example in +@file{tests/Makefile.in}, along with additional lines inspired from the following: @example @@ -21406,9 +21408,6 @@ Making testsuite Scripts @noindent and manage to have @code{$(EXTRA_DIST)} distributed. -If you use Automake, however, you don't need to add a rule to generate -@file{atlocal}. - With all this in place, and if you have not initialized @samp{TESTSUITEFLAGS} within your makefile, you can fine-tune test suite execution with this variable, for example: -- 1.6.0.2
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf