summaryrefslogtreecommitdiff
path: root/source4/build/scons/pidl.py
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/scons/pidl.py')
-rw-r--r--source4/build/scons/pidl.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/source4/build/scons/pidl.py b/source4/build/scons/pidl.py
new file mode 100644
index 0000000000..c0c29d2035
--- /dev/null
+++ b/source4/build/scons/pidl.py
@@ -0,0 +1,32 @@
+"""SCons.Tool.pidl
+
+Tool-specific initialization for pidl (Perl-based IDL compiler)
+
+"""
+
+import SCons.Defaults
+import SCons.Scanner.IDL
+import SCons.Util
+
+idl_scanner = SCons.Scanner.IDL.IDLScan()
+
+pidl_builder = SCons.Builder.Builder(action='$PIDLCOM',
+ src_suffix = '.idl',
+ suffix='.c',
+ scanner = idl_scanner)
+
+def generate(env):
+ env['PIDL'] = 'pidl'
+ env['PIDLCPP'] = env['CPP']
+ env['PIDLFLAGS'] = []
+ env['PIDLCOM'] = 'CPP=$PIDLCPP $PIDL $PIDLFLAGS -- $SOURCE'
+ env['BUILDERS']['NdrMarshaller'] = pidl_builder
+
+def exists(env):
+ if (env.Detect('./pidl/pidl')):
+ return 1
+
+ if (env.Detect('pidl')):
+ return 1
+
+ return 0