summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-01-05 07:56:49 +0100
committerMax Kellermann <max@musicpd.org>2018-01-05 08:17:15 +0100
commit1ca70d97596937ae8b14719de191ce1a7790e11c (patch)
treeb086d15405ace849f14c2744a3678682c8c69c35
parent4303aaa9b8430ab0fa3f58e8b9f5d1cf7b115473 (diff)
build/python/autotools: add properties "ldflags", "libs", "install_target"
-rw-r--r--python/build/autotools.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/python/build/autotools.py b/python/build/autotools.py
index 55a5fc067..c3e179f85 100644
--- a/python/build/autotools.py
+++ b/python/build/autotools.py
@@ -6,11 +6,17 @@ class AutotoolsProject(Project):
def __init__(self, url, md5, installed, configure_args=[],
autogen=False,
cppflags='',
+ ldflags='',
+ libs='',
+ install_target='install',
**kwargs):
Project.__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):
src = self.unpack(toolchain)
@@ -32,8 +38,8 @@ class AutotoolsProject(Project):
'CFLAGS=' + toolchain.cflags,
'CXXFLAGS=' + toolchain.cxxflags,
'CPPFLAGS=' + toolchain.cppflags + ' ' + self.cppflags,
- 'LDFLAGS=' + toolchain.ldflags,
- 'LIBS=' + toolchain.libs,
+ 'LDFLAGS=' + toolchain.ldflags + ' ' + self.ldflags,
+ 'LIBS=' + toolchain.libs + ' ' + self.libs,
'AR=' + toolchain.ar,
'RANLIB=' + toolchain.ranlib,
'STRIP=' + toolchain.strip,
@@ -45,5 +51,5 @@ class AutotoolsProject(Project):
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', 'install'],
+ subprocess.check_call(['/usr/bin/make', '--quiet', self.install_target],
cwd=build, env=toolchain.env)