From 433f68efaab8418f44cde29c6c857680719dda79 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 15 Feb 2011 16:13:05 +1100 Subject: waf: library_flags() doesn't only operate on conf objects use a better name for the first argument Pair-Programmed-With: Andrew Bartlett --- buildtools/wafsamba/samba_autoconf.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'buildtools') diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index ec0ed16e528..299b380a1a4 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -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) -- cgit v1.2.1