summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Maat <tristan.maat@codethink.co.uk>2018-04-13 12:47:57 +0100
committerTristan Maat <tristan.maat@codethink.co.uk>2018-04-13 12:54:10 +0100
commit2cec9c274dcc87002b69043cfe4f8a031791c2f2 (patch)
treeedbc1e6cf1d039940aa2510d559270d5c1490ad5
parent5632d2915ce1320dcfa0c26fd3e6f422937a7cc3 (diff)
downloadbuildstream-2cec9c274dcc87002b69043cfe4f8a031791c2f2.tar.gz
Update plugin documentation
-rw-r--r--buildstream/buildelement.py10
-rw-r--r--buildstream/element.py12
2 files changed, 19 insertions, 3 deletions
diff --git a/buildstream/buildelement.py b/buildstream/buildelement.py
index 6d6c200ca..cf4d6136b 100644
--- a/buildstream/buildelement.py
+++ b/buildstream/buildelement.py
@@ -55,6 +55,15 @@ will do the following operations:
:func:`Element.stage_sources() <buildstream.element.Element.integrate>`
+Element.prepare()
+~~~~~~~~~~~~~~~~~
+
+In :func:`Element.prepare() <buildstream.element.Element.prepare>`,
+the BuildElement will run ``configure-commands``, which are used to
+run one-off preparations that should not be repeated for a single
+build directory.
+
+
Element.assemble()
~~~~~~~~~~~~~~~~~~
In :func:`Element.assemble() <buildstream.element.Element.assemble>`, the
@@ -63,7 +72,6 @@ found in the element configuration.
Commands are run in the following order:
-* ``configure-commands``: Commands to configure how the element will build
* ``build-commands``: Commands to build the element
* ``install-commands``: Commands to install the results into ``%{install-root}``
* ``strip-commands``: Commands to strip debugging symbols installed binaries
diff --git a/buildstream/element.py b/buildstream/element.py
index 5df21bf72..b7af56248 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -35,8 +35,9 @@ For loading and configuration purposes, Elements must implement the
Build Phase
~~~~~~~~~~~
-The following methods are the foundation of the element's *build phase*, they
-must be implemented by all Element classes.
+The following methods are the foundation of the element's *build
+phase*, they must be implemented by all Element classes, unless
+explicitly stated otherwise.
* :func:`Element.configure_sandbox() <buildstream.element.Element.configure_sandbox>`
@@ -47,6 +48,13 @@ must be implemented by all Element classes.
Stage dependencies and :class:`Sources <buildstream.source.Source>` into
the sandbox.
+* :func:`Element.prepare() <buildstream.element.Element.prepare>`
+
+ Call preparation methods that should only be performed once in the
+ lifetime of a build directory (e.g. autotools' ./configure).
+
+ **Optional**: If left unimplemented, this step will be skipped.
+
* :func:`Element.assemble() <buildstream.element.Element.assemble>`
Perform the actual assembly of the element