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}
This commit is contained in:
Simon J. Gerraty 2023-05-23 09:02:00 -07:00
parent 5063211781
commit 75e02c458a

View file

@ -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.
#