From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 12 Sep 2024 14:12:52 +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 1soigu-003mmn-2K for lore@lore.pengutronix.de; Thu, 12 Sep 2024 14:12:52 +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 1soigt-0003d4-Rv; Thu, 12 Sep 2024 14:12:51 +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 1soifi-0001OZ-CP; Thu, 12 Sep 2024 14:11:38 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.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 1soifh-007NQQ-VS; Thu, 12 Sep 2024 14:11:37 +0200 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1soifh-00BGc5-30; Thu, 12 Sep 2024 14:11:37 +0200 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Thu, 12 Sep 2024 14:11:37 +0200 Message-Id: <20240912121137.2685462-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240808094035.1636229-2-rhi@pengutronix.de> References: <20240808094035.1636229-2-rhi@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] 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 Thanks, applied as 598fc9c4fc327642d9cebe23347ceba1fa6b96ad. Michael [sent from post-receive hook] On Thu, 12 Sep 2024 14:11:37 +0200, Roland Hieber wrote: > Signed-off-by: Roland Hieber > Message-Id: <20240808094035.1636229-2-rhi@pengutronix.de> > Signed-off-by: Michael Olbrich > > 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 > ~~~~~~~~~~~~~~~~ >