* lib/Automake/FileUtils.pm (set_dir_cache_file): New function.
* automake.in (require_file_internal): Instead of resetting the
cache when a file has been installed, simply correct the cache
using set_dir_cache_file.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-10-26 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Minor file checking optimization: set_dir_cache_file.
+ * lib/Automake/FileUtils.pm (set_dir_cache_file): New function.
+ * automake.in (require_file_internal): Instead of resetting the
+ cache when a file has been installed, simply correct the cache
+ using set_dir_cache_file.
+
No uniquifying for fatal, prog_error, and verbose messages.
There is no point in dropping critical messages, even if they
are duplicates (unlikely to happen unless they have been sent
$suppress = 0;
$trailer = "\n error while copying";
}
- reset_dir_cache ($dir);
+ set_dir_cache_file ($dir, $file);
}
if (! maybe_push_required_file (dirname ($fullfile),
@EXPORT = qw (&open_quote &contents
&find_file &mtime
&update_file &up_to_date_p
- &xsystem &xsystem_hint &xqx &dir_has_case_matching_file &reset_dir_cache);
+ &xsystem &xsystem_hint &xqx
+ &dir_has_case_matching_file &reset_dir_cache
+ &set_dir_cache_file);
=item C<open_quote ($file_name)>
delete $_directory_cache{$_[0]};
}
+=item C<set_dir_cache_file ($dirname, $file_name)>
+
+State that C<$dirname> contains C<$file_name> now.
+
+=cut
+
+sub set_dir_cache_file ($$)
+{
+ my ($dirname, $file_name) = @_;
+ $_directory_cache{$dirname}{$file_name} = 1
+ if exists $_directory_cache{$dirname};
+}
+
1; # for require
### Setup "GNU" style for perl-mode and cperl-mode.