autoconf-patches
[Top][All Lists]
Advanced

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

Re: calling autoreconf and minimizing rebuilds


From: Ralf Wildenhues
Subject: Re: calling autoreconf and minimizing rebuilds
Date: Mon, 4 Dec 2006 21:15:55 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Continuing:
http://lists.gnu.org/archive/html/autoconf-patches/2006-09/msg00038.html
http://lists.gnu.org/archive/html/autoconf-patches/2006-10/msg00042.html

* Alexandre Duret-Lutz wrote on Sat, Oct 14, 2006 at 04:21:50PM CEST:
> >>> "RW" == Ralf Wildenhues <address@hidden> writes:

>  RW> * tests/trace.test: New test for autom4te preselections.
>  RW> * tests/Makefile.am: Update.
> 
> I'd rather not have this test in Automake.  If we add a new
> trace to Automake today, fixing the test so it doesn't fail with
> old CVS Autoconf is difficult because there is no Autoconf
> version that precisely matches the change.

Good point: the test belongs in the Autoconf testsuite.

> Apart from this 3-year old missing trace, we had no problem
> keeping the lists in sync so far, so it doesn't sounds worth
> making this more complex and keeping 3 things in sync.

When something is broken for three years, because only once somebody
forgot to add a line, and even if it's only caching that was broken,
that is a very good argument to have an automatic check the keeps us
from breaking it again.  Of course it's even better if the test does
not require maintenance.

OK to apply?  Should $sleep rather be defined somewhere globally
(like tests/local.at)?  Do you think we'll need to cater for a 5 second
delay when $build is *-pc-msdosdjgpp (as Automake does)?

Cheers,
Ralf

2006-12-04  Ralf Wildenhues  <address@hidden>

        * tests/tools.at (autom4te preselections): New test, to flag
        entries missing from autom4te.cfg.
        Report by David Byron <address@hidden>.

Index: tests/tools.at
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/tools.at,v
retrieving revision 1.95
diff -u -r1.95 tools.at
--- tests/tools.at      25 Oct 2006 18:31:02 -0000      1.95
+++ tests/tools.at      4 Dec 2006 20:11:59 -0000
@@ -827,3 +827,49 @@
 AT_CHECK_AUTOUPDATE
 
 AT_CLEANUP
+
+
+
+# Keeping autom4te.cfg complete
+# -----------------------------
+
+AT_SETUP([autom4te preselections])
+: ${sleep='sleep 2'}   # Command to force different time stamps
+
+# We use aclocal and automake.
+AT_CHECK([automake --version || exit 77], [], [ignore], [ignore])
+AT_CHECK([test ! -f $HOME/.autom4te.cfg || exit 77], [], [ignore], [ignore])
+
+AT_DATA([configure.in],
+[[AC_INIT(GNU foo, 1.0)
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+]])
+
+AT_DATA([Makefile.am],
+[[AUTOMAKE_OPTIONS = foreign
+]])
+
+$sleep # `aclocal.m4' should be strictly younger than its inputs
+
+# If Autoconf is too old, or the user has turned caching off, skip:
+AT_CHECK([aclocal || { ret=$?; test $ret -eq 63 && ret=77; exit $ret; }],
+         [], [], [ignore])
+AT_CHECK([test -d autom4te.cache || exit 77])
+AT_CHECK([autoconf])
+
+# If this test fails due to missing entries in lib/autom4te.in, then
+# comparing the old and new requests is a good place to start debugging:
+cp autom4te.cache/requests old-requests
+$sleep # need to make sure the stamp file is strictly newer.
+echo newer >newer
+$sleep # if `configure' is regenerated, we want it to be strictly newer,
+       # to catch the error consistently.
+AT_CHECK([aclocal], [], [], [ignore])
+AT_CHECK([automake --no-force --add-missing], [], [], [ignore])
+AT_CHECK([autoconf])
+AT_CHECK([set x `ls -1t newer configure`; test "$2" = newer ||
+         { diff old-requests autom4te.cache/requests; exit 1; }])
+
+AT_CLEANUP




reply via email to

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