From: Stefano Lattarini Date: Mon, 30 Jul 2012 19:02:59 +0000 (+0200) Subject: cleanup: remove almost-unused global var 'am_relative_dir' X-Git-Tag: v1.12.3~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=133307b9ee9ac87cbfdcb8d093f192c34d3bd1f8;p=thirdparty%2Fautomake.git cleanup: remove almost-unused global var 'am_relative_dir' 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 --- diff --git a/automake.in b/automake.in index 1ae547082..706544275 100644 --- a/automake.in +++ b/automake.in @@ -476,9 +476,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 @@ -629,7 +627,6 @@ sub initialize_per_input () { reset_local_duplicates (); - $am_relative_dir = undef; $relative_dir = undef; $output_deps_greatest_timestamp = 0; @@ -8097,7 +8094,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) @@ -8211,6 +8207,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.