The "deleted header file" problem that was solved for object file dependency generation a long time ago also affects aclocal.m4 generation. For a long time, this wasn't a problem, since the list of local *.m4 files in a project was rather stable. The dynamics of gnulib changed this, and by gnulib's popularity, | make: *** No rule to make target `../foo/m4/foobar.m4', needed by `../foo/Makefile.in'. Stop.
followed by an explicit ./config.status --recheck && ./config.status && make has become somewhat more common. The patch below takes a very simple-minded approach at a fix. Do you think that is too broad? If we can find a better criterion, maybe we can factor $(am__configure_deps) based on that? Or do you think this is anyway too dangerous? Cheers, Ralf * lib/am/configure.am (%?REGEN-ACLOCAL-M4%): New target $(am__aclocal_m4_deps) without any dependencies, to avoid the "deleted .m4 file" problem. * tests/acloca22.test: New test. * tests/Makefile.am: Update. Index: lib/am/configure.am =================================================================== RCS file: /cvs/automake/automake/lib/am/configure.am,v retrieving revision 1.31 diff -u -r1.31 configure.am --- lib/am/configure.am 14 May 2005 20:28:52 -0000 1.31 +++ lib/am/configure.am 17 Sep 2006 18:10:56 -0000 @@ -113,7 +113,10 @@ ## aclocal.m4 too. Changing configure.ac, or any file included by ## aclocal.m4 might require adding more files to aclocal.m4. Hence ## the $(am__configure_deps) dependency. +## +## Avoid the "deleted header file" problem for the dependencies. if %?REGEN-ACLOCAL-M4% +$(am__aclocal_m4_deps): $(ACLOCAL_M4): %MAINTAINER-MODE% $(am__aclocal_m4_deps) ?TOPDIR_P? cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) ?!TOPDIR_P? cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 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 17 Sep 2006 18:10:57 -0000 @@ -24,6 +24,7 @@ acloca19.test \ acloca20.test \ acloca21.test \ +acloca22.test \ acoutnoq.test \ acoutpt.test \ acoutpt2.test \ --- /dev/null 2006-09-17 19:23:11.320383500 +0200 +++ tests/acloca22.test 2006-09-17 19:59:41.000000000 +0200 @@ -0,0 +1,44 @@ +#! /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. + +# Make sure the "deleted header file" issue is fixed wrt. aclocal.m4 +# dependencies. + +. ./defs || exit 1 + +set -e + +cat >>configure.in <<EOF +FOO +AC_OUTPUT +EOF +cat >foo.m4 <<EOF +AC_DEFUN([FOO], [:]) +EOF +: >Makefile.am +$ACLOCAL -I . +$AUTOMAKE +$AUTOCONF +./configure +$MAKE +sed '/FOO/d' < configure.in > t +mv -f t configure.in +rm -f foo.m4 +$MAKE