Thu Apr 18 19:23:54 2024 UTC (21d)
Format MKREPRO_TIMESTAMP with "%b %d %Y" to correctly substitute __DATE__


(jakllsch)
diff -r1.30 -r1.31 src/external/bsd/ntp/lib/libntp/Makefile

cvs diff -r1.30 -r1.31 src/external/bsd/ntp/lib/libntp/Makefile (expand / switch to unified diff)

--- src/external/bsd/ntp/lib/libntp/Makefile 2024/04/12 19:06:45 1.30
+++ src/external/bsd/ntp/lib/libntp/Makefile 2024/04/18 19:23:53 1.31
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.30 2024/04/12 19:06:45 jakllsch Exp $ 1# $NetBSD: Makefile,v 1.31 2024/04/18 19:23:53 jakllsch Exp $
2 2
3LIBISPRIVATE=yes 3LIBISPRIVATE=yes
4 4
5LIB=ntp 5LIB=ntp
6 6
7.include <bsd.own.mk> 7.include <bsd.own.mk>
8 8
9.include "${.CURDIR}/../Makefile.inc" 9.include "${.CURDIR}/../Makefile.inc"
10 10
11DIST= ${IDIST}/libntp  11DIST= ${IDIST}/libntp
12 12
13.PATH.c: ${DIST} 13.PATH.c: ${DIST}
14 14
@@ -78,26 +78,26 @@ timetoa.c \ @@ -78,26 +78,26 @@ timetoa.c \
78timexsup.c \ 78timexsup.c \
79uglydate.c \ 79uglydate.c \
80vint64ops.c \ 80vint64ops.c \
81work_fork.c \ 81work_fork.c \
82work_thread.c \ 82work_thread.c \
83xsbprintf.c \ 83xsbprintf.c \
84ymd2yd.c 84ymd2yd.c
85 85
86CPPFLAGS+= -I${IDIST}/sntp/libopts 86CPPFLAGS+= -I${IDIST}/sntp/libopts
87 87
88# For MKREPRO, avoid using __DATE__ and __TIME__. 88# For MKREPRO, avoid using __DATE__ and __TIME__.
89# Instead, use the date and time from ${MKREPRO_TIMESTAMP} 89# Instead, use the date and time from ${MKREPRO_TIMESTAMP}
90.if ${MKREPRO:Uno} == "yes" 90.if ${MKREPRO:Uno} == "yes"
91MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%F" 91MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %d %Y"
92MKREPRO_TIME != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%T" 92MKREPRO_TIME != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%T"
93CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\" 93CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\"
94CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIME=\"${MKREPRO_TIME:Q}\" 94CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIME=\"${MKREPRO_TIME:Q}\"
95.endif 95.endif
96 96
97COPTS.timetoa.c+= ${CC_WNO_FORMAT_TRUNCATION} 97COPTS.timetoa.c+= ${CC_WNO_FORMAT_TRUNCATION}
98COPTS.socktoa.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-restrict :} 98COPTS.socktoa.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-restrict :}
99COPTS.socktohost.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-restrict :} 99COPTS.socktohost.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-restrict :}
100 100
101COPTS.a_md5encrypt.c+= -Wno-error=deprecated-declarations 101COPTS.a_md5encrypt.c+= -Wno-error=deprecated-declarations
102 102
103.include <bsd.lib.mk> 103.include <bsd.lib.mk>