Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jan 2025 03:48:02 GMT
From:      "Jason E. Hale" <jhale@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 7e1cd6f48329 - main - Mk/Uses/ninja.mk: Improve documentation
Message-ID:  <202501020348.5023m2MM017358@gitrepo.freebsd.org>

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

URL: https://cgit.FreeBSD.org/ports/commit/?id=7e1cd6f48329bdaa6c3ba4deb72bb1002c600b58

commit 7e1cd6f48329bdaa6c3ba4deb72bb1002c600b58
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2025-01-02 03:47:13 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2025-01-02 03:47:56 +0000

    Mk/Uses/ninja.mk: Improve documentation
---
 Mk/Uses/ninja.mk | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/Mk/Uses/ninja.mk b/Mk/Uses/ninja.mk
index 8b71d324bb27..e9581903b172 100644
--- a/Mk/Uses/ninja.mk
+++ b/Mk/Uses/ninja.mk
@@ -1,13 +1,13 @@
-# Provide support to use Ninja
+# Support for the Ninja and Samurai build systems
 #
-# Feature:		ninja
-# Usage:		USES=ninja
-# Valid ARGS:		build, make (default), run, samurai
+# Feature:	ninja
+# Usage:	USES=ninja[:arg]
+# Valid ARGS:	build, make, run, samurai
 #
-# build			add a build dependency on ninja
-# make			use ninja for the build instead of make, implies "build"
-# run			add a run dependency on ninja
-# samurai		use samurai regardless of NINJA_DEFAULT (implies make)
+# build		add a build dependency on ninja
+# make		use ninja for the build instead of make; implies "build" (default)
+# run		add a run dependency on ninja
+# samurai	use samurai regardless of NINJA_DEFAULT; implies "make"
 #
 # MAINTAINER: ports@FreeBSD.org
 
@@ -41,11 +41,10 @@ NINJA_CMD=	samu
 _NINJA_PORT=	devel/samurai
 MAKE_ENV+=	SAMUFLAGS="-v -j${MAKE_JOBS_NUMBER}"
 .    if ${ninja_ARGS:Mbuild} && !${BINARY_ALIAS:U:Mninja=*}
-# Cmake and Meson have native support for Samurai and detect and
-# use it when Ninja is not available in the build environment.  The
-# alias is needed for other ports which call Ninja directly and do
-# not fall back to Samurai. There should be no harm in providing it
-# generally.
+# CMake and Meson have native support for Samurai and use it in lieu of
+# Ninja if not found in the build environment. BINARY_ALIAS is needed
+# for other ports that call the ninja binary directly with no fallback
+# consideration for samu.
 BINARY_ALIAS+=	ninja=samu
 .    endif
 .  else
@@ -61,9 +60,9 @@ MAKE_ENV+=	NINJA_STATUS="[%p %s/%t] "
 
 .  if ${ninja_ARGS:Mmake}
 .    if ${NINJA_DEFAULT} == ninja && !defined(_SAMURAI_FROM_ARGS)
-# samu does not support GNU-style args, so we cannot just append
-# -v last.  samu gets this via SAMUFLAGS above but ninja does not
-# support an equivalent environment variable.
+# samu does not support GNU-style args, so we cannot simply append `-v`
+# to MAKE_ARGS to enable verbosity. This is instead accomplished via
+# the SAMUFLAGS environment variable defined above in MAKE_ENV.
 MAKE_ARGS+=	-v
 .    endif
 CMAKE_ARGS+=	-GNinja



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