Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Feb 2018 15:41:45 +0000 (UTC)
From:      Alex Richardson <arichardson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r328935 - head
Message-ID:  <201802061541.w16FfjuJ041525@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arichardson
Date: Tue Feb  6 15:41:45 2018
New Revision: 328935
URL: https://svnweb.freebsd.org/changeset/base/328935

Log:
  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

Modified:
  head/Makefile

Modified: head/Makefile
==============================================================================
--- head/Makefile	Tue Feb  6 15:41:35 2018	(r328934)
+++ head/Makefile	Tue Feb  6 15:41:45 2018	(r328935)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802061541.w16FfjuJ041525>