From 43aaf8c404e31a193d446d9074b333dd7bf1f286 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 20 May 2019 21:13:57 -0700 Subject: docs: Use HDF5 as the example package for `spack graph` --- lib/spack/docs/developer_guide.rst | 2 +- lib/spack/docs/packaging_guide.rst | 28 ++++++++++++++++------------ 2 files changed, 17 insertions(+), 13 deletions(-) (limited to 'lib') diff --git a/lib/spack/docs/developer_guide.rst b/lib/spack/docs/developer_guide.rst index 2691bbb12e..d25b40e45a 100644 --- a/lib/spack/docs/developer_guide.rst +++ b/lib/spack/docs/developer_guide.rst @@ -488,7 +488,7 @@ supply ``--profile`` to Spack on the command line, before any subcommands. ``spack --profile`` output looks like this: -.. command-output:: spack --profile graph dyninst +.. command-output:: spack --profile graph hdf5 :ellipsis: 25 The bottom of the output shows the top most time consuming functions, diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 32fc484eb5..898dd1442c 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -4017,32 +4017,36 @@ Spack provides the ``spack graph`` command for graphing dependencies. The command by default generates an ASCII rendering of a spec's dependency graph. For example: -.. command-output:: spack graph mpileaks +.. command-output:: spack graph hdf5 At the top is the root package in the DAG, with dependency edges emerging from it. On a color terminal, the edges are colored by which dependency they lead to. -.. command-output:: spack graph --deptype=all mpileaks +.. command-output:: spack graph --deptype=link hdf5 The ``deptype`` argument tells Spack what types of dependencies to graph. By default it includes link and run dependencies but not build -dependencies. Supplying ``--deptype=all`` will show the build -dependencies as well. This is equivalent to -``--deptype=build,link,run``. Options for ``deptype`` include: +dependencies. Supplying ``--deptype=link`` will show only link +dependencies. The default is ``--deptype=all``, which is equivalent to +``--deptype=build,link,run,test``. Options for ``deptype`` include: -* Any combination of ``build``, ``link``, and ``run`` separated by - commas. -* ``all`` or ``alldeps`` for all types of dependencies. +* Any combination of ``build``, ``link``, ``run``, and ``test`` separated + by commas. +* ``all`` for all types of dependencies. You can also use ``spack graph`` to generate graphs in the widely used -`Dot `_ format. For -example: +`Dot `_ format. For example: -.. command-output:: spack graph --dot mpileaks +.. command-output:: spack graph --dot hdf5 This graph can be provided as input to other graphing tools, such as -those in `Graphviz `_. +those in `Graphviz `_. If you have graphviz +installed, you can write straight to PDF like this: + +.. code-block:: console + + $ spack graph --dot hdf5 | dot -Tpdf > hdf5.pdf .. _packaging-shell-support: -- cgit v1.2.3-60-g2f50