summaryrefslogtreecommitdiff
path: root/morphlib
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-10-19 15:16:44 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-10-19 15:16:44 +0100
commit35429bc43f62da95190f2f6134ea2c97a17223c6 (patch)
tree4ac7fa0e4ac071888eb917ed3c270e20d54721bc /morphlib
parent263750ef9caf3c591eba8685b7fff00eb66ee41a (diff)
downloadmorph-35429bc43f62da95190f2f6134ea2c97a17223c6.tar.gz
Use make_concurrency to set MAKEFLAGS when buidling.
Diffstat (limited to 'morphlib')
-rw-r--r--morphlib/builder.py2
-rw-r--r--morphlib/util.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py
index e3f326eb..6348c811 100644
--- a/morphlib/builder.py
+++ b/morphlib/builder.py
@@ -64,6 +64,8 @@ class Builder(object):
self.ex = morphlib.execute.Execute(self._build, self.msg)
self.ex.env['WORKAREA'] = self.tempdir.dirname
self.ex.env['DESTDIR'] = self._inst + '/'
+ self.ex.env['MAKEFLAGS'] = \
+ '-j%d' % morphlib.util.make_concurrency()
logging.debug('Creating build tree at %s' % self._build)
tarball = cache_prefix + '.src.tar.gz'
diff --git a/morphlib/util.py b/morphlib/util.py
index 4558d8b8..007ba587 100644
--- a/morphlib/util.py
+++ b/morphlib/util.py
@@ -17,6 +17,7 @@
'''Utility functions for morph.'''
+import multiprocessing
import os