mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
waf: library_flags() doesn't only operate on conf objects
use a better name for the first argument Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
41b1f97943
commit
433f68efaa
@ -463,21 +463,22 @@ Build.BuildContext.CONFIG_SET = CONFIG_SET
|
||||
Build.BuildContext.CONFIG_GET = CONFIG_GET
|
||||
|
||||
|
||||
def library_flags(conf, libs):
|
||||
def library_flags(self, libs):
|
||||
'''work out flags from pkg_config'''
|
||||
ccflags = []
|
||||
ldflags = []
|
||||
for lib in TO_LIST(libs):
|
||||
inc_path = getattr(conf.env, 'CPPPATH_%s' % lib.upper(), [])
|
||||
lib_path = getattr(conf.env, 'LIBPATH_%s' % lib.upper(), [])
|
||||
inc_path = getattr(self.env, 'CPPPATH_%s' % lib.upper(), [])
|
||||
lib_path = getattr(self.env, 'LIBPATH_%s' % lib.upper(), [])
|
||||
ccflags.extend(['-I%s' % i for i in inc_path])
|
||||
ldflags.extend(['-L%s' % l for l in lib_path])
|
||||
extra_ccflags = TO_LIST(getattr(conf.env, 'CCFLAGS_%s' % lib.upper(), []))
|
||||
extra_ldflags = TO_LIST(getattr(conf.env, 'LDFLAGS_%s' % lib.upper(), []))
|
||||
extra_ccflags = TO_LIST(getattr(self.env, 'CCFLAGS_%s' % lib.upper(), []))
|
||||
extra_ldflags = TO_LIST(getattr(self.env, 'LDFLAGS_%s' % lib.upper(), []))
|
||||
ccflags.extend(extra_ccflags)
|
||||
ldflags.extend(extra_ldflags)
|
||||
if 'EXTRA_LDFLAGS' in conf.env:
|
||||
ldflags.extend(conf.env['EXTRA_LDFLAGS'])
|
||||
if 'EXTRA_LDFLAGS' in self.env:
|
||||
ldflags.extend(self.env['EXTRA_LDFLAGS'])
|
||||
|
||||
ccflags = unique_list(ccflags)
|
||||
ldflags = unique_list(ldflags)
|
||||
return (ccflags, ldflags)
|
||||
|
Loading…
x
Reference in New Issue
Block a user