mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <rhi@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: [ptxdist] [PATCH 2/4] docs: ref_rule_file_layout: document default clean stage
Date: Thu,  8 Aug 2024 11:40:33 +0200	[thread overview]
Message-ID: <20240808094035.1636229-2-rhi@pengutronix.de> (raw)
In-Reply-To: <20240808094035.1636229-1-rhi@pengutronix.de>

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 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 <package>``.
+
+The default *clean* stage calls the *world/clean* macro:
+
+.. code-block:: make
+
+    $(STATEDIR)/<pkg>.clean:
+    	@$(call targetinfo)
+    	@$(call world/clean, <PKG>)
+
+This will invalidate all stages of the package, and remove all its existing
+build artefacts:
+
+* ``<PKG>_DIR``, and ``$(<PKG>_DIR)-build`` for out-of-tree builds,
+* ``<PKG>_PKGDIR`` (i.e., usually ``$(PKGDIR)/$(<PKG>)``)
+* 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 <devpkgs>` from
+``PTXCONF_PROJECT_DEVPKGDIR``.
+
 Skipping a Stage
 ~~~~~~~~~~~~~~~~
 
-- 
2.39.2




  reply	other threads:[~2024-08-08  9:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08  9:40 [ptxdist] [PATCH 1/4] doc: ref_make_macros: improve world/image-clean documentation Roland Hieber
2024-08-08  9:40 ` Roland Hieber [this message]
2024-09-12 12:11   ` [ptxdist] [APPLIED] docs: ref_rule_file_layout: document default clean stage Michael Olbrich
2024-08-08  9:40 ` [ptxdist] [PATCH 3/4] doc: conf.py: replace 'versatilepb' with example placeholder Roland Hieber
2024-09-12 12:11   ` [ptxdist] [APPLIED] " Michael Olbrich
2024-08-08  9:40 ` [ptxdist] [PATCH 4/4] doc: conf.py: update default toolchain version Roland Hieber
2024-09-12 12:11   ` [ptxdist] [APPLIED] " Michael Olbrich
2024-09-12 12:11 ` [ptxdist] [APPLIED] doc: ref_make_macros: improve world/image-clean documentation 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=20240808094035.1636229-2-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