autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autotest/package.m4 question [PATCH]


From: Eric Blake
Subject: Re: autotest/package.m4 question [PATCH]
Date: Thu, 16 Oct 2008 07:43:15 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080914 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666

-----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             address@hidden
-----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 <address@hidden>
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 <address@hidden>
---
 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  <address@hidden>
+
+       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  <address@hidden>
 
        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}.
address@hidden configure}, for a description of these variables.  We
-suggest the following makefile excerpt:
-
address@hidden
-# 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'
address@hidden smallexample
-
address@hidden
address@hidden 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
address@hidden 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
address@hidden/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
address@hidden/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
address@hidden
-
 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]