summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Duret-Lutz <adl@gnu.org>2005-03-03 21:00:20 +0000
committerAlexandre Duret-Lutz <adl@gnu.org>2005-03-03 21:00:20 +0000
commite5065e333b22060432deb2f8dccf1b87351709d2 (patch)
tree4dcc179cab093c84172f1696cd43a0b88cf63006
parentf9d0a8378213943e13eaadd0ad5d3117a4c9ead5 (diff)
downloadautomake-e5065e333b22060432deb2f8dccf1b87351709d2.tar.gz
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.
-rw-r--r--ChangeLog14
-rw-r--r--aclocal.in19
-rwxr-xr-xtests/acloca19.test7
3 files changed, 28 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 7c82e5f5d..a9b273c4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-03-03 Alexandre Duret-Lutz <adl@gnu.org>
+
+ 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.
+
2005-03-02 Alexandre Duret-Lutz <adl@gnu.org>
* tests/comment9.test: Typo.
@@ -9,7 +21,7 @@
* tests/Makefile.am (TESTS): Add comment9.test.
Report from Julien Sopena.
- Fix for PR automake/450:
+ For PR automake/450:
* aclocal.in (trace_used_macros): Do not explicitly trace files
included by configure.ac.
* tests/acloca19.test: New file.
diff --git a/aclocal.in b/aclocal.in
index 5792a09d8..427185e39 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -568,6 +568,12 @@ sub scan_file ($$$)
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
@@ -582,18 +588,17 @@ sub strip_redundant_includes (%)
verb "$ifile is already included by $file";
}
}
+
+ # 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 ";
@@ -665,12 +670,8 @@ sub write_aclocal ($@)
if (exists $map_traced_defs{$m}
&& $map{$m} eq $map_traced_defs{$m});
}
- # Always include acinclude.m4, even if it does not appear to be used.
- $files{'acinclude.m4'} = 1 if -f 'acinclude.m4';
# Do not explicitly include a file that is already indirectly included.
%files = strip_redundant_includes %files;
- # Never include configure.ac :)
- delete $files{$configure_ac};
my $installed = 0;
diff --git a/tests/acloca19.test b/tests/acloca19.test
index be8fd7a59..509383f84 100755
--- a/tests/acloca19.test
+++ b/tests/acloca19.test
@@ -29,12 +29,13 @@ set -e
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 @@ END
$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