summaryrefslogtreecommitdiff
path: root/python/build/autotools.py
diff options
context:
space:
mode:
authorFelix Hädicke <felixhaedicke@web.de>2017-10-06 23:06:28 +0200
committerMax Kellermann <max@musicpd.org>2018-01-05 08:17:17 +0100
commit8217d75ca159db470846e28e9215fe08a61bc7f6 (patch)
treef417da363eb5505c8e53af3d80334ea4698b7619 /python/build/autotools.py
parent1ca70d97596937ae8b14719de191ce1a7790e11c (diff)
build/python: refactoring: introduce new class MakeProject
This introduces a the new class MakeProject, which is used as a base class for all Makefile based thirdparty libraries.
Diffstat (limited to 'python/build/autotools.py')
-rw-r--r--python/build/autotools.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/python/build/autotools.py b/python/build/autotools.py
index c3e179f85..56af64cce 100644
--- a/python/build/autotools.py
+++ b/python/build/autotools.py
@@ -1,24 +1,22 @@
import os.path, subprocess, sys
-from build.project import Project
+from build.makeproject import MakeProject
-class AutotoolsProject(Project):
+class AutotoolsProject(MakeProject):
def __init__(self, url, md5, installed, configure_args=[],
autogen=False,
cppflags='',
ldflags='',
libs='',
- install_target='install',
**kwargs):
- Project.__init__(self, url, md5, installed, **kwargs)
+ MakeProject.__init__(self, url, md5, installed, **kwargs)
self.configure_args = configure_args
self.autogen = autogen
self.cppflags = cppflags
self.ldflags = ldflags
self.libs = libs
- self.install_target = install_target
- def build(self, toolchain):
+ def configure(self, toolchain):
src = self.unpack(toolchain)
if self.autogen:
if sys.platform == 'darwin':
@@ -49,7 +47,8 @@ class AutotoolsProject(Project):
] + self.configure_args
subprocess.check_call(configure, cwd=build, env=toolchain.env)
- subprocess.check_call(['/usr/bin/make', '--quiet', '-j12'],
- cwd=build, env=toolchain.env)
- subprocess.check_call(['/usr/bin/make', '--quiet', self.install_target],
- cwd=build, env=toolchain.env)
+ return build
+
+ def build(self, toolchain):
+ build = self.configure(toolchain)
+ MakeProject.build(self, toolchain, build)