From 49ab3a4c5756d7ef40b03111f4c8a351d6bca7b8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 1 Dec 2023 09:58:37 -0800 Subject: [PATCH] Be more conservative about cache timestamps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * bin/autom4te.in (up_to_date): Fix thinko by using the minimum of the cache files’ timestamps, not the maximum. --- bin/autom4te.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/autom4te.in b/bin/autom4te.in index edc51fcf..38a61ac9 100644 --- a/bin/autom4te.in +++ b/bin/autom4te.in @@ -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. -- 2.40.1