]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Cleanup of per-input global variables in automake.in.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 22 Oct 2008 19:31:46 +0000 (21:31 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 22 Oct 2008 19:31:46 +0000 (21:31 +0200)
* 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'.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
automake.in

index 3a7967dccabaedbd316dc5b7024831ba8d25d5f2..44390c1bf697e1e50e7fa66b87057f4a97cab243 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 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.
index 591b451dfebb4a9db3325f75de463284c9ea9fe1..fea09067aacb33bd235063f1f112ef26e6d40e63 100755 (executable)
@@ -479,13 +479,13 @@ my $topsrcdir;
 # 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.
@@ -552,9 +552,6 @@ my %known_programs;
 # 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;
@@ -584,6 +581,13 @@ my $get_object_extension_was_run;
 
 # 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
@@ -625,19 +629,20 @@ sub initialize_per_input ()
 {
     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;
@@ -652,6 +657,10 @@ sub initialize_per_input ()
     @check_tests = ();
 
     %clean_files = ();
+    %compile_clean_files = ();
+
+    # We always include `.'.  This isn't strictly correct.
+    %libtool_clean_directories = ('.' => 1);
 
     @sources = ();
     @dist_sources = ();
@@ -669,8 +678,6 @@ sub initialize_per_input ()
 
     %de_ansi_files = ();
 
-    $all_target = '';
-
     %extension_seen = ();
 
     %language_scratch = ();
@@ -683,11 +690,6 @@ sub initialize_per_input ()
 
     $get_object_extension_was_run = 0;
 
-    %compile_clean_files = ();
-
-    # We always include `.'.  This isn't strictly correct.
-    %libtool_clean_directories = ('.' => 1);
-
     %transformed_files = ();
 }