build: fixed --includedir options for PIDL
authorAndrew Tridgell <tridge@samba.org>
Fri, 26 Feb 2010 11:48:55 +0000 (22:48 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:39 +0000 (20:26 +1000)
buildtools/wafsamba/samba_patterns.py
buildtools/wafsamba/wafsamba.py

index 15400f10b618d73f8ac976453f795f68049e01a4..79aad81e6a78f40bf90ce241e262880975185239 100644 (file)
@@ -7,6 +7,14 @@ from Logs import debug
 from TaskGen import extension
 from samba_utils import *
 
+##########################################################
+# create a node with a new name, based on an existing node
+def NEW_NODE(node, name):
+    ret = node.parent.find_or_declare([name])
+    ASSERT(node, ret is not None, "Unable to find new target with name '%s' from '%s'" % (
+            name, node.name))
+    return ret
+
 
 ################################################################################
 # a et task which calls out to compile_et to do the work
@@ -23,9 +31,10 @@ def process_et(self, node):
     self.allnodes.append(c_node)
 
 
+
 ################################################################################
 # a idl task which calls out to pidl to do the work
-Task.simple_task_type('idl', '../../pidl/pidl --header --ndr-parser --client --python --server --outputdir=${TGT[0].outputdir} -- ${SRC}', color='BLUE', ext_out='.c')
+Task.simple_task_type('idl', '../../pidl/pidl ${TGT[0].options} --header --ndr-parser --client --python --server --outputdir=${TGT[0].outputdir} -- ${SRC}', color='BLUE', ext_out='.c')
 
 @extension('.idl')
 def process_idl(self, node):
@@ -41,6 +50,7 @@ def process_idl(self, node):
 
     dname = os.path.dirname(node.bld_dir(self.env)) + "/gen_ndr"
     c_node.outputdir = dname
+    c_node.options   = self.options
 
     self.create_task('idl', node, [c_node, h1_node, h2_node, s_node, cli_node, cli_h_node, py_node])
 
index 34ca3cf2ffd67ca00d9b07a91f78aebb30c8145d..a33d5d4ada77f2b46559bee91edae417e9db0f1b 100644 (file)
@@ -357,17 +357,9 @@ def SAMBA_ERRTABLE(bld, name, source,
     )
 Build.BuildContext.SAMBA_ERRTABLE = SAMBA_ERRTABLE
 
-##########################################################
-# create a node with a new name, based on an existing node
-def NEW_NODE(node, name):
-    ret = node.parent.find_or_declare([name])
-    ASSERT(node, ret is not None, "Unable to find new target with name '%s' from '%s'" % (
-            name, node.name))
-    return ret
-
 #################################################################
 # define a PIDL target
-def SAMBA_PIDL(bld, directory, source):
+def SAMBA_PIDL(bld, directory, source, options=''):
     name = os.path.basename(string.replace(source, '.idl', ''))
     name = "%s/ndr_%s.o" % (directory, name)
 
@@ -378,7 +370,8 @@ def SAMBA_PIDL(bld, directory, source):
     bld(
         features = 'cc',
         source   = source,
-        target   = name
+        target   = name,
+        options  = options
     )
 Build.BuildContext.SAMBA_PIDL = SAMBA_PIDL
 
@@ -386,9 +379,9 @@ Build.BuildContext.SAMBA_PIDL = SAMBA_PIDL
 
 #################################################################
 # define a set of Samba PIDL targets
-def SAMBA_PIDL_LIST(bld, directory, source_list):
+def SAMBA_PIDL_LIST(bld, directory, source_list, options=''):
     for p in source_list.split():
-        bld.SAMBA_PIDL(directory, p)
+        bld.SAMBA_PIDL(directory, p, options)
 Build.BuildContext.SAMBA_PIDL_LIST = SAMBA_PIDL_LIST