From 0a952f8b7bf6f70009dd5821bccbaf9170c73d07 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 16 Nov 2022 15:47:31 +0100 Subject: docs updates for spack env depfile (#33937) --- lib/spack/docs/environments.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'lib') 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/`` target to install the -spec with its dependencies. There is also ``.install-deps/`` to *only* install +The generated ``Makefile``\s contain install targets for each spec, identified +by ``--``. 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/`` to install the +spec with its dependencies, and ``install-deps/`` 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/ SPACK_INSTALL_FLAGS=--show-log-on-error + $ make -j16 install-deps/python-3.11.0- SPACK_INSTALL_FLAGS=--show-log-on-error # Install the root spec with verbose output. - $ make -j16 my_env/.install/ SPACK_INSTALL_FLAGS=--verbose \ No newline at end of file + $ make -j16 install/python-3.11.0- SPACK_INSTALL_FLAGS=--verbose \ No newline at end of file -- cgit v1.2.3-70-g09d2