diff options
author | Alexandre Duret-Lutz <adl@gnu.org> | 2005-03-03 21:00:20 +0000 |
---|---|---|
committer | Alexandre Duret-Lutz <adl@gnu.org> | 2005-03-03 21:00:20 +0000 |
commit | e5065e333b22060432deb2f8dccf1b87351709d2 (patch) | |
tree | 4dcc179cab093c84172f1696cd43a0b88cf63006 /aclocal.in | |
parent | f9d0a8378213943e13eaadd0ad5d3117a4c9ead5 (diff) | |
download | automake-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.
Diffstat (limited to 'aclocal.in')
-rw-r--r-- | aclocal.in | 19 |
1 files changed, 10 insertions, 9 deletions
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; |