Make spack_cc, spack_cxx, spack_f77, spack_fc available in build env.

- Add for convenience for packages that need to refer to these.
- Added an example in the documentation.
This commit is contained in:
Todd Gamblin
2016-03-06 16:52:34 -08:00
parent 240ada5775
commit 1ee90a6fe7
2 changed files with 16 additions and 0 deletions

View File

@@ -2137,6 +2137,15 @@ Filtering functions
Examples:
#. Filtering a Makefile to force it to use Spack's compiler wrappers:
.. code-block:: python
filter_file(r'^CC\s*=.*', spack_cc, 'Makefile')
filter_file(r'^CXX\s*=.*', spack_cxx, 'Makefile')
filter_file(r'^F77\s*=.*', spack_f77, 'Makefile')
filter_file(r'^FC\s*=.*', spack_fc, 'Makefile')
#. Replacing ``#!/usr/bin/perl`` with ``#!/usr/bin/env perl`` in ``bib2xhtml``:
.. code-block:: python