summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-24 07:44:48 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:04 +1000
commit6ef817dd7c90c20a0fb2e0e9a69e20dcd03ae459 (patch)
treecbb996bb72323b77d98d0007cbce3a943e0eff47 /buildtools/wafsamba
parent7848344d55116e33b7f5a4bacce29eaab3fa99c9 (diff)
downloadsamba-6ef817dd7c90c20a0fb2e0e9a69e20dcd03ae459.tar.gz
samba-6ef817dd7c90c20a0fb2e0e9a69e20dcd03ae459.tar.bz2
samba-6ef817dd7c90c20a0fb2e0e9a69e20dcd03ae459.zip
build: fixed the cflags for pkg_config libs
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r--buildtools/wafsamba/samba_deps.py31
1 files changed, 21 insertions, 10 deletions
diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py
index 689bccadf6..608f703b13 100644
--- a/buildtools/wafsamba/samba_deps.py
+++ b/buildtools/wafsamba/samba_deps.py
@@ -66,10 +66,6 @@ def build_dependencies(self):
the full dependency list for a target until we have all of the targets declared.
'''
- # we only should add extra library and object deps on libraries and binaries
- if not self.samba_type in ['LIBRARY', 'BINARY', 'PYTHON']:
- return
-
# we need to link against:
# 1) any direct system libs
@@ -79,12 +75,27 @@ def build_dependencies(self):
# 5) any direct objects
# 6) any indirect objects that come from subsystem dependencies
- self.uselib = list(self.final_syslibs)
- self.uselib_local = list(self.final_libs)
- self.add_objects = list(self.final_objects)
+ if self.samba_type in ['LIBRARY', 'BINARY', 'PYTHON']:
+ self.uselib = list(self.final_syslibs)
+ self.uselib_local = list(self.final_libs)
+ self.add_objects = list(self.final_objects)
+
+ # extra link flags from pkg_config
+ libs = self.final_syslibs.copy()
+ libs = libs.union(self.indirect_libs)
+
+ (ccflags, ldflags) = library_flags(self, list(libs))
+ new_ldflags = getattr(self, 'ldflags', [])
+ new_ldflags.extend(ldflags)
+ self.ldflags = new_ldflags
+
+ debug('deps: computed dependencies for target %s: uselib=%s uselib_local=%s add_objects=%s',
+ self.sname, self.uselib, self.uselib_local, self.add_objects)
+
+ if self.samba_type in ['SUBSYSTEM']:
+ # this is needed for the ccflags of libs that come from pkg_config
+ self.uselib = list(self.direct_syslibs)
- debug('deps: computed dependencies for target %s: uselib=%s uselib_local=%s add_objects=%s',
- self.sname, self.uselib, self.uselib_local, self.add_objects)
@@ -549,7 +560,7 @@ def break_dependency_loops(bld, tgt_list):
if t.samba_type in ['SUBSYSTEM']:
loops[loop] = loops[loop].union(t.indirect_objects)
loops[loop] = loops[loop].union(t.direct_objects)
- if t.samba_type in ['LIBRARY']:
+ if t.samba_type in ['LIBRARY','PYTHON']:
loops[loop] = loops[loop].union(t.indirect_libs)
loops[loop] = loops[loop].union(t.direct_libs)
if loop in loops[loop]: