From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 06 Dec 2022 12:13:23 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1p2Vt5-00CTpS-AQ for lore@lore.pengutronix.de; Tue, 06 Dec 2022 12:13:23 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1p2Vt5-0000Dh-9L; Tue, 06 Dec 2022 12:13:23 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p2Vry-0008Te-Da; Tue, 06 Dec 2022 12:12:14 +0100 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1p2Vrx-002gRY-1l; Tue, 06 Dec 2022 12:12:13 +0100 Received: from rhi by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1p2Vrx-00GcaR-3z; Tue, 06 Dec 2022 12:12:13 +0100 From: Roland Hieber To: ptxdist@pengutronix.de Date: Tue, 6 Dec 2022 12:12:10 +0100 Message-Id: <20221206111211.3961424-2-rhi@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221206111211.3961424-1-rhi@pengutronix.de> References: <20221206111211.3961424-1-rhi@pengutronix.de> MIME-Version: 1.0 Mail-Followup-To: Roland Hieber , ptxdist@pengutronix.de Content-Transfer-Encoding: 8bit Subject: [ptxdist] [PATCH 2/3] doc: ref_make_macros: add missing synopses X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Roland Hieber Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Signed-off-by: Roland Hieber --- doc/ref_make_macros.rst | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/doc/ref_make_macros.rst b/doc/ref_make_macros.rst index 19efb11f1093..4c1ca2f0375f 100644 --- a/doc/ref_make_macros.rst +++ b/doc/ref_make_macros.rst @@ -787,10 +787,15 @@ whereas if the respective variable is unset, they would expand to the opposite: ptx/get-alternative ~~~~~~~~~~~~~~~~~~~ +Usage: + +.. code-block:: make + + $(call ptx/get-alternative, , ) + This macro can be used to find files or directories in the BSP and PTXdist. -There are two arguments, **prefix** and **file**. The search path is very -similar to :ref:`install_alternative`. The first existing location of the -following paths is returned: +The search path is very similar to :ref:`install_alternative`. +The first existing location of the following paths is returned: * ``$(PTXDIST_WORKSPACE)/$(prefix)$(PTXDIST_PLATFORMSUFFIX)/$(file)`` * ``$(PTXDIST_WORKSPACE)/$(prefix)/$(file)$(PTXDIST_PLATFORMSUFFIX)`` @@ -805,9 +810,14 @@ following paths is returned: ptx/in-path ~~~~~~~~~~~ +Usage: + +.. code-block:: make + + $(call ptx/in-path, , ) + This macro can be used to find files or directories in the BSP and PTXdist. -There are two arguments, **path variable** and **file**. The **path -variable** must be a variable name that is available in a shell called by +The **path** must be a variable name that is available in a shell called by **make**. The variable must contain a ``:`` separated list of directories. The **file** will be searched in these directories and the first existing path is returned. PTXdist defines several variables that can be used here. @@ -831,8 +841,14 @@ directories for each of these variables. ptx/in-platformconfigdir ~~~~~~~~~~~~~~~~~~~~~~~~ -This macro is only useful with multiple layers. It has one argument -**file**. The **file** is searched for in the platform directory in +Usage: + +.. code-block:: make + + $(call ptx/in-platformconfigdir, ) + +This macro is only useful with multiple layers. +The argument **file** is searched for in the platform directory in all layers in the usual search order. It returns the first existing file. If none exists it returns ``$(PTXDIST_PLATFORMCONFIGDIR)/$(file)``. This avoids unexpected errors due to empty variables if a file is missing. -- 2.30.2