summaryrefslogtreecommitdiff
path: root/source4/build/scons/pidl.py
blob: 6bddea3ee4028400fe173b6c2447d25b69351d8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""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']          = env.Detect('pidl') or './pidl/pidl'
	env['PIDLFLAGS']     = []
	env['PIDLCOM']       = 'CPP=$CPP $PIDL $PIDLFLAGS -- $SOURCE'
	env['BUILDERS']['NdrMarshaller'] = pidl_builder

def exists(env):
	return env.Detect(['./pidl/pidl','pidl'])