summaryrefslogtreecommitdiff
path: root/lib/spack/spack/build_environment.py
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-05-31 13:03:30 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2015-05-31 13:03:30 -0700
commit16c25886358ca8e89d2cad252be26677c9137e27 (patch)
tree9327b92fddc7f4515858fbd6f188c5f46c4d029f /lib/spack/spack/build_environment.py
parentbf6a73fa3e432eeb0a3019c1d5470ee868c7e76c (diff)
downloadspack-16c25886358ca8e89d2cad252be26677c9137e27.tar.gz
spack-16c25886358ca8e89d2cad252be26677c9137e27.tar.bz2
spack-16c25886358ca8e89d2cad252be26677c9137e27.tar.xz
spack-16c25886358ca8e89d2cad252be26677c9137e27.zip
Fix #46: make(parallel=False) regression.
- Added some tests to make sure this stays in place.
Diffstat (limited to 'lib/spack/spack/build_environment.py')
-rw-r--r--lib/spack/spack/build_environment.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 2e72f3c787..f9e795ac42 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -73,14 +73,14 @@ class MakeExecutable(Executable):
self.jobs = jobs
def __call__(self, *args, **kwargs):
- parallel = kwargs.get('parallel', self.jobs > 1)
- disable_parallel = env_flag(SPACK_NO_PARALLEL_MAKE)
+ disable = env_flag(SPACK_NO_PARALLEL_MAKE)
+ parallel = not disable and kwargs.get('parallel', self.jobs > 1)
- if self.jobs > 1 and not disable_parallel:
+ if parallel:
jobs = "-j%d" % self.jobs
args = (jobs,) + args
- super(MakeExecutable, self).__call__(*args, **kwargs)
+ return super(MakeExecutable, self).__call__(*args, **kwargs)
def set_compiler_environment_variables(pkg):