Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 May 2023 12:15:01 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: f7057652618a - main - Makefile.inc1: use make builtin :ts instead of sed
Message-ID:  <202305051215.345CF1aY099320@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=f7057652618a73d93911cf636c254d183db77f6f

commit f7057652618a73d93911cf636c254d183db77f6f
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2022-04-10 22:52:48 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-05-05 12:14:35 +0000

    Makefile.inc1: use make builtin :ts instead of sed
    
    Commit 3eb1b4da3cf7 replaced "xargs -n1" with a sed expression to
    convert from space to newline as a list separator for *-old-* targets.
    Dan Nelson followed up with a suggestion to use make's built-in :ts
    instead, which should be slightly more efficient.
    
    Reviewed by:    sjg
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D39972
---
 Makefile.inc1 | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/Makefile.inc1 b/Makefile.inc1
index d059d5dd9fea..86e8da9467da 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -3245,10 +3245,9 @@ RM_I=-fv
 list-old-files: .PHONY
 	@cd ${.CURDIR}; \
 	${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
-	    -V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" \
-	    -V "OLD_FILES:Mlib/*.so.*:S,^lib,usr/lib32," \
-	    -V "OLD_FILES:Musr/lib/*:S,^usr/lib,usr/lib32," | \
-	    sed -E 's/[[:space:]]+/\n/g' | sort
+	    -V "OLD_FILES:ts\n" -V "OLD_FILES:Musr/share/*.gz:R:ts\n" \
+	    -V "OLD_FILES:Mlib/*.so.*:S,^lib,usr/lib32,:ts\n" \
+	    -V "OLD_FILES:Musr/lib/*:S,^usr/lib,usr/lib32,:ts\n" | sort
 
 delete-old-files: .PHONY
 	@echo ">>> Removing old files (only deletes safe to delete libs)"
@@ -3312,10 +3311,10 @@ check-old-files: .PHONY
 list-old-libs: .PHONY
 	@cd ${.CURDIR}; \
 	${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
-	    -V OLD_LIBS -V MOVED_LIBS -V "OLD_LIBS:Mlib/*:S,^lib,usr/lib32," \
-	    -V "OLD_LIBS:Musr/lib/*:S,^usr/lib,usr/lib32," \
-	    -V "OLD_LIBS:Mlib/casper/*:S,^lib/casper,usr/lib32," | \
-	    sed -E 's/[[:space:]]+/\n/g' | sort
+	    -V "OLD_LIBS:ts\n" -V "MOVED_LIBS:ts\n" \
+	    -V "OLD_LIBS:Mlib/*:S,^lib,usr/lib32,:ts\n" \
+	    -V "OLD_LIBS:Musr/lib/*:S,^usr/lib,usr/lib32,:ts\n" \
+	    -V "OLD_LIBS:Mlib/casper/*:S,^lib/casper,usr/lib32,:ts\n" | sort
 
 delete-old-libs: .PHONY
 	@echo ">>> Removing old libraries"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202305051215.345CF1aY099320>