diff --git a/pisi/actionsapi/autotools.py b/pisi/actionsapi/autotools.py index 8491ca00..348aa1e8 100644 --- a/pisi/actionsapi/autotools.py +++ b/pisi/actionsapi/autotools.py @@ -92,7 +92,7 @@ def compile(parameters = ''): def make(parameters = ''): '''make source with given parameters = "all" || "doc" etc.''' - if system('make %s' % parameters): + if system('make %s %s' % (get.makeJOBS(), parameters)): raise MakeError(_('Make failed.')) def install(parameters = '', argument = 'install'): diff --git a/pisi/actionsapi/get.py b/pisi/actionsapi/get.py index 0fee8cf4..218ba8bf 100644 --- a/pisi/actionsapi/get.py +++ b/pisi/actionsapi/get.py @@ -104,6 +104,9 @@ def CXXFLAGS(): def LDFLAGS(): return env.ldflags +def makeJOBS(): + return env.jobs + # Directory Related Functions def docDIR(): diff --git a/pisi/actionsapi/kde.py b/pisi/actionsapi/kde.py index 99c21ff6..845e12f3 100644 --- a/pisi/actionsapi/kde.py +++ b/pisi/actionsapi/kde.py @@ -69,7 +69,7 @@ def configure(parameters = ''): def make(parameters = ''): '''make source with given parameters = "all" || "doc" etc.''' - if system('make %s' % parameters): + if system('make %s %s' % (get.makeJOBS(), parameters)): raise MakeError(_('Make failed.')) def install(parameters = 'install'): diff --git a/pisi/actionsapi/variables.py b/pisi/actionsapi/variables.py index bf900ab1..66845e68 100644 --- a/pisi/actionsapi/variables.py +++ b/pisi/actionsapi/variables.py @@ -29,6 +29,7 @@ def exportFlags(): environ['CFLAGS'] = values.build.cflags environ['CXXFLAGS'] = values.build.cxxflags environ['LDFLAGS'] = values.build.ldflags + environ['JOBS'] = values.build.jobs class Env(object): '''General environment variables used in actions API''' @@ -46,7 +47,8 @@ class Env(object): 'host': 'HOST', 'cflags': 'CFLAGS', 'cxxflags': 'CXXFLAGS', - 'ldflags': 'LDFLAGS' + 'ldflags': 'LDFLAGS', + 'jobs': 'JOBS' } def __getattr__(self, attr): diff --git a/pisi/configfile.py b/pisi/configfile.py index b4aef339..133dd6a8 100644 --- a/pisi/configfile.py +++ b/pisi/configfile.py @@ -23,6 +23,7 @@ # #[build] #host = i686-pc-linux-gnu +#jobs = "-j1" #CFLAGS= -mtune=i686 -O2 -pipe -fomit-frame-pointer #CXXFLAGS= -mtune=i686 -O2 -pipe -fomit-frame-pointer #LDFLAGS= @@ -60,6 +61,7 @@ class GeneralDefaults: class BuildDefaults: """Default values for [build] section""" host = "i686-pc-linux-gnu" + jobs = "-j1" CFLAGS = "-mtune=i686 -O2 -pipe -fomit-frame-pointer" CXXFLAGS = "-mtune=i686 -O2 -pipe -fomit-frame-pointer" LDFLAGS = ""