* tests/Makefile.am (TESTS): Add required2.test.
* automake.in (initialize_per_input): Remove %require_file_found
setting. This reverts my change of 2002-04-19.
(require_file_internal): Use the full name of a file as a
key in %require_file_found, not only the basename.
Reported by Andrew Suffield.
+2002-07-23 Alexandre Duret-Lutz <duret_g@epita.fr>
+
+ * tests/required2.test: New file.
+ * tests/Makefile.am (TESTS): Add required2.test.
+ * automake.in (initialize_per_input): Remove %require_file_found
+ setting. This reverts my change of 2002-04-19.
+ (require_file_internal): Use the full name of a file as a
+ key in %require_file_found, not only the basename.
+ Reported by Andrew Suffield.
+
2002-07-22 Alexandre Duret-Lutz <duret_g@epita.fr>
* automake.in (handle_subdirs): Warn if `obj' appears in SUBDIRS.
Andreas Buening andreas.buening@nexgo.de
Andreas Schwab schwab@suse.de
Andrew Cagney cagney@tpgi.com.au
+Andrew Suffield asuffield@debian.org
Andris Pavenis pavenis@lanet.lv
Angus Leeming a.leeming@ic.ac.uk
Anthony Green green@cygnus.com
# Same as $suffix_rules (declared below), but records only the
# default rules supplied by the languages Automake supports.
my $suffix_rules_default;
+
+# If a file name appears as a key in this hash, then it has already
+# been checked for. This variable is local to the "require file"
+# functions.
+my %require_file_found = ();
\f
################################################################
# force.
my @substtos;
-# If a file name appears as a key in this hash, then it has already
-# been checked for. This variable is local to the "require file"
-# functions.
-my %require_file_found = ();
-
# This keeps track of all variables defined by subobjname.
# The value stored is the variable names.
# The key has the form "(COND1)VAL1(COND2)VAL2..." where VAL1 and VAL2
# We always include `.'. This isn't strictly correct.
%libtool_clean_directories = ('.' => 1);
- %require_file_found = ();
-
%subobjvar = ();
%appendvar = ();
# DIST_COMMON.
if (! $found_it)
{
- next if defined $require_file_found{$file};
- $require_file_found{$file} = 1;
+ next if defined $require_file_found{$fullfile};
+ $require_file_found{$fullfile} = 1;
}
if ($strictness >= $mystrict)
remake3.test \
req.test \
required.test \
+required2.test \
rulepat.test \
scripts.test \
seenc.test \
remake3.test \
req.test \
required.test \
+required2.test \
rulepat.test \
scripts.test \
seenc.test \
--- /dev/null
+#! /bin/sh
+
+# Regression test for a bug reported by Andrew Suffield.
+# (Automake goes wild and try to rerun itself more than two time
+# to fix the Makefiles.)
+
+required='libtoolize'
+. $srcdir/defs || exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_CONFIG_AUX_DIR([autoconf])
+AC_PROG_CC
+AM_PROG_LIBTOOL
+AC_CONFIG_FILES([autoconf/Makefile main/Makefile])
+AC_OUTPUT
+END
+
+mkdir autoconf
+mkdir main
+
+: > autoconf/Makefile.am
+echo 'SUBDIRS = autoconf main' >Makefile.am
+
+cat >main/Makefile.am <<'END'
+lib_LTLIBRARIES = lib0.la
+lib0_la_SOURCES = 0.c
+END
+
+libtoolize --force --copy
+$ACLOCAL
+$AUTOCONF
+
+test -f autoconf/ltmain.sh # Sanity check.
+rm -f autoconf/ltmain.sh
+$AUTOMAKE --add-missing --copy 2>stderr
+cat stderr
+grep 'running more than two' stderr && exit 1
+
+# Since we are ensuring that 'running more than two' is not printed,
+# also ensure that it can be printed. This way if someone changes the
+# wording of this message (s)he will remember to adjust this test.
+grep 'running more than two' ../../automake