Module Name:    src
Committed By:   lukem
Date:           Fri Jul 21 15:00:32 UTC 2023

Modified Files:
        src/usr.bin/xlint/lint1: Makefile makeman

Log Message:
lint: use TOOL_SED instead of sed

Use ${TOOL_SED} instead of (the host) sed, as the
latter doesn't necessarily support the non-POSIX -E.

PR bin/57533


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/usr.bin/xlint/lint1/Makefile
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/xlint/lint1/makeman

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

Modified files:

Index: src/usr.bin/xlint/lint1/Makefile
diff -u src/usr.bin/xlint/lint1/Makefile:1.99 src/usr.bin/xlint/lint1/Makefile:1.100
--- src/usr.bin/xlint/lint1/Makefile:1.99	Sat Jul 15 13:51:36 2023
+++ src/usr.bin/xlint/lint1/Makefile	Fri Jul 21 15:00:32 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.99 2023/07/15 13:51:36 rillig Exp $
+#	$NetBSD: Makefile,v 1.100 2023/07/21 15:00:32 lukem Exp $
 
 .include <bsd.own.mk>
 
@@ -41,7 +41,8 @@ LINT1=		${TOOLDIR}/libexec/${MACHINE_GNU
 LINT1?=		./${PROG}
 
 ${MAN}.date:	err.c
-	sed -E \
+	${_MKTARGET_CREATE}
+	${TOOL_SED} -E \
 	    -e 's,.*(....)/([0-9]{2})/0?([0-9]+).*,\2 \3\, \1,' \
 	    -e 's,^01,January,' \
 	    -e 's,^02,February,' \
@@ -67,7 +68,7 @@ cgram.ln: cgram.c
 
 ${MAN}:		makeman err.c Makefile ${MAN}.date
 	${_MKTARGET_CREATE}
-	${HOST_SH} ${.ALLSRC:M*makeman} \
+	SED=${TOOL_SED:Q} ${HOST_SH} ${.ALLSRC:M*makeman} \
 	    "$$(cat ${.ALLSRC:M*.date})" ${.ALLSRC:M*err.c} \
 	    >${.TARGET}
 

Index: src/usr.bin/xlint/lint1/makeman
diff -u src/usr.bin/xlint/lint1/makeman:1.6 src/usr.bin/xlint/lint1/makeman:1.7
--- src/usr.bin/xlint/lint1/makeman:1.6	Tue Jul  5 22:50:41 2022
+++ src/usr.bin/xlint/lint1/makeman	Fri Jul 21 15:00:32 2023
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: makeman,v 1.6 2022/07/05 22:50:41 rillig Exp $
+#	$NetBSD: makeman,v 1.7 2023/07/21 15:00:32 lukem Exp $
 #
 # Copyright (c) 2000 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -28,14 +28,16 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
+: ${SED:=sed}
+
 tab='	'
 
 list_messages() {
-	sed -E -n \
+	${SED} -E -n \
 	    -e 's|^'"$tab"'"(.+)",.*/\* '"$2"'([0-9]+) \*/$|\2'"$tab"'\1|p' \
 	    -e 's|^'"$tab"'"",.*/\* '"$2"'[0-9]+ \*/$|---'"$tab"'(no longer used)|p' \
 	    "$1" \
-	| sed -E \
+	| ${SED} -E \
 	    -e 's|\\"|"|g' \
 	    -e 's|\\\\|\\e|g' \
 	    -e "s|'|\\'|g" \
@@ -43,7 +45,7 @@ list_messages() {
 }
 
 # shellcheck disable=SC2016
-cvsid='$NetBSD: makeman,v 1.6 2022/07/05 22:50:41 rillig Exp $'
+cvsid='$NetBSD: makeman,v 1.7 2023/07/21 15:00:32 lukem Exp $'
 date="$1"
 year="${date##* }"
 messages="$(list_messages "$2" "")"

Reply via email to