From: Roland Hieber <rhi@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: [ptxdist] [PATCH] doc/ref_make_variables: document <PKG>_PARTS
Date: Wed, 22 Jan 2025 18:28:07 +0100 [thread overview]
Message-ID: <20250122172807.3576211-1-rhi@pengutronix.de> (raw)
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
doc/ref_make_variables.rst | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/doc/ref_make_variables.rst b/doc/ref_make_variables.rst
index 25af5528fe85..69bac79bf474 100644
--- a/doc/ref_make_variables.rst
+++ b/doc/ref_make_variables.rst
@@ -323,6 +323,44 @@ of the corresponding target package if it exists.
In theory ``<PKG>_STRIP_LEVEL`` could be set to 2 or more to remove more
than one directory level.
+``<PKG>_PARTS``
+ Sometimes more than one source archive needs to be downloaded to build a
+ single package, e.g. when the project's main source archive comes from a Git
+ repository export, which doesn't include Git submodules. In this case,
+ ``<PKG>_PARTS`` can be set to refer to multiple prefixes of
+ variable names, usually of the form ``<PKG>_<SUBPART>``, which PTXdist's
+ default *get* and *extract* stages will use to resolve additional
+ ``*_VERSION``, ``*_URL``, ``*_MD5`` variables etc. to download and extract
+ multiple source archives.
+
+ For example:
+
+ .. code:: make
+
+ FOO_VERSION := 1.0
+ FOO_MD5 := a38714a1713bfd436564d643e169879e
+ FOO := foo-$(FOO_VERSION)
+ FOO_URL := https://some-server/path/to/$(FOO).tar.gz
+ FOO_SOURCE := $(SRCDIR)/$(FOO).$(FOO_SUFFIX)
+ FOO_DIR := $(BUILDDIR)/$(FOO)
+
+ FOO_SUBPART_MD5 := a38714a1713bfd436564d643e169879e
+ FOO_SUBPART := subpart-0.9.1
+ FOO_SUBPART_URL := https://some-server/path/to/$(FOO_SUBPART).tar.gz
+ FOO_SUBPART_SOURCE := $(SRCDIR)/$(FOO_SUBPART).tar.gz
+ FOO_SUBPART_DIR := $(BUILDDIR)/$(FOO)/subpart
+
+ FOO_PARTS := FOO FOO_SUBPART
+
+ In this example, the *foo.get* stage will download *foo-1.0.tar.gz* and
+ *subpart-0.9.1.tar.gz*.
+ The *foo.extract* stage will first extract *foo-1.0.tar.gz* into its build
+ dir at ``$(BUILDDIR)/$(FOO)`` as usual, and then extract
+ *subpart-0.9.1.tar.gz* into the subfolder ``$(BUILDDIR)/$(FOO)/subpart``.
+
+ ``<PKG>_<SUBPART>_STRIP_LEVEL``, ``<PKG>_<SUBPART>_LICENSE`` and
+ ``<PKG>_<SUBPART>_LICENSE_FILES`` can be used adequately.
+
``<PKG>_BUILD_OOT``
If this is set to ``YES`` then PTXdist will build the package out of
tree. This is only supported for autoconf, qmake and cmake packages. The
--
2.39.5
next reply other threads:[~2025-01-22 17:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-22 17:28 Roland Hieber [this message]
2025-01-27 8:35 ` [ptxdist] [APPLIED] " Michael Olbrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250122172807.3576211-1-rhi@pengutronix.de \
--to=rhi@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox