summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLoris Ercole <30901257+lorisercole@users.noreply.github.com>2024-01-09 16:44:21 +0100
committerGitHub <noreply@github.com>2024-01-09 15:44:21 +0000
commit5919bd0799b176e194ad7c0f28f65aa34a6a6237 (patch)
tree824c073d958e32d4521eeacd878095142f072ff2 /lib
parent13e8029904c5506cc558694be15ba67372b845bb (diff)
downloadspack-5919bd0799b176e194ad7c0f28f65aa34a6a6237.tar.gz
spack-5919bd0799b176e194ad7c0f28f65aa34a6a6237.tar.bz2
spack-5919bd0799b176e194ad7c0f28f65aa34a6a6237.tar.xz
spack-5919bd0799b176e194ad7c0f28f65aa34a6a6237.zip
Improve "makefile" build system documentation (#41781)
Shows how to modify environment variables using "setup_build_environment" instead of overriding "edit"
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/docs/build_systems/makefilepackage.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/spack/docs/build_systems/makefilepackage.rst b/lib/spack/docs/build_systems/makefilepackage.rst
index 2555ac163a..c6d6300ccc 100644
--- a/lib/spack/docs/build_systems/makefilepackage.rst
+++ b/lib/spack/docs/build_systems/makefilepackage.rst
@@ -88,13 +88,13 @@ command-line. However, Makefiles that use ``?=`` for assignment honor
environment variables. Since Spack already sets ``CC``, ``CXX``, ``F77``,
and ``FC``, you won't need to worry about setting these variables. If
there are any other variables you need to set, you can do this in the
-``edit`` method:
+``setup_build_environment`` method:
.. code-block:: python
- def edit(self, spec, prefix):
- env["PREFIX"] = prefix
- env["BLASLIB"] = spec["blas"].libs.ld_flags
+ def setup_build_environment(self, env):
+ env.set("PREFIX", prefix)
+ env.set("BLASLIB", spec["blas"].libs.ld_flags)
`cbench <https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/cbench/package.py>`_
@@ -140,7 +140,7 @@ Edit Makefile
Some Makefiles are just plain stubborn and will ignore command-line
variables. The only way to ensure that these packages build correctly
is to directly edit the Makefile. Spack provides a ``FileFilter`` class
-and a ``filter_file`` method to help with this. For example:
+and a ``filter`` method to help with this. For example:
.. code-block:: python