+2008-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix rebuilding of removed subdir/Makefile.in files.
+ * lib/am/configure.am (%MAKEFILE-IN%) [?!TOPDIR_P?]: If
+ subdir/Makefile.in was removed, am--refresh would not update
+ it. Fix up for it by running the per-directory rebuild rule.
+ * tests/remake6.test, tests/remake7.test: New tests.
+ * tests/Makefile.am: Adjust.
+ * NEWS, THANKS: Update.
+ Report and initial patch by Ilya N. Golubev.
+
2008-08-19 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/notrans.test: Use multiple man files of each type.
stub rules. This allows `make' to trigger a rerun of `aclocal'
also if some previously needed macro file has been removed.
+ - Rebuild rules now also work for a removed `subdir/Makefile.in' in
+ an otherwise up to date tree.
+
- The `color-tests' option causes colored test result output on terminals.
- New prefix `notrans_' for manpages which should not be transformed
He Li tippa000@yahoo.com
Henrik Frystyk Nielsen frystyk@w3.org
Ian Lance Taylor ian@cygnus.com
+Ilya N. Golubev gin@mo.msk.ru
Imacat imacat@mail.imacat.idv.tw
Inoue inoue@ainet.or.jp
James Amundson amundson@users.sourceforge.net
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Free Software
+## Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007, 2008 Free Software
## Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
*$$dep*) \
?TOPDIR_P? echo ' cd $(srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS%'; \
?TOPDIR_P? cd $(srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% \
-?!TOPDIR_P? cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+?TOPDIR_P? && exit 0; \
+?!TOPDIR_P? ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+## If on the other hand, subdir/Makefile.in has been removed, then toplevel
+## am--refresh will not be aware of any need to run. We still invoke it
+## due to $? listing all prerequisites. Fix up for it by running the rebuild
+## rule for this file only, below.
+?!TOPDIR_P? && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
remake3.test \
remake4.test \
remake5.test \
+remake6.test \
+remake7.test \
regex.test \
req.test \
reqd.test \
remake3.test \
remake4.test \
remake5.test \
+remake6.test \
+remake7.test \
regex.test \
req.test \
reqd.test \
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2008 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
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure remaking rules work when subdir Makefile.in has been removed.
+
+. ./defs || exit 1
+set -e
+
+cat > configure.in << 'END'
+AC_INIT
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_OUTPUT(Makefile sub/Makefile)
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+END
+mkdir sub
+: > sub/Makefile.am
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+./configure
+$MAKE
+
+# Now, we are set up. Ensure that, for either missing Makefile.in,
+# or updated Makefile.am, rebuild rules are run, and run exactly once
+# only.
+
+rm -f Makefile.in
+$MAKE >stdout
+cat stdout
+test `grep -c " --run " stdout` -eq 1
+
+rm -f sub/Makefile.in
+$MAKE >stdout
+cat stdout
+test `grep -c " --run " stdout` -eq 1
+
+$sleep # Let touched files appear newer.
+
+touch Makefile.am
+$MAKE >stdout
+cat stdout
+test `grep -c " --run " stdout` -eq 1
+
+touch sub/Makefile.am
+$MAKE >stdout
+cat stdout
+test `grep -c " --run " stdout` -eq 1
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2008 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
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure remaking rules fail when they should.
+
+. ./defs || exit 1
+set -e
+
+cat > configure.in << 'END'
+AC_INIT
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_OUTPUT(Makefile sub/Makefile)
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+END
+mkdir sub
+: > sub/Makefile.am
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+./configure
+$MAKE
+
+$sleep
+
+# Fail for broken input files.
+
+echo "if FOO" > sub/Makefile.am
+$MAKE && exit 1
+
+: >sub/Makefile.am
+$MAKE
+
+mv Makefile.am backup
+echo "if FOO" > Makefile.am
+$MAKE && exit 1
+
+# Fail for missing input files, with or without missing
+# Makefile.in files.
+
+cp backup Makefile.am
+mv sub/Makefile.am sub/backup
+$MAKE && exit 1
+
+rm -f sub/Makefile.in
+$MAKE && exit 1
+
+mv sub/backup sub/Makefile.am
+rm -f Makefile.am
+$MAKE && exit 1
+
+rm -f Makefile.in
+$MAKE && exit 1
+: