]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] cleanup: remove on almost-unused global vars: am_relative_dir
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 30 Jul 2012 19:02:59 +0000 (21:02 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 31 Jul 2012 02:39:17 +0000 (04:39 +0200)
* automake.in ($am_relative_dir): Delete, it was only used once ...
(generate_makefile): ... in here, so it's simpler to inline its
expansion.
(initialize_per_input): Don't reset the deleted variable.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
automake.in

index fed8f6a64935b84a53fbdf21b39343caf647d13e..ceed504133721492c2f91f0b5bbacf36ae2bf700 100644 (file)
@@ -496,9 +496,7 @@ my $am_file = 'BUG';
 ## Variables reset by &initialize_per_input.  ##
 ## ------------------------------------------ ##
 
-# Basename and relative dir of the input file.
-my $am_relative_dir;
-# Same but wrt Makefile.in.
+# Relative dir of the output makefile.
 my $relative_dir;
 
 # Greatest timestamp of the output's dependencies (excluding
@@ -614,7 +612,6 @@ sub initialize_per_input ()
 {
     reset_local_duplicates ();
 
-    $am_relative_dir = undef;
     $relative_dir = undef;
 
     $output_deps_greatest_timestamp = 0;
@@ -6812,7 +6809,6 @@ sub generate_makefile ($$)
   my ($makefile, @inputs) = split (/:/, $output_files{$makefile_in});
 
   $relative_dir = dirname ($makefile);
-  $am_relative_dir = dirname ($makefile_am);
 
   read_main_am_file ($makefile_am, $makefile_in);
   if (handle_options)
@@ -6938,6 +6934,7 @@ sub generate_makefile ($$)
       return;
     }
 
+  my $am_relative_dir = dirname ($makefile_am);
   mkdir ($am_relative_dir, 0755) if ! -d $am_relative_dir;
 
   # We make sure that 'all:' is the first target.