summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/docs/packaging_guide.rst21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst
index 46ab71b93f..ed61bdf81b 100644
--- a/lib/spack/docs/packaging_guide.rst
+++ b/lib/spack/docs/packaging_guide.rst
@@ -2344,6 +2344,27 @@ you set ``parallel`` to ``False`` at the package level, then each call
to ``make()`` will be sequential by default, but packagers can call
``make(parallel=True)`` to override it.
+Note that the `--jobs` option works out of the box for all standard
+build systems. If you are using a non-standard build system instead, you
+can use the variable `make_jobs` to extract the number of jobs specified
+by the `--jobs` option:
+
+.. code-block:: python
+ :emphasize-lines: 7, 11
+ :linenos:
+
+ class Xios(Package):
+ ...
+ def install(self, spec, prefix):
+ ...
+ options = [
+ ...
+ '--jobs', str(make_jobs),
+ ]
+ ...
+ make_xios = Executable("./make_xios")
+ make_xios(*options)
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Install-level build parallelism
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^