From d1d1cd7a762a87ab5e8d99734e7e804b84a88739 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 10 Oct 2010 08:57:56 -0600 Subject: [PATCH] mktables: complement variable name for rebuilding This is an intermediate patch that changes the variable name as to whether the files need rebuilding or not to something I understand better. This has long been confusing, as up until a year ago, there had been a long-standing bug in the program that didn't get it right. --- lib/unicore/mktables | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/unicore/mktables b/lib/unicore/mktables index b03c935..41c96c5 100644 --- a/lib/unicore/mktables +++ b/lib/unicore/mktables @@ -13978,16 +13978,16 @@ foreach my $in (@input_files) { } } -my $ok = ! $write_unchanged_files - && scalar @mktables_list_output_files; # If none known, rebuild +my $rebuild = ! (! $write_unchanged_files + && scalar @mktables_list_output_files); # If none known, rebuild # Now we check to see if any output files are older than youngest, if # they are, we need to continue on, otherwise we can presumably bail. -if ($ok) { +if (! $rebuild) { foreach my $out (@mktables_list_output_files) { if ( ! file_exists($out)) { print "'$out' is missing.\n" if $verbosity >= $VERBOSE; - $ok = 0; + $rebuild = 1; last; } #local $to_trace = 1 if main::DEBUG; @@ -13995,12 +13995,12 @@ if ($ok) { if ( -M $out > $youngest ) { #trace "$out: age: ", -M $out, ", youngest: $youngest\n" if main::DEBUG && $to_trace; print "'$out' is too old.\n" if $verbosity >= $VERBOSE; - $ok = 0; + $rebuild = 1; last; } } } -if ($ok) { +if (! $rebuild) { print "Files seem to be ok, not bothering to rebuild. Add '-w' option to force build\n"; exit(0); } -- 1.8.3.1