]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Be more conservative about cache timestamps
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Dec 2023 17:58:37 +0000 (09:58 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Dec 2023 23:31:01 +0000 (15:31 -0800)
* bin/autom4te.in (up_to_date): Fix thinko by using the
minimum of the cache files’ timestamps, not the maximum.

bin/autom4te.in

index edc51fcfaf63c7e8ed3453557552a29d3228e2b7..38a61ac9134beb688828bbefcb73acd6e985953d 100644 (file)
@@ -948,11 +948,11 @@ sub up_to_date ($)
   return 0
     if ! -f $tfile || ! -f $ofile;
 
-  # The younger of the cache files must be older than the oldest of
-  # the dependencies.
+  # Both cache files must be younger than all dependencies,
+  # so use the minimum of the two cache files' timestamps.
   my $tmtime = mtime ($tfile);
   my $omtime = mtime ($ofile);
-  my ($file, $mtime) = ($tmtime < $omtime
+  my ($file, $mtime) = ($omtime < $tmtime
                        ? ($ofile, $omtime) : ($tfile, $tmtime));
 
   # stdin is always out of date.