Module Name:    src
Committed By:   christos
Date:           Fri Apr  5 22:27:25 UTC 2024

Modified Files:
        src/sys/conf: newvers.mk newvers.sh

Log Message:
Use ${TOOL_DATE} (Jan-Benedict Glaw)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/conf/newvers.mk
cvs rdiff -u -r1.62 -r1.63 src/sys/conf/newvers.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/conf/newvers.mk
diff -u src/sys/conf/newvers.mk:1.2 src/sys/conf/newvers.mk:1.3
--- src/sys/conf/newvers.mk:1.2	Sat Apr  8 14:24:09 2017
+++ src/sys/conf/newvers.mk	Fri Apr  5 18:27:25 2024
@@ -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}

Index: src/sys/conf/newvers.sh
diff -u src/sys/conf/newvers.sh:1.62 src/sys/conf/newvers.sh:1.63
--- src/sys/conf/newvers.sh:1.62	Sat Apr  8 14:24:09 2017
+++ src/sys/conf/newvers.sh	Fri Apr  5 18:27:25 2024
@@ -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}"

Reply via email to