Skip to content

Commit

Permalink
crossbuild: Make the CHECK_TIME variable work on Linux
Browse files Browse the repository at this point in the history
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
  • Loading branch information
arichardson committed Feb 6, 2018
1 parent fb1df20 commit 95eff7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 95eff7c

Please sign in to comment.