From 87c9b010336e524ce6a1164cbb469d1a0d8808b5 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 15 Dec 2016 19:15:52 +0100 Subject: 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 --- lib/spack/spack/build_systems/makefile.py | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'lib') 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) -- cgit v1.2.3-70-g09d2