From d4989b30eebbb0435cc687d2ca3d760b21f0be9b Mon Sep 17 00:00:00 2001 From: arichardson Date: Tue, 6 Feb 2018 15:41:45 +0000 Subject: [PATCH] crossbuild: Make the CHECK_TIME variable work on Linux Linux /usr/bin/find doesn't understand the -mtime -0s flag. Instead create a temporary file and compare that file's mtime to sys/sys/param.h to check whether the clock is correct. Reviewed By: jhb, imp Approved By: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D14157 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5aa89fbda54..de1cd40aa6f 100644 --- a/Makefile +++ b/Makefile @@ -352,7 +352,7 @@ _guard: .PHONY @false STARTTIME!= LC_ALL=C date -CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s ; echo +CHECK_TIME!= cmp=`mktemp`; find ${.CURDIR}/sys/sys/param.h -newer "$$cmp" && rm "$$cmp"; echo .if !empty(CHECK_TIME) .error check your date/time: ${STARTTIME} .endif -- 2.45.0