From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 08 Aug 2024 11:40:57 +0200 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 1sbzdh-007S2J-25 for lore@lore.pengutronix.de; Thu, 08 Aug 2024 11:40:57 +0200 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 1sbzdg-0000AF-HZ; Thu, 08 Aug 2024 11:40:56 +0200 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 1sbzdR-0008Th-2z; Thu, 08 Aug 2024 11:40:41 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sbzdQ-005Oa6-Lu; Thu, 08 Aug 2024 11:40:40 +0200 Received: from rhi by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1sbzdQ-006sbc-22; Thu, 08 Aug 2024 11:40:40 +0200 From: Roland Hieber To: ptxdist@pengutronix.de Date: Thu, 8 Aug 2024 11:40:33 +0200 Message-Id: <20240808094035.1636229-2-rhi@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240808094035.1636229-1-rhi@pengutronix.de> References: <20240808094035.1636229-1-rhi@pengutronix.de> MIME-Version: 1.0 Mail-Followup-To: Roland Hieber , ptxdist@pengutronix.de Content-Transfer-Encoding: 8bit Subject: [ptxdist] [PATCH 2/4] docs: ref_rule_file_layout: document default clean stage 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_rule_file_layout.rst | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/doc/ref_rule_file_layout.rst b/doc/ref_rule_file_layout.rst index 58f37b73da24..222ee46a7b29 100644 --- a/doc/ref_rule_file_layout.rst +++ b/doc/ref_rule_file_layout.rst @@ -23,6 +23,8 @@ Each rule file provides PTXdist with the required steps (in PTXdist called - targetinstall.post +7. clean + .. note:: Host, image and cross packages don't need to install anything in the target file system. @@ -255,6 +257,41 @@ targetinstall.post Stage Default Rule The *targetinstall.post* stage does nothing by default. It can be used to do some work after the *targetinstall* stage. +clean Stage Default Rule +^^^^^^^^^^^^^^^^^^^^^^^^ + +The *clean* stage is only executed when calling ``ptxdist clean ``. + +The default *clean* stage calls the *world/clean* macro: + +.. code-block:: make + + $(STATEDIR)/.clean: + @$(call targetinfo) + @$(call world/clean, ) + +This will invalidate all stages of the package, and remove all its existing +build artefacts: + +* ``_DIR``, and ``$(_DIR)-build`` for out-of-tree builds, +* ``_PKGDIR`` (i.e., usually ``$(PKGDIR)/$()``) +* the pre-built archive in ``PKGDIR`` (if enabled) +* the files that the package has installed into the respective sysroot folder + (``|ptxdistPlatformDir|/sysroot-{target,host,cross}/``), +* for target packages, any output of the package's *targetinstall* stage built + by the following macros: + + - opkg packages defined by *install_init* and *install_finish*, + - any files installed into the target root file system + (``|ptxdistPlatformDir|/root/``) via *install_copy*, *install_glob*, + *install_alternative*, *install_tree* and similar, + - images installed to the image directory by *ptx/install-image* and + *ptx/install-image-link* + +It will not remove any input files like patches or downloaded sources or config +files, nor will it remove any :ref:`pre-built archives ` from +``PTXCONF_PROJECT_DEVPKGDIR``. + Skipping a Stage ~~~~~~~~~~~~~~~~ -- 2.39.2