Have R extensions build in parallel.

Set `MAKEFLAGS` so R extensions can be built in parallel if that is set
in spack.
This commit is contained in:
Glenn Johnson 2016-07-30 15:07:18 -05:00
parent ec9959b152
commit 8dc26bbcd9

View File

@ -139,6 +139,10 @@ def setup_dependent_environment(self, spack_env, run_env, extension_spec):
spack_env.set('R_MAKEVARS_SITE',
join_path(self.etcdir, 'Makeconf.spack'))
# Use the number of make_jobs set in spack. The make program will
# determine how many jobs can actually be started.
spack_env.set('MAKEFLAGS', '-j{0}'.format(make_jobs))
# For run time environment set only the path for extension_spec and
# prepend it to R_LIBS
if extension_spec.package.extends(self.spec):