my $verbosity = $NORMAL_VERBOSITY;
+# Stored in mktables.lst so that if this program is called with different
+# options, will regenerate even if the files otherwise look like they're
+# up-to-date.
+my $command_line_arguments = join " ", @ARGV;
+
# Process arguments
while (@ARGV) {
my $arg = shift @ARGV;
my @mktables_list_output_files;
my $old_start_time = 0;
+my $old_options = "";
if (! -e $file_list) {
print "'$file_list' doesn't exist, so forcing rebuild.\n" if $verbosity >= $VERBOSE;
$old_start_time = $1;
next;
}
+ if (/^ \s* \# \s* From\ options\ (.+) /x) {
+ $old_options = $1;
+ next;
+ }
next if /^ \s* (?: \# .* )? $/x;
last if /^ =+ $/x;
my ( $file ) = split /\t/;
my $rebuild = $write_unchanged_files # Rebuild: if unconditional rebuild
|| ! scalar @mktables_list_output_files # or if no outputs known
- || $old_start_time < $most_recent; # or out-of-date
+ || $old_start_time < $most_recent # or out-of-date
+ || $old_options ne $command_line_arguments; # or with different
+ # options
# 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.
# $file_list -- File list for $0.
#
# Autogenerated starting on $start_time ($localtime)
+# From options $command_line_arguments
#
# - First section is input files
# ($0 itself is not listed but is automatically considered an input)