automake-patches
[Top][All Lists]
Advanced

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

Re: PR automake/450 not yet fixed


From: Alexandre Duret-Lutz
Subject: Re: PR automake/450 not yet fixed
Date: Thu, 03 Mar 2005 22:00:05 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

>>> "Peter" == Peter Breitenlohner <address@hidden> writes:

 Peter> I have applied the above patch to our installed version of aclocal
 Peter> (from automake-1.9.5), and this certainly solves part of the problem,
 Peter> but unfortunately not all of it.
[...]
 Peter> Changing the test as follows:
[...]
 Peter> demonstrates this.

Thanks!  I'm installing the following on HEAD and branch-1-9.

2005-03-03  Alexandre Duret-Lutz  <address@hidden>

        For PR automake/450:
        * aclocal.in (write_aclocal, trace_used_macros): Do not add/remove
        acinclude.m4 and configure.ac to the include map in these two
        places ...
        (strip_redundant_includes): ... do it here.  This completes the
        previous change from 2005-03-01, that did not update
        write_aclocal.
        * tests/acloca19.test: Augment.
        Report from Peter Breitenlohner.

Index: aclocal.in
===================================================================
RCS file: /cvs/automake/automake/aclocal.in,v
retrieving revision 1.104.2.5
diff -u -r1.104.2.5 aclocal.in
--- aclocal.in  1 Mar 2005 22:17:47 -0000       1.104.2.5
+++ aclocal.in  3 Mar 2005 20:56:55 -0000
@@ -396,6 +396,12 @@
 sub strip_redundant_includes (%)
 {
   my %files = @_;
+
+  # Always include acinclude.m4, even if it does not appear to be used.
+  $files{'acinclude.m4'} = 1 if -f 'acinclude.m4';
+  # File included by $configure_ac are redundant.
+  $files{$configure_ac} = 1;
+
   # Files at the end of @file_order should override those at the beginning,
   # so it is important to preserve these trailing files.  We can remove
   # a file A if it is going to be output before a file B that includes
@@ -411,18 +417,17 @@
            if $verbose;
        }
     }
+
+  # configure.ac is implicitly included.
+  delete $files{$configure_ac};
+
   return %files;
 }
 
 sub trace_used_macros ()
 {
   my %files = map { $map{$_} => 1 } keys %macro_seen;
-  $files{'acinclude.m4'} = 1 if -f 'acinclude.m4';
-  # File included by $configure_ac are redundant.
-  $files{$configure_ac} = 1;
   %files = strip_redundant_includes %files;
-  # configure.ac is implicitly included.
-  delete $files{$configure_ac};
 
   my $traces = ($ENV{AUTOM4TE} || 'autom4te');
   $traces .= " --language Autoconf-without-aclocal-m4 ";
@@ -487,9 +492,7 @@
     {
       $files{$map{$m}} = 1 if $map{$m} eq $map_traced_defs{$m};
     }
-  $files{'acinclude.m4'} = 1 if -f 'acinclude.m4';
   %files = strip_redundant_includes %files;
-  delete $files{$configure_ac};
 
   for $file (grep { exists $files{$_} } @file_order)
     {
Index: tests/acloca19.test
===================================================================
RCS file: /cvs/automake/automake/tests/acloca19.test,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 acloca19.test
--- tests/acloca19.test 1 Mar 2005 22:17:48 -0000       1.1.2.1
+++ tests/acloca19.test 3 Mar 2005 20:56:56 -0000
@@ -29,12 +29,13 @@
 cat >configure.in <<'END'
 AC_INIT([acloca19], [1.0])
 m4_include([aconfig.ac])
+FOO
 AC_OUTPUT
 END
 
 cat >aconfig.ac <<'END'
 AM_INIT_AUTOMAKE
-AC_DEFUN([FOO], [bar])
+AC_DEFUN([FOO], [echo GREPME])
 sinclude([bconfig.ac])
 END
 
@@ -44,7 +45,9 @@
 
 $ACLOCAL
 $AUTOCONF
-./configure
+./configure >stdout
+cat stdout
+grep GREPME stdout
 grep 'aconfig\.ac' aclocal.m4 && exit 1
 grep 'bconfig\.ac' aclocal.m4 && exit 1
 grep with-grepme configure

-- 
Alexandre Duret-Lutz





reply via email to

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