Use ${TOOL_DATE} (Jan-Benedict Glaw)

This commit is contained in:
christos 2024-04-05 22:27:25 +00:00
parent 3200c2817b
commit 4224f0436d
3 changed files with 8 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: newvers.mk,v 1.2 2017/04/08 18:24:09 christos Exp $
# $NetBSD: newvers.mk,v 1.3 2024/04/05 22:27:25 christos Exp $
MKREPRO?=no
@ -17,7 +17,7 @@ newvers: vers.o
vers.o: ${SYSTEM_OBJ:O} Makefile $S/conf/newvers.sh \
$S/conf/osrelease.sh ${_NETBSD_VERSION_DEPENDS}
${_MKMSG_CREATE} vers.c
${HOST_SH} $S/conf/newvers.sh ${_NVFLAGS}
TOOL_DATE=${TOOL_DATE} ${HOST_SH} $S/conf/newvers.sh ${_NVFLAGS}
${_MKTARGET_COMPILE}
${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
${COMPILE_CTFCONVERT}

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $NetBSD: newvers.sh,v 1.62 2017/04/08 18:24:09 christos Exp $
# $NetBSD: newvers.sh,v 1.63 2024/04/05 22:27:25 christos Exp $
#
# Copyright (c) 1984, 1986, 1990, 1993
# The Regents of the University of California. All rights reserved.
@ -153,6 +153,7 @@ if [ ! -e version ]; then
echo 0 > version
fi
DATE=${TOOL_DATE:-date}
Rflag=false
nflag=false
timestamp=
@ -206,7 +207,7 @@ if ${Rflag}; then
else
if [ -z "${timestamp}" ]; then
v=$(cat version)
t=$(LC_ALL=C date)
t=$(LC_ALL=C ${DATE})
u=${USER-root}
h=$(hostname)
d=$(pwd)
@ -214,7 +215,7 @@ else
echo $(expr ${v} + 1) > version
else
v=0
t=$(LC_ALL=C TZ=UTC date -r "${timestamp}")
t=$(LC_ALL=C TZ=UTC ${DATE} -r "${timestamp}")
u=mkrepro
h=mkrepro.NetBSD.org
d="/usr/src/sys/arch/${machine}/compile/${id}"

View File

@ -1,4 +1,4 @@
# $NetBSD: newvers_stand.mk,v 1.4 2021/05/21 11:28:11 nakayama Exp $
# $NetBSD: newvers_stand.mk,v 1.5 2024/04/05 22:28:20 christos Exp $
VERSIONFILE?=version
VERSIONMACHINE?=${MACHINE}
@ -19,7 +19,7 @@ VERSIONFLAGS+=-d
vers.c: ${VERSIONFILE} ${_NETBSD_VERSION_DEPENDS}
${_MKTARGET_CREATE}
${HOST_SH} ${S}/conf/newvers_stand.sh \
TOOL_DATE=${TOOL_DATE} ${HOST_SH} ${S}/conf/newvers_stand.sh \
-m ${VERSIONMACHINE} ${VERSIONFLAGS} ${.ALLSRC:[1]} ${NEWVERSWHAT}
.endif