diff options
author | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2008-08-22 13:19:04 +0200 |
---|---|---|
committer | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2008-08-22 14:54:20 +0200 |
commit | 7456aefd1d03be416197986600242e994bd34546 (patch) | |
tree | 03e414fbe100d769ce60e6b5f761fd5145fd2f31 /tests/remake7.test | |
parent | f9cee424996297f6936af2f0ba6002ecfb2821d6 (diff) | |
download | automake-7456aefd1d03be416197986600242e994bd34546.tar.gz |
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/remake6.test: New tests.
* tests/Makefile.am: Adjust.
* NEWS, THANKS: Update.
Report and initial patch by Ilya N. Golubev.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Diffstat (limited to 'tests/remake7.test')
-rwxr-xr-x | tests/remake7.test | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/tests/remake7.test b/tests/remake7.test new file mode 100755 index 000000000..720728560 --- /dev/null +++ b/tests/remake7.test @@ -0,0 +1,70 @@ +#! /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 +: |