Fixes: 3694633183ae70aeba06 ("rules: introduce new macros to install files to images/") Signed-off-by: Roland Hieber <rhi@pengutronix.de> --- doc/ref_make_macros.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ref_make_macros.rst b/doc/ref_make_macros.rst index a9ba31c48616..19efb11f1093 100644 --- a/doc/ref_make_macros.rst +++ b/doc/ref_make_macros.rst @@ -148,8 +148,6 @@ For ``install`` the package directory is deleted. When ``--verbose`` is used then the full command is logged. With ``--quiet`` both stdout and stderr are redirected to the logfile. -.. _install_copy: - ptx/image-install, ptx/image-install-link, world/image-clean ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -177,6 +175,8 @@ omitted. ``ptx/image-install-link`` creates a symlink in the image directory. +.. _install_copy: + install_copy ~~~~~~~~~~~~~ -- 2.30.2
Signed-off-by: Roland Hieber <rhi@pengutronix.de> --- 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, <prefix>, <file>) + 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, <path>, <file>) + 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, <file>) + +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
Signed-off-by: Roland Hieber <rhi@pengutronix.de> --- doc/ref_make_macros.rst | 18 ++++++++++++++++++ doc/ref_make_variables.rst | 9 +++++++++ 2 files changed, 27 insertions(+) diff --git a/doc/ref_make_macros.rst b/doc/ref_make_macros.rst index 4c1ca2f0375f..3ea331baee4b 100644 --- a/doc/ref_make_macros.rst +++ b/doc/ref_make_macros.rst @@ -681,6 +681,24 @@ be installed with some other ``install_*`` command before @$(call install_replace, timezone, /etc/timezone, @TIMEZONE@, \ $(PTXCONF_TIMEZONE_LOCALTIME)) +.. _ptx/cfghash: +.. _ptx/cfghash-file: + +ptx/cfghash, ptx/cfghash-file +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Usage: + +.. code-block:: make + + $(call ptx/cfghash, <PKG>, <string>) + $(call ptx/cfghash-file, <PKG>, <file>) + +Add an arbitrary **<string>** or the content of **<file>** to the config hash +for **<PKG>**. +This has the effect that the package will be rebuilt when the string or the +content of the file changes. + .. _param_macros: .. _ptxEndis: .. _ptxDisen: diff --git a/doc/ref_make_variables.rst b/doc/ref_make_variables.rst index beca984edccc..7ec09cbb3e91 100644 --- a/doc/ref_make_variables.rst +++ b/doc/ref_make_variables.rst @@ -345,6 +345,15 @@ Build Environment for all Stages Prepare Stage ^^^^^^^^^^^^^ +``<PKG>_CFGHASH`` + This variable contains the config hash for the package. + If it changes, PTXdist rebuilds the prepare stage of the package (and + successively, all following stages). + + You should not need to touch this variable directly. + To add content to the config hash, you can use the macros :ref:`ptx/cfghash + and ptx/cfghash-file <ptx/cfghash>`. + ``<PKG>_CONF_ENV`` The environment for the prepare stage. If undefined, PTXdist will use ``$(CROSS_ENV)`` for target packages, ``$(HOST_ENV)`` for host packages -- 2.30.2
Thanks, applied as bcac1d9d55920b4906e38f0a72111f94d441fbae.
Michael
[sent from post-receive hook]
On Thu, 15 Dec 2022 08:34:58 +0100, Roland Hieber <rhi@pengutronix.de> wrote:
> Fixes: 3694633183ae70aeba06 ("rules: introduce new macros to install files to images/")
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> Message-Id: <20221206111211.3961424-1-rhi@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/doc/ref_make_macros.rst b/doc/ref_make_macros.rst
> index a9ba31c48616..19efb11f1093 100644
> --- a/doc/ref_make_macros.rst
> +++ b/doc/ref_make_macros.rst
> @@ -148,8 +148,6 @@ For ``install`` the package directory is deleted.
> When ``--verbose`` is used then the full command is logged. With
> ``--quiet`` both stdout and stderr are redirected to the logfile.
>
> -.. _install_copy:
> -
> ptx/image-install, ptx/image-install-link, world/image-clean
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> @@ -177,6 +175,8 @@ omitted.
>
> ``ptx/image-install-link`` creates a symlink in the image directory.
>
> +.. _install_copy:
> +
> install_copy
> ~~~~~~~~~~~~~
>
Thanks, applied as a0c33d0210161d49fe19c75ade31fe6d20817b14.
Michael
[sent from post-receive hook]
On Thu, 15 Dec 2022 08:34:59 +0100, Roland Hieber <rhi@pengutronix.de> wrote:
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> Message-Id: <20221206111211.3961424-2-rhi@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> 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, <prefix>, <file>)
> +
> 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, <path>, <file>)
> +
> 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, <file>)
> +
> +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.
Thanks, applied as 908c6ca41a28759e697be0d951a00a17306d0cab.
Michael
[sent from post-receive hook]
On Thu, 15 Dec 2022 08:35:00 +0100, Roland Hieber <rhi@pengutronix.de> wrote:
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> Message-Id: <20221206111211.3961424-3-rhi@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/doc/ref_make_macros.rst b/doc/ref_make_macros.rst
> index 4c1ca2f0375f..3ea331baee4b 100644
> --- a/doc/ref_make_macros.rst
> +++ b/doc/ref_make_macros.rst
> @@ -681,6 +681,24 @@ be installed with some other ``install_*`` command before
> @$(call install_replace, timezone, /etc/timezone, @TIMEZONE@, \
> $(PTXCONF_TIMEZONE_LOCALTIME))
>
> +.. _ptx/cfghash:
> +.. _ptx/cfghash-file:
> +
> +ptx/cfghash, ptx/cfghash-file
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +Usage:
> +
> +.. code-block:: make
> +
> + $(call ptx/cfghash, <PKG>, <string>)
> + $(call ptx/cfghash-file, <PKG>, <file>)
> +
> +Add an arbitrary **<string>** or the content of **<file>** to the config hash
> +for **<PKG>**.
> +This has the effect that the package will be rebuilt when the string or the
> +content of the file changes.
> +
> .. _param_macros:
> .. _ptxEndis:
> .. _ptxDisen:
> diff --git a/doc/ref_make_variables.rst b/doc/ref_make_variables.rst
> index beca984edccc..7ec09cbb3e91 100644
> --- a/doc/ref_make_variables.rst
> +++ b/doc/ref_make_variables.rst
> @@ -345,6 +345,15 @@ Build Environment for all Stages
> Prepare Stage
> ^^^^^^^^^^^^^
>
> +``<PKG>_CFGHASH``
> + This variable contains the config hash for the package.
> + If it changes, PTXdist rebuilds the prepare stage of the package (and
> + successively, all following stages).
> +
> + You should not need to touch this variable directly.
> + To add content to the config hash, you can use the macros :ref:`ptx/cfghash
> + and ptx/cfghash-file <ptx/cfghash>`.
> +
> ``<PKG>_CONF_ENV``
> The environment for the prepare stage. If undefined, PTXdist will use
> ``$(CROSS_ENV)`` for target packages, ``$(HOST_ENV)`` for host packages