[Top][All Lists]

[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)


* 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/ 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/  Do you think we'll need to cater for a 5 second
delay when $build is *-pc-msdosdjgpp (as Automake does)?


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

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

Index: tests/
RCS file: /cvsroot/autoconf/autoconf/tests/,v
retrieving revision 1.95
diff -u -r1.95
--- tests/      25 Oct 2006 18:31:02 -0000      1.95
+++ tests/      4 Dec 2006 20:11:59 -0000
@@ -827,3 +827,49 @@
+# 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])
+[[AC_INIT(GNU foo, 1.0)
+$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])
+# If this test fails due to missing entries in lib/, 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([set x `ls -1t newer configure`; test "$2" = newer ||
+         { diff old-requests autom4te.cache/requests; exit 1; }])

reply via email to

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