diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2022-11-16 15:47:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-16 15:47:31 +0100 |
commit | 0a952f8b7bf6f70009dd5821bccbaf9170c73d07 (patch) | |
tree | 9c39bea998df2070e0fcf1f7ccc2c5519c517b15 | |
parent | 26a038417107cf0a1a49d0b9ada83d55a7998ac4 (diff) | |
download | spack-0a952f8b7bf6f70009dd5821bccbaf9170c73d07.tar.gz spack-0a952f8b7bf6f70009dd5821bccbaf9170c73d07.tar.bz2 spack-0a952f8b7bf6f70009dd5821bccbaf9170c73d07.tar.xz spack-0a952f8b7bf6f70009dd5821bccbaf9170c73d07.zip |
docs updates for spack env depfile (#33937)
-rw-r--r-- | lib/spack/docs/environments.rst | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/spack/docs/environments.rst b/lib/spack/docs/environments.rst index 2fd51baafb..5c8b6b2fb4 100644 --- a/lib/spack/docs/environments.rst +++ b/lib/spack/docs/environments.rst @@ -1070,19 +1070,23 @@ the include is conditional. Building a subset of the environment ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The generated ``Makefile``\s contain install targets for each spec. Given the hash -of a particular spec, you can use the ``.install/<hash>`` target to install the -spec with its dependencies. There is also ``.install-deps/<hash>`` to *only* install +The generated ``Makefile``\s contain install targets for each spec, identified +by ``<name>-<version>-<hash>``. This allows you to install only a subset of the +packages in the environment. When packages are unique in the environment, it's +enough to know the name and let tab-completion fill out the version and hash. + +The following phony targets are available: ``install/<spec>`` to install the +spec with its dependencies, and ``install-deps/<spec>`` to *only* install its dependencies. This can be useful when certain flags should only apply to dependencies. Below we show a use case where a spec is installed with verbose output (``spack install --verbose``) while its dependencies are installed silently: .. code:: console - $ spack env depfile -o Makefile --make-target-prefix my_env + $ spack env depfile -o Makefile # Install dependencies in parallel, only show a log on error. - $ make -j16 my_env/.install-deps/<hash> SPACK_INSTALL_FLAGS=--show-log-on-error + $ make -j16 install-deps/python-3.11.0-<hash> SPACK_INSTALL_FLAGS=--show-log-on-error # Install the root spec with verbose output. - $ make -j16 my_env/.install/<hash> SPACK_INSTALL_FLAGS=--verbose
\ No newline at end of file + $ make -j16 install/python-3.11.0-<hash> SPACK_INSTALL_FLAGS=--verbose
\ No newline at end of file |