* Alexandre Duret-Lutz wrote on Tue, Jul 17, 2007 at 07:48:18AM CEST: > > I want to make sure that if configure.in is changed to require > bar.m4 instead of foo.m4, and if foo.m4 disappears, Make > successfully rebuilds everything to the point that Makefile > contains a definition for GREPBAR.
Ah, ok, thanks. This is what I have now, and will check in sometime if nobody complains. Cheers, Ralf 2007-07-18 Ralf Wildenhues <[EMAIL PROTECTED]> Alexandre Duret-Lutz <[EMAIL PROTECTED]> * 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. * NEWS: Update. Index: NEWS =================================================================== RCS file: /cvs/automake/automake/NEWS,v retrieving revision 1.329 diff -u -r1.329 NEWS --- NEWS 16 Jul 2007 19:56:24 -0000 1.329 +++ NEWS 17 Jul 2007 22:49:51 -0000 @@ -26,6 +26,10 @@ - install-sh supports -C, which does not update the installed file (and its time stamps) if the contents did not change. + - The "deleted header file problem" for *.m4 files is avoided by + stub rules. This allows `make' to trigger a rerun of `aclocal' + also if some previously needed macro file has been removed. + Bugs fixed in 1.10a: * Long standing bugs: Index: lib/am/configure.am =================================================================== RCS file: /cvs/automake/automake/lib/am/configure.am,v retrieving revision 1.33 diff -u -r1.33 configure.am --- lib/am/configure.am 7 Jul 2007 11:23:28 -0000 1.33 +++ lib/am/configure.am 17 Jul 2007 22:49:51 -0000 @@ -1,5 +1,6 @@ ## automake - create Makefile.in from Makefile.am -## Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. +## Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Free Software +## Foundation, Inc. ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -117,6 +118,9 @@ $(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 + +## Avoid the "deleted header file" problem for the dependencies. +$(am__aclocal_m4_deps): endif %?REGEN-ACLOCAL-M4% Index: tests/Makefile.am =================================================================== RCS file: /cvs/automake/automake/tests/Makefile.am,v retrieving revision 1.621 diff -u -r1.621 Makefile.am --- tests/Makefile.am 29 Mar 2007 23:26:48 -0000 1.621 +++ tests/Makefile.am 17 Jul 2007 22:49:51 -0000 @@ -24,6 +24,7 @@ acloca19.test \ acloca20.test \ acloca21.test \ +acloca22.test \ acoutnoq.test \ acoutpt.test \ acoutpt2.test \ --- /dev/null 2007-06-27 15:55:00.220064750 +0200 +++ tests/acloca22.test 2007-07-18 00:49:33.000000000 +0200 @@ -0,0 +1,53 @@ +#! /bin/sh +# Copyright (C) 2007 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], [AC_SUBST([GREPFOO])]) +EOF +cat >bar.m4 <<EOF +AC_DEFUN([BAR], [AC_SUBST([GREPBAR])]) +EOF +cat >Makefile.am <<EOF +ACLOCAL_AMFLAGS = -I . +EOF +$ACLOCAL -I . +$AUTOMAKE +$AUTOCONF +./configure +$MAKE +grep GREPFOO Makefile +grep GREPBAR Makefile && exit 1 +sed 's/FOO/BAR/' < configure.in > t +mv -f t configure.in +rm -f foo.m4 +$MAKE +grep GREPFOO Makefile && exit 1 +grep GREPBAR Makefile