From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 22 Jan 2025 18:28:19 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1taeWZ-00386P-0U for lore@lore.pengutronix.de; Wed, 22 Jan 2025 18:28:19 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1taeWZ-0005dE-GY; Wed, 22 Jan 2025 18:28:19 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1taeWP-0005cz-1c; Wed, 22 Jan 2025 18:28:09 +0100 Received: from dude04.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::ac]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1taeWO-001K4r-2l; Wed, 22 Jan 2025 18:28:08 +0100 Received: from rhi by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1taeWO-00F0L2-2b; Wed, 22 Jan 2025 18:28:08 +0100 From: Roland Hieber To: ptxdist@pengutronix.de Date: Wed, 22 Jan 2025 18:28:07 +0100 Message-Id: <20250122172807.3576211-1-rhi@pengutronix.de> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Mail-Followup-To: Roland Hieber , ptxdist@pengutronix.de Content-Transfer-Encoding: 8bit Subject: [ptxdist] [PATCH] doc/ref_make_variables: document _PARTS 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.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Signed-off-by: Roland Hieber --- 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 ``_STRIP_LEVEL`` could be set to 2 or more to remove more than one directory level. +``_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, + ``_PARTS`` can be set to refer to multiple prefixes of + variable names, usually of the form ``_``, 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``. + + ``__STRIP_LEVEL``, ``__LICENSE`` and + ``__LICENSE_FILES`` can be used adequately. + ``_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