automake-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] {maint} distcheck: add support for AM_DISTCHECK_CONFIGURE_FL


From: Stefano Lattarini
Subject: Re: [PATCH] {maint} distcheck: add support for AM_DISTCHECK_CONFIGURE_FLAGS
Date: Sat, 18 Jun 2011 11:23:58 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

On Wednesday 15 June 2011, Eric Blake wrote:
> On 06/15/2011 11:16 AM, Stefano Lattarini wrote:
> > Hi Eric.
> >> As for a valid use of AM_DISTCHECK_CONFIGURE_FLAGS, the m4 package
> >> normally configures --without-changeword, but it is useful to have 'make
> >> distcheck' exercise the --with-changeword option to ensure that the code
> >> still compiles for those few people that want to enable the experimental
> >> configure option.  m4 also uses it to stress-test --program-prefix=g
> >> (since at one point m4 had a problem where 'make installcheck' was
> >> assuming it could blindly test "m4" rather than the just-installed "gm4"
> >> when that renaming option was in effect - see m4.git commit fb04a26fa).
> >> I've previously been using DISTCHECK_CONFIGURE_FLAGS for that purpose,
> >> but like the idea of AM_DISTCHECK_CONFIGURE_FLAGS better.
> >>
> > Thank you very much for this real-world example!  Right now I'm in the
> > middle of trying to write decent documentation fo the new "custom test
> > divers" feature of Automake parallel-tests, but once I've finished that
> > I'd like to incorporate your example in my patch.  Or, if you want and
> > have time, feel free to write a patch on the top of mine, substituting
> > your real-world example to my artificial.
> > 
> > In any case, it would be nice to refer to the exact m4 version that
> > exhibits the the behaviour you've described.  So, what is that version?
> 
> Digging through git history of released versions of m4:
> 
> It looks like m4 1.4.10 and earlier flat out failed 'make installcheck'
> if configure had used --program-prefix=g.  m4 1.4.11 tried to fix this
> (commit f63f456), but it took commit 4cfbc09 (the
> DISTCHECK_CONFIGURE_FLAGS --program-prefix=g backport) to detect one
> more issue, fixed in commit fc6be71, for the end result that m4 1.4.12
> was the first release where 'make installcheck' should reliably work
> regardless of transformed program names.
> 
> http://lists.gnu.org/archive/html/m4-patches/2008-03/msg00012.html
> documents where I learned about the bug, based on an earlier libtool bug
> found by Ralf.
> 
> 
Here is the amended patch.  Note that in the end I haven't made use of
the version information I've asked Eric previously, since adding it would
have broken the flow of discourse IMHO.

I'll push by tomorrow evening if there is no objection.

Regards,
  Stefano
From 474aad06941498f4c4363b6023eb2f0045b73397 Mon Sep 17 00:00:00 2001
Message-Id: <address@hidden>
From: Stefano Lattarini <address@hidden>
Date: Wed, 15 Jun 2011 10:50:03 +0200
Subject: [PATCH] docs: AM_DISTCHECK_CONFIGURE_FLAGS is for corner cases

* doc/automake.texi (Checking the Distribution): Explain that the
developers should take care of making their code buildable without
requiring any special configure options, so that in general
AM_DISTCHECK_CONFIGURE_FLAGS shouldn't be used.  Give an example
of where its use is legitimate.
---
 ChangeLog         |   10 ++++++++++
 doc/automake.texi |   15 +++++++++++++++
 2 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f18647a..9fabd7d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2011-06-18  Stefano Lattarini  <address@hidden>
+
+       docs: AM_DISTCHECK_CONFIGURE_FLAGS is for corner cases
+       * doc/automake.texi (Checking the Distribution): Explain that the
+       developers should take care of making their code buildable without
+       requiring any special configure options, so that in general
+       AM_DISTCHECK_CONFIGURE_FLAGS shouldn't be used.  Give an example
+       of where its use is legitimate.
+       Suggestions from Ralf Wildenhues and Eric Blake.
+
 2011-06-13  Stefano Lattarini  <address@hidden>
 
        news: update w.r.t. introduction of AM_DISTCHECK_CONFIGURE_FLAGS
diff --git a/doc/automake.texi b/doc/automake.texi
index b3aecfc..14c2867 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -8426,6 +8426,21 @@ to supply additional flags to @command{configure}, 
define them in the
 provided there by defining the @code{DISTCHECK_CONFIGURE_FLAGS} variable,
 on the command line when invoking @command{make}.
 
+Still, developers are encouraged to strive to make their code buildable
+without requiring any special configure option; thus, in general, you
+shouldn't define @code{AM_DISTCHECK_CONFIGURE_FLAGS}. However, there
+might be few scenarios in which the use of this variable is justified.
+GNU @command{m4} offers an example.  GNU @command{m4} configures by
+default with its experimental and seldom used "changeword" feature
+disabled; so in its case it is useful to have @command{make distcheck}
+run configure with the @option{--with-changeword} option, to ensure that
+the code for changeword support still compiles correctly.
+GNU @command{m4} also employs the @code{AM_DISTCHECK_CONFIGURE_FLAGS}
+variable to stress-test the use of @option{--program-prefix=g}, since at
+one point the @command{m4} build system had a bug where @command{make
+installcheck} was wrongly assuming it could blindly test "@command{m4}",
+rather than the just-installed "@command{gm4}".
+
 @trindex distcheck-hook
 If the @code{distcheck-hook} rule is defined in your top-level
 @file{Makefile.am}, then it will be invoked by @code{distcheck} after
-- 
1.7.2.3


reply via email to

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