Date: Wed, 21 Dec 2022 16:34:35 GMT From: Bryan Drewery <bdrewery@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 4ca11c4efc7e - main - Mk/bsd.sanity.mk: Reduce parsing during package builds Message-ID: <202212211634.2BLGYZUw097511@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bdrewery: URL: https://cgit.FreeBSD.org/ports/commit/?id=4ca11c4efc7e01e8fbf797624c8d54157f1c61a0 commit 4ca11c4efc7e01e8fbf797624c8d54157f1c61a0 Author: Bryan Drewery <bdrewery@FreeBSD.org> AuthorDate: 2022-12-21 16:12:45 +0000 Commit: Bryan Drewery <bdrewery@FreeBSD.org> CommitDate: 2022-12-21 16:34:32 +0000 Mk/bsd.sanity.mk: Reduce parsing during package builds This disables bsd.sanity.mk when PACKAGE_BUILDING is set such that it only is loaded during 'make [all]' or 'make check-sanity'. It is assumed the package tool will manually call the target if it wants the check. Otherwise we get redundant logic and filesystem lookups from this file for every other build target. Prodded by: mjg --- Mk/bsd.port.mk | 3 +++ Mk/bsd.sanity.mk | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 457497a17e8a..4bd5681bc61c 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1961,7 +1961,10 @@ ERROR+= "Unknown USES=${f:C/\:.*//}" . endfor . if defined(PORTNAME) +. if !defined(PACKAGE_BUILDING) || empty(.TARGETS) || make(all) || \ + make(check-sanity) || make(show*-errors) || make(show*-warnings) .include "${PORTSDIR}/Mk/bsd.sanity.mk" +. endif . endif . if defined(USE_LOCALE) diff --git a/Mk/bsd.sanity.mk b/Mk/bsd.sanity.mk index ac76013ef80b..621445045470 100644 --- a/Mk/bsd.sanity.mk +++ b/Mk/bsd.sanity.mk @@ -55,6 +55,7 @@ ERROR+= "${a} is unsupported, please use ${${a}_ALT}" # Warnings only when DEVELOPER=yes +.if defined(DEVELOPER) .if exists(${.CURDIR}/../../Mk/bsd.port.mk) || ${OVERLAYS:tA:M${.CURDIR:H:H}} == ${.CURDIR:H:H} . if ${.CURDIR:H:T} != ${PKGCATEGORY} @@ -311,3 +312,5 @@ DEV_WARNING+= "${a} is not needed: ${${a}_REASON}" DEV_ERROR+= "${a} is unsupported, please use ${${a}_ALT}" . endif .endfor + +.endif # defined(DEVELOPER)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212211634.2BLGYZUw097511>