automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FYI] {maint} cleanup: remove almost-unused global var 'am_relative_dir'


From: Stefano Lattarini
Subject: [FYI] {maint} cleanup: remove almost-unused global var 'am_relative_dir'
Date: Fri, 10 Aug 2012 14:07:49 +0200

Cherry picked from commit v1.12.2-741-g53b5d11 of Automake-NG.

* 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 <address@hidden>
---
 automake.in | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/automake.in b/automake.in
index faa2d29..e3c3d1f 100644
--- a/automake.in
+++ b/automake.in
@@ -481,9 +481,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
@@ -634,7 +632,6 @@ sub initialize_per_input ()
 {
     reset_local_duplicates ();
 
-    $am_relative_dir = undef;
     $relative_dir = undef;
 
     $output_deps_greatest_timestamp = 0;
@@ -7892,7 +7889,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)
@@ -8006,6 +8002,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.
-- 
1.7.12.rc0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]