summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlfredo Adolfo Gimenez <alfredo.gimenez@gmail.com>2016-12-18 16:27:47 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2016-12-18 16:27:47 -0800
commit68e9a2ed8daf4b43fe19cd062ff37a04c7978c10 (patch)
tree19c83c2d1160cbb2a69f4c7318642da54d400c0d /lib
parent0de7b5504e52ccd47c6e20908f2c0968d80571d4 (diff)
downloadspack-68e9a2ed8daf4b43fe19cd062ff37a04c7978c10.tar.gz
spack-68e9a2ed8daf4b43fe19cd062ff37a04c7978c10.tar.bz2
spack-68e9a2ed8daf4b43fe19cd062ff37a04c7978c10.tar.xz
spack-68e9a2ed8daf4b43fe19cd062ff37a04c7978c10.zip
Added customization for make targets in 'build' and 'install' phases for AutotoolsPackage (#2464)
* Customization for make targets in build and test phases for AutotoolsPackage * Updated Blitz++ to use customized make build and test targets * Removed flake8 error * Removed make test customization, added make install customization, need to figure out issues with multiple make targets * Changed build_targets and install_targets to normal attributes
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_systems/autotools.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/spack/spack/build_systems/autotools.py b/lib/spack/spack/build_systems/autotools.py
index 7be0b13645..dea4ae002f 100644
--- a/lib/spack/spack/build_systems/autotools.py
+++ b/lib/spack/spack/build_systems/autotools.py
@@ -45,6 +45,9 @@ class AutotoolsPackage(PackageBase):
They all have sensible defaults and for many packages the only thing
necessary will be to override `configure_args`
+
+ Additionally, you may specify make targets for build and install
+ phases by overriding `build_targets` and `install_targets`
"""
phases = ['autoreconf', 'configure', 'build', 'install']
# To be used in UI queries that require to know which
@@ -52,6 +55,9 @@ class AutotoolsPackage(PackageBase):
build_system_class = 'AutotoolsPackage'
patch_config_guess = True
+ build_targets = []
+ install_targets = ['install']
+
def do_patch_config_guess(self):
"""Some packages ship with an older config.guess and need to have
this updated when installed on a newer architecture."""
@@ -152,12 +158,12 @@ class AutotoolsPackage(PackageBase):
inspect.getmodule(self).configure(*options)
def build(self, spec, prefix):
- """The usual `make` after configure"""
- inspect.getmodule(self).make()
+ """Make the build targets"""
+ inspect.getmodule(self).make(*self.build_targets)
def install(self, spec, prefix):
- """...and the final `make install` after configure"""
- inspect.getmodule(self).make('install')
+ """Make the install targets"""
+ inspect.getmodule(self).make(*self.install_targets)
@PackageBase.sanity_check('build')
@PackageBase.on_package_attributes(run_tests=True)