aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2018-02-06 15:41:45 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2018-02-06 15:41:45 +0000
commit95eff7c0c3c338b93045daf054fca1dc422a17fb (patch)
treefb280d29dafa24cff7eea4022f15d820a1b0e5e4 /Makefile
parentfb1df203687ef6dde283e5cd2ee13c94b4c8dcd1 (diff)
downloadsrc-95eff7c0c3c338b93045daf054fca1dc422a17fb.tar.gz
src-95eff7c0c3c338b93045daf054fca1dc422a17fb.zip
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
Notes
Notes: svn path=/head/; revision=328935
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5aa89fbda544..de1cd40aa6f2 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