From 42312958454c0fcc700586781084510f7da0dbcd Mon Sep 17 00:00:00 2001 From: Hendrik Tews Date: Thu, 17 Nov 2016 13:06:37 +0100 Subject: fix parallel compilation for the unlikely case of identical time stamps Since version 24.3 Emacs supports pico second precision in time stamps and Emacs on ext4 seems to have a time precision of 5 milliseconds for file time stamps. It is therefor quite unlikely that a source and an object file have the same time stamp. This patch fixes parallel compilation for these corner cases and adds a few hundred test cases to test all combinations where some files have identical time stamps. On Emacs older than 24.3 or on file systems with a low precision (eg. ext3) this patch can cause additional compilations. --- coq/coq-compile-common.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'coq/coq-compile-common.el') diff --git a/coq/coq-compile-common.el b/coq/coq-compile-common.el index a6b5abb3..1840f9a0 100644 --- a/coq/coq-compile-common.el +++ b/coq/coq-compile-common.el @@ -392,8 +392,7 @@ modules are matched separately with `coq-require-id-regexp'") A time value is a list of two integers as returned by `file-attributes'. The first integer contains the upper 16 bits and the second the lower 16 bits of the time." - (or (time-less-p time-1 time-2) - (equal time-1 time-2))) + (not (time-less-p time-2 time-1))) (defun coq-max-dep-mod-time (dep-mod-times) "Return the maximum in DEP-MOD-TIMES. -- cgit v1.2.3