build: detect if conf.env['CPP'] is an array or not
authorMatthieu Patou <mat@matws.net>
Fri, 10 Dec 2010 07:06:44 +0000 (10:06 +0300)
committerMatthieu Patou <mat@samba.org>
Fri, 10 Dec 2010 09:18:20 +0000 (10:18 +0100)
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Fri Dec 10 10:18:20 CET 2010 on sn-devel-104

buildtools/wafsamba/samba_pidl.py

index 6476211eea3546953c7fc2d8769f6860768058de..d0af9f27b4d650ea10f94e23c4001b31c6c6b473 100644 (file)
@@ -61,12 +61,17 @@ def SAMBA_PIDL(bld, pname, source,
     cpp = ""
     cc = ""
     if bld.CONFIG_SET("CPP"):
-        cpp = "CPP=%s" % bld.CONFIG_GET("CPP")
+        if isinstance(bld.CONFIG_GET("CPP"), list):
+            cpp = "CPP=%s" % bld.CONFIG_GET("CPP")[0]
+        else:
+            cpp = "CPP=%s" % bld.CONFIG_GET("CPP")
+
     if bld.CONFIG_SET("CC"):
         if isinstance(bld.CONFIG_GET("CC"), list):
             cc = "CC=%s" % bld.CONFIG_GET("CC")[0]
         else:
             cc = "CC=%s" % bld.CONFIG_GET("CC")
+
     t = bld(rule='cd .. && %s %s ${PERL} "${PIDL}" --quiet ${OPTIONS} --outputdir ${OUTPUTDIR} -- "${SRC[0].abspath(env)}"' % (cpp, cc),
             ext_out    = '.c',
             before     = 'cc',