]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* tests/required2.test: New file.
authorAlexandre Duret-Lutz <adl@gnu.org>
Tue, 23 Jul 2002 18:58:07 +0000 (18:58 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Tue, 23 Jul 2002 18:58:07 +0000 (18:58 +0000)
* 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.

ChangeLog
THANKS
automake.in
tests/Makefile.am
tests/Makefile.in
tests/required2.test [new file with mode: 0755]

index 0fd6cddedb103ce2ceb2d0e167d098ddf2be61fd..bbf4b43596c4b49540f7d8f09879bdcba5f39169 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+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.
diff --git a/THANKS b/THANKS
index 83a70194a305e2d6a5513157d4925431fdc546a6..094ccd6e22defe4847434238a11c791df031bcd0 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -14,6 +14,7 @@ Alexey Mahotkin               alexm@hsys.msk.ru
 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
index 2fee6e38ec21341ce1ca2dc5e38029edaa0a3d9e..b771965ceffd045c5a1d8c0a7af08096c28df934 100755 (executable)
@@ -460,6 +460,11 @@ my $global_options = '';
 # 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
 
 ################################################################
@@ -665,11 +670,6 @@ my @substfroms;
 # 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
@@ -833,8 +833,6 @@ sub initialize_per_input ()
     # We always include `.'.  This isn't strictly correct.
     %libtool_clean_directories = ('.' => 1);
 
-    %require_file_found = ();
-
     %subobjvar = ();
 
     %appendvar = ();
@@ -8348,8 +8346,8 @@ sub require_file_internal ($$@)
            # 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)
index 61b246622db65cad72cafec3817f21f1f799e288..90be8805ff13fc640ef9c09ee02de1f3e310ff92 100644 (file)
@@ -309,6 +309,7 @@ remake2.test \
 remake3.test \
 req.test \
 required.test \
+required2.test \
 rulepat.test \
 scripts.test \
 seenc.test \
index 3d6abff4ebd97e88838292106ad3783a76514aaf..b593d0d4bc237fd27899e5293272e69f3bf79733 100644 (file)
@@ -397,6 +397,7 @@ remake2.test \
 remake3.test \
 req.test \
 required.test \
+required2.test \
 rulepat.test \
 scripts.test \
 seenc.test \
diff --git a/tests/required2.test b/tests/required2.test
new file mode 100755 (executable)
index 0000000..6493681
--- /dev/null
@@ -0,0 +1,44 @@
+#! /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