From 537e186f33b8ca2455759b3f51272317a7ce47e1 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 29 Jun 2001 15:10:14 +0000 Subject: [PATCH] [project @ 2001-06-29 15:10:14 by simonmar] Change a '>' to '>=' when comparing the modification times of object & source files, to match make's behaviour and eliminate some unnecessary recompiles. This introduces some potential unsafety, but it was felt that the benefits in terms of unsurprising behaviour were worth it. --- ghc/compiler/compMan/CompManager.lhs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/compMan/CompManager.lhs b/ghc/compiler/compMan/CompManager.lhs index 24a53b8..cc7ca58 100644 --- a/ghc/compiler/compMan/CompManager.lhs +++ b/ghc/compiler/compMan/CompManager.lhs @@ -640,7 +640,13 @@ getValidLinkable old_linkables objects_allowed new_linkables summary src_date = ms_hs_date summary valid_linkable - = filter (\l -> linkableTime l > src_date) linkable + = filter (\l -> linkableTime l >= src_date) linkable + -- why '>=' rather than '>' above? If the filesystem stores + -- times to the nearset second, we may occasionally find that + -- the object & source have the same modification time, + -- especially if the source was automatically generated + -- and compiled. Using >= is slightly unsafe, but it matches + -- make's behaviour. return (valid_linkable ++ new_linkables) -- 1.7.10.4