waf: library_flags() doesn't only operate on conf objects
authorAndrew Tridgell <tridge@samba.org>
Tue, 15 Feb 2011 05:13:05 +0000 (16:13 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 18 Feb 2011 04:09:46 +0000 (15:09 +1100)
use a better name for the first argument

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

buildtools/wafsamba/samba_autoconf.py

index ec0ed16e5289686f4308950aa30cb46e085d67ce..299b380a1a4d39e11c2d33b69558bcf04ee955ae 100644 (file)
@@ -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)