summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@googlemail.com>2016-12-15 19:15:52 +0100
committerTodd Gamblin <tgamblin@llnl.gov>2016-12-15 10:15:52 -0800
commit87c9b010336e524ce6a1164cbb469d1a0d8808b5 (patch)
treeea17fcc3e28a816e97c3495e9c2f5cbc744b3807 /lib
parentf9ca5b9f27a7a5c65be3070ad44a5e1478e08788 (diff)
downloadspack-87c9b010336e524ce6a1164cbb469d1a0d8808b5.tar.gz
spack-87c9b010336e524ce6a1164cbb469d1a0d8808b5.tar.bz2
spack-87c9b010336e524ce6a1164cbb469d1a0d8808b5.tar.xz
spack-87c9b010336e524ce6a1164cbb469d1a0d8808b5.zip
openblas: derives from MakefilePackage (#2488)
* MakefilePackage: changed build_args and install_args for consistency with #2464 openblas: derives from MakefilePackage * MakefilePackage: changed default edit behavior
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_systems/makefile.py20
1 files changed, 7 insertions, 13 deletions
diff --git a/lib/spack/spack/build_systems/makefile.py b/lib/spack/spack/build_systems/makefile.py
index dcddadeedc..fcc7ed2c99 100644
--- a/lib/spack/spack/build_systems/makefile.py
+++ b/lib/spack/spack/build_systems/makefile.py
@@ -25,6 +25,7 @@
import inspect
+import llnl.util.tty as tty
from llnl.util.filesystem import working_dir
from spack.package import PackageBase
@@ -45,33 +46,26 @@ class MakefilePackage(PackageBase):
# build-system class we are using
build_system_class = 'MakefilePackage'
+ build_targets = []
+ install_targets = ['install']
+
def build_directory(self):
"""Directory where the main Makefile is located"""
return self.stage.source_path
- def build_args(self):
- """List of arguments that should be passed to make at build time"""
- return []
-
- def install_args(self):
- """List of arguments that should be passed to make at install time"""
- return []
-
def edit(self, spec, prefix):
"""This phase cannot be defaulted for obvious reasons..."""
- raise NotImplementedError('\'edit\' function not implemented')
+ tty.msg('Using default implementation: skipping edit phase.')
def build(self, spec, prefix):
"""Default build phase : call make passing build_args"""
- args = self.build_args()
with working_dir(self.build_directory()):
- inspect.getmodule(self).make(*args)
+ inspect.getmodule(self).make(*self.build_targets)
def install(self, spec, prefix):
"""Default install phase : call make passing install_args"""
- args = self.install_args() + ['install']
with working_dir(self.build_directory()):
- inspect.getmodule(self).make(*args)
+ inspect.getmodule(self).make(*self.install_targets)
# Check that self.prefix is there after installation
PackageBase.sanity_check('install')(PackageBase.sanity_check_prefix)