git: 75e02c458a0d - main - libsecureboot ensure correct BUILD_UTC
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 23 May 2023 16:03:12 UTC
The branch main has been updated by sjg:
URL: https://cgit.FreeBSD.org/src/commit/?id=75e02c458a0def1ee8054646434c738b4004de8f
commit 75e02c458a0def1ee8054646434c738b4004de8f
Author: Simon J. Gerraty <sjg@FreeBSD.org>
AuthorDate: 2023-05-23 16:02:00 +0000
Commit: Simon J. Gerraty <sjg@FreeBSD.org>
CommitDate: 2023-05-23 16:02:00 +0000
libsecureboot ensure correct BUILD_UTC
If using stat(1) on BUILD_UTC_FILE we should use -L incase
it is a symlink.
If we have new enough bmake though we can just use ${BUILD_UTC_FILE:mtime}
---
lib/libsecureboot/Makefile.inc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/libsecureboot/Makefile.inc b/lib/libsecureboot/Makefile.inc
index 921b5e7bc1d8..325eb5fb0d27 100644
--- a/lib/libsecureboot/Makefile.inc
+++ b/lib/libsecureboot/Makefile.inc
@@ -126,7 +126,11 @@ BUILD_UTC?= ${SOURCE_DATE_EPOCH}
BUILD_UTC_FILE:= ${.PARSEDIR:tA}/${.PARSEFILE}
.endif
# you can of course set BUILD_UTC to any value you like
-BUILD_UTC?= ${${STAT:Ustat} -f %m ${BUILD_UTC_FILE}:L:sh}
+.if ${MAKE_VERSION} > 20230509
+BUILD_UTC?= ${BUILD_UTC_FILE:mtime}
+.else
+BUILD_UTC?= ${${STAT:Ustat} -L -f %m ${BUILD_UTC_FILE}:L:sh}
+.endif
# Generate ta.h containing one or more PEM encoded trust anchors in ta_PEM.
#