2008-10-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Cleanup of per-input global variables in automake.in.
+ * automake.in ($output_vars, $output_all, $output_header)
+ ($output_rules, $output_trailer): Fix comment, and sort
+ declarations in the order they will appear in the output.
+ ($all_target): Unused variable, remove.
+ (Variables not reset by &initialize_per_input.): New section,
+ clarify that %am_file_cache is not reset.
+ (initialize_per_input): Reset $am_file_name, $am_relative_dir,
+ $in_file_name, $relative_dir, and $topsrcdir to `undef' rather
+ than the empty string; $topsrcdir was not reset at all. Sort
+ remaining variables in the same order as in the section
+ `Variables reset by &initialize_per_input'.
+
Let stderr output end up on fd 2 in testsuite.
* tests/defs.in (AUTOMAKE_run): Output recorded stderr on file
descriptor 2.
# configure's dependencies).
my $output_deps_greatest_timestamp;
-# These two variables are used when generating each Makefile.in.
+# These variables are used when generating each Makefile.in.
# They hold the Makefile.in until it is ready to be printed.
-my $output_rules;
my $output_vars;
-my $output_trailer;
my $output_all;
my $output_header;
+my $output_rules;
+my $output_trailer;
# This is the conditional stack, updated on if/else/endif, and
# used to build Condition objects.
# trailing `/'.
my %de_ansi_files;
-# This is the name of the redirect `all' target to use.
-my $all_target;
-
# This keeps track of which extensions we've seen (that we care
# about).
my %extension_seen;
# Record each file processed by make_paragraphs.
my %transformed_files;
+\f
+
+################################################################
+
+## ---------------------------------------------- ##
+## Variables not reset by &initialize_per_input. ##
+## ---------------------------------------------- ##
# Cache each file processed by make_paragraphs.
# (This is different from %transformed_files because
{
reset_local_duplicates ();
- $am_file_name = '';
- $am_relative_dir = '';
+ $am_file_name = undef;
+ $am_relative_dir = undef;
- $in_file_name = '';
- $relative_dir = '';
+ $in_file_name = undef;
+ $relative_dir = undef;
+ $topsrcdir = undef;
$output_deps_greatest_timestamp = 0;
- $output_rules = '';
$output_vars = '';
- $output_trailer = '';
$output_all = '';
$output_header = '';
+ $output_rules = '';
+ $output_trailer = '';
Automake::Options::reset;
Automake::Variable::reset;
@check_tests = ();
%clean_files = ();
+ %compile_clean_files = ();
+
+ # We always include `.'. This isn't strictly correct.
+ %libtool_clean_directories = ('.' => 1);
@sources = ();
@dist_sources = ();
%de_ansi_files = ();
- $all_target = '';
-
%extension_seen = ();
%language_scratch = ();
$get_object_extension_was_run = 0;
- %compile_clean_files = ();
-
- # We always include `.'. This isn't strictly correct.
- %libtool_clean_directories = ('.' => 1);
-
%transformed_files = ();
}