From nobody Tue Sep 10 17:55:02 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X3BDl1P5yz5WKDq; Tue, 10 Sep 2024 17:55:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X3BDl0Wzlz4FKQ; Tue, 10 Sep 2024 17:55:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725990903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QtxWUHF7S/mAXF2/bDYdUbSOHTsTYLDoRr9biM5b1Ok=; b=u6HvnnzLb/PSma1jTiKTRMSuIEAA2W7BG/YdWAkPwpXr0Z7EqtkKZeIT3fW7zff3uQAqmY rabd7vdi9XwADo2C6Fu31a3an8Z9dx63RSZ0fSR02936XrPlsYEoe5Hkuuj5XxVciLuG8Q OCJLC5vxCMYU/wPjEhZ7RQHNuJFMurwWUDUOTiJDZlFO9EosGMBQvFD0rNy0TnFF7pmHf8 RUXtAvpBbCoh3UXdyt+V3+y6pMRyEvez5xfswfS1q8va41rDfpluASi17dZEPt7D214VVx vnEAXcFphPZjJoDVCy9Y+bY2G2gGQbbbJYF6e1H1Mzng8b7Yn22OFFB7a9E8Ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725990903; a=rsa-sha256; cv=none; b=JL9UUMzPtTDk1f3d8Zc9B3cR40/7uYUBbFzYzJTDt8Isku/He2qwTS+TbzH433RwC0PKy2 rp2Wa146hIM2QKQ5AFNJU95Ha8EzwsoalP4XZ62Wx6tG9iS4Qb9WJgWr6OMpNvHjCZPjX0 1FKaWwWhjXNhEztdAALGaGSw4CEGJHcVrYIAkdFxREStudbfEyq7aGsHwNetcm0sUgVI9f JJ61pbWtLGIce5nr3bOZacoDXOmHRRoCceZEUueqMzgGt1HLL6DCoaQcNDmHIzlb3C2/BL 7mKuPB6QFZ/JdifoEBVR7hjaKCheqiDT6jUYz1P7io+JAPPNKyUhGUUJPhBOJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725990903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QtxWUHF7S/mAXF2/bDYdUbSOHTsTYLDoRr9biM5b1Ok=; b=deH6G0UqJYI6vzTkaDVoOvH2HcqZCE8hE3PR9k0wzo2po2kt7QiAKCfIQX8wokKKmuIPAR nbXjO+xNniZohjIaiNzude+1NtSpx3wdygWDuRVlriDsBbQ0PFklBJMu8ZPQqm90pouzw7 qW1HW9ph49W8LQJNJJFSZ+ONIKj3DZFDZmqZB30xVz7Q5ZUc4n2KxnqZAAMkkzJCarOUf5 vJBsaNvM4CpXeTKiS1bMn9SyIs97/WixMfhJBVV8nf1B29JuVLbPvget5oMfa1D0x0Nriu kpb07xfZkJTVzKMy3CXJEShtNuADADgG4ZfrlB8TiRW0OOPuCgq1nMQk4vGOYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X3BDk6z1KzxkV; Tue, 10 Sep 2024 17:55:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48AHt2f6086383; Tue, 10 Sep 2024 17:55:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48AHt2S4086380; Tue, 10 Sep 2024 17:55:02 GMT (envelope-from git) Date: Tue, 10 Sep 2024 17:55:02 GMT Message-Id: <202409101755.48AHt2S4086380@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: cc30f4ae6790 - main - depend-cleanup.sh: Extend clean_dep to support a custom regex List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc30f4ae6790cf4f19bc4787d7528dfea79ef27a Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=cc30f4ae6790cf4f19bc4787d7528dfea79ef27a commit cc30f4ae6790cf4f19bc4787d7528dfea79ef27a Author: Jessica Clarke AuthorDate: 2024-09-10 17:54:44 +0000 Commit: Jessica Clarke CommitDate: 2024-09-10 17:54:44 +0000 depend-cleanup.sh: Extend clean_dep to support a custom regex This will avoid having to duplicate the loop every time the default regex isn't good enough, and will be used by upcoming commits. --- tools/build/depend-cleanup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh index 828586e9d231..cb2551fced78 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -89,11 +89,12 @@ run() # $1 directory # $2 source filename w/o extension # $3 source extension +# $4 optional regex for egrep -w clean_dep() { for libcompat in "" $ALL_libcompats; do dirprfx=${libcompat:+obj-lib${libcompat}/} - if egrep -qw "$2\.$3" "$OBJTOP"/$dirprfx$1/.depend.$2.*o 2>/dev/null; then + if egrep -qw "${4:-$2\.$3}" "$OBJTOP"/$dirprfx$1/.depend.$2.*o 2>/dev/null; then echo "Removing stale ${libcompat:+lib${libcompat} }dependencies and objects for $2.$3" run rm -f \ "$OBJTOP"/$dirprfx$1/.depend.$2.* \