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: Fri, 8 Sep 2006 07:16:06 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

* Paul Eggert wrote on Thu, Sep 07, 2006 at 07:52:11PM CEST:
> Ralf Wildenhues <address@hidden> writes:
> 
> > Definitely there should be a test for the bug.  How about the one below?
> 
> Looks good to me; please install.  Thanks.

Thanks for the review.  However, with Stepan's proposed additional patch
http://lists.gnu.org/archive/html/autoconf-patches/2006-09/msg00023.html
I can't get the test to fail reliably any more: it only fails about half
the time, even if I throw most preselections out of the Automake part in
autom4te.cfg.

So there is still something going on that we (at least I) don't
understand right.  I haven't applied the patch yet.

I've made the test a bit more cautious, see below; I don't think
bug-automake should get bug reports because users don't use
Autoconf-2.60b or newer for their tests (but OTOH I don't think Automake
should bump its global Autoconf requirements just for this caching bug
either).

Cheers,
Ralf


        * tests/trace.test: New test for autom4te preselections.
        * tests/Makefile.am: Update.
        * configure.ac: Preserve original values of `$AUTORECONF'
        and `$AUTOHEADER', to avoid the `missing' script.
        * tests/defs.in: Adjust.
        Report against Autoconf by David Byron <address@hidden>.

Index: configure.ac
===================================================================
RCS file: /cvs/automake/automake/configure.ac,v
retrieving revision 1.32
diff -u -r1.32 configure.ac
--- configure.ac        20 Aug 2006 16:58:19 -0000      1.32
+++ configure.ac        8 Sep 2006 04:32:40 -0000
@@ -30,7 +30,10 @@
 # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it; this
 # way we can run Autoconf tests from configure (or from the test
 # suite) without being bothered by `missing'.
+# Likewise for AUTOHEADER and AUTORECONF.
 AC_SUBST([am_AUTOCONF], ["${AUTOCONF-autoconf}"])
+AC_SUBST([am_AUTOHEADER], ["${AUTOHEADER-autoheader}"])
+AC_SUBST([am_AUTORECONF], ["${AUTORECONF-autoreconf}"])
 
 AM_INIT_AUTOMAKE([1.8a dist-bzip2 filename-length-max=99])
 
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.609
diff -u -r1.609 Makefile.am
--- tests/Makefile.am   30 Aug 2006 20:35:56 -0000      1.609
+++ tests/Makefile.am   8 Sep 2006 04:32:41 -0000
@@ -542,6 +544,7 @@
 tar3.test \
 target-cflags.test \
 targetclash.test \
+trace.test \
 txinfo.test \
 txinfo2.test \
 txinfo3.test \
Index: tests/defs.in
===================================================================
RCS file: /cvs/automake/automake/tests/defs.in,v
retrieving revision 1.39
diff -u -r1.39 defs.in
--- tests/defs.in       6 Jul 2006 18:13:01 -0000       1.39
+++ tests/defs.in       8 Sep 2006 04:32:41 -0000
@@ -73,7 +73,8 @@
 test -z "$PERL" && PERL='@PERL@'
 test -z "$MAKE" && MAKE=make
 test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
-test -z "$AUTOHEADER" && AUTOHEADER="@AUTOHEADER@"
+test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
+test -z "$AUTORECONF" && AUTORECONF="@am_AUTORECONF@"
 test -z "$AUTOUPDATE" && AUTOUPDATE=autoupdate
 test -z "$MISSING" && MISSING=`pwd`/../lib/missing
 # Use -Werror because this also turns some Perl warnings into error.
--- /dev/null   2006-09-05 22:40:33.520458500 +0200
+++ tests/trace.test    2006-09-08 07:03:38.000000000 +0200
@@ -0,0 +1,56 @@
+#! /bin/sh
+# Copyright (C) 2006  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Ensure that the macros traced by automake are listed in autom4te.cfg.
+# If all of them are listed, and autom4te caching works as intended,
+# then configure should not be regenerated.
+
+. ./defs || exit 1
+
+set -e
+
+# If `--force' is used, or the user has a local config, skip:
+for arg in $AUTOCONF $AUTOHEADER $AUTORECONF
+do
+  case $arg in
+  --force | -f* | -[!-]*f*) exit 77;;
+  esac
+done
+test -f $HOME/.autom4te.cfg && exit 77
+
+cat >> configure.in <<EOF
+AC_PREREQ(2.60b) dnl Fixed autom4te.cfg should be in this version.
+EOF
+cat >Makefile.am <<EOF
+AUTOMAKE_OPTIONS = foreign
+EOF
+
+# If Autoconf is too old, or the user has turned caching off, skip:
+if $AUTORECONF; then :; else
+  if test $? -eq 63 || test ! -d autom4te.cache; then
+    exit 77
+  fi
+fi
+$sleep
+echo newer >newer
+$sleep
+$AUTORECONF
+set x `ls -t newer configure`
+test "$2" = newer




reply via email to

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