Module Name: src
Committed By: martin
Date: Sat Apr 20 13:26:35 UTC 2024
Modified Files:
src/external/bsd/ntp/lib/libntp [netbsd-10]: Makefile
Log Message:
Additionally pull up following revision(s) (requested by jakllsch in ticket
#663):
external/bsd/ntp/lib/libntp/Makefile: revision 1.32
external/bsd/ntp/lib/libntp/Makefile: revision 1.33
external/bsd/ntp/lib/libntp/Makefile: revision 1.34
The substitute __DATE__ should be %b %e %Y per a C18 draft
Subtle change that won't make a functional difference in this case;
changed only for semantic correctness.
Increase MKREPRO robustness
- Use C locale to ensure month abbreviations are as expected
- bail out if MKREPRO_TIMESTAMP is not defined
- bail out if resulting __DATE__/__TIME__ replacement strings are empty
fix copy/paste-o
To generate a diff of this commit:
cvs rdiff -u -r1.25.6.2 -r1.25.6.3 src/external/bsd/ntp/lib/libntp/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.25.6.2 src/external/bsd/ntp/lib/libntp/Makefile:1.25.6.3
--- src/external/bsd/ntp/lib/libntp/Makefile:1.25.6.2 Fri Apr 19 09:01:35 2024
+++ src/external/bsd/ntp/lib/libntp/Makefile Sat Apr 20 13:26:35 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25.6.2 2024/04/19 09:01:35 martin Exp $
+# $NetBSD: Makefile,v 1.25.6.3 2024/04/20 13:26:35 martin Exp $
LIBISPRIVATE=yes
@@ -88,8 +88,14 @@ CPPFLAGS+= -I${IDIST}/sntp/libopts
# For MKREPRO, avoid using __DATE__ and __TIME__.
# Instead, use the date and time from ${MKREPRO_TIMESTAMP}
.if ${MKREPRO:Uno} == "yes"
-MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %d %Y"
-MKREPRO_TIME != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%T"
+.if ${MKREPRO_TIMESTAMP:Uundefined} == "undefined"
+.error MKREPRO_TIMESTAMP is undefined with MKREPRO active
+.endif
+MKREPRO_DATE != env LC_ALL=C ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %e %Y"
+MKREPRO_TIME != env LC_ALL=C ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%T"
+.if ${MKREPRO_DATE} == "" || ${MKREPRO_TIME} == ""
+.error empty MKREPRO_DATE or MKREPRO_TIME
+.endif
CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\"
CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIME=\"${MKREPRO_TIME:Q}\"
.endif