automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: Bug#153698: automake1.6: tries to reprocess makefiles when required


From: Alexandre Duret-Lutz
Subject: FYI: Bug#153698: automake1.6: tries to reprocess makefiles when required files are not found
Date: 23 Jul 2002 20:48:12 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>> "Andrew" == Andrew Suffield <address@hidden> writes:

[...]

 Andrew> After a little playing around, it turns out that having a Makefile.am
 Andrew> in autoconf/ (and the corresponding entry in configure.ac) is the
 Andrew> trigger. 

[...]

Thanks a lot!  I've turned this into the test case below
(tests/required2.test).

This is caused by a bogus patch I applied on 2002-04-19 to fix
tests/required.test.  Reverting this is enough to correct required2.test.
But then I have to fix required.test again, which is easily done
by filling %require_file_found with full filenames instead of basenames.

I'm installing this on HEAD and branch-1-6.

2002-07-23  Alexandre Duret-Lutz  <address@hidden>

        * 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 from 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.

Index: THANKS
===================================================================
RCS file: /cvs/automake/automake/THANKS,v
retrieving revision 1.166.2.14
diff -u -r1.166.2.14 THANKS
--- THANKS      26 Jun 2002 08:16:06 -0000      1.166.2.14
+++ THANKS      23 Jul 2002 18:46:52 -0000
@@ -14,6 +14,7 @@
 Andreas Buening                address@hidden
 Andreas Schwab         address@hidden
 Andrew Cagney          address@hidden
+Andrew Suffield                address@hidden
 Andris Pavenis         address@hidden
 Angus Leeming          address@hidden
 Anthony Green          address@hidden
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1287.2.18
diff -u -r1.1287.2.18 automake.in
--- automake.in 19 Jul 2002 11:05:18 -0000      1.1287.2.18
+++ automake.in 23 Jul 2002 18:47:23 -0000
@@ -472,6 +472,10 @@
 # Options set via AM_INIT_AUTOMAKE.
 my $global_options = '';
 
+# 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 = ();
 
 
 ################################################################
@@ -656,11 +660,6 @@
 # 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
@@ -802,8 +801,6 @@
     # We always include `.'.  This isn't strictly correct.
     %libtool_clean_directories = ('.' => 1);
 
-    %require_file_found = ();
-
     %subobjvar = ();
 }
 
@@ -8162,8 +8159,8 @@
            # 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: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.385.2.16
diff -u -r1.385.2.16 Makefile.am
--- tests/Makefile.am   19 Jul 2002 11:05:19 -0000      1.385.2.16
+++ tests/Makefile.am   23 Jul 2002 18:47:23 -0000
@@ -297,6 +297,7 @@
 remake3.test \
 req.test \
 required.test \
+required2.test \
 rulepat.test \
 scripts.test \
 seenc.test \
Index: tests/required2.test
===================================================================
RCS file: tests/required2.test
diff -N tests/required2.test
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ tests/required2.test        23 Jul 2002 18:47:24 -0000
@@ -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

-- 
Alexandre Duret-Lutz




reply via email to

[Prev in Thread] Current Thread [Next in Thread]