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.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/source4/build/scons/pidl.py b/source4/build/scons/pidl.py
index 2f09c9861a..b29584c756 100644
--- a/source4/build/scons/pidl.py
+++ b/source4/build/scons/pidl.py
@@ -11,19 +11,21 @@ import SCons.Scanner
idl_scanner = SCons.Scanner.ClassicCPP("PIDLScan", '.idl', 'CPPPATH', r'depends\(([^,]+),+\)', SCons.Node.FS.default_fs)
def idl_emitter(target, source, env):
- base, ext = SCons.Util.splitext(str(source[0]).split('/')[-1])
- result = ['gen_ndr/ndr_%s.c' % base, 'gen_ndr/ndr_%s.h' % base,
- 'gen_ndr/%s.h' % base]
+ result = []
+ for s in source:
+ base, ext = SCons.Util.splitext(str(s).split('/')[-1])
+ result.append('gen_ndr/ndr_%s.c' % base)
+ result.append('gen_ndr/ndr_%s.h' % base)
+ result.append('gen_ndr/%s.h' % base)
return result, source
pidl_builder = SCons.Builder.Builder(action='$PIDLCOM',
emitter = idl_emitter,
- src_suffix = '.idl',
- suffix='.c',
- scanner = idl_scanner)
+ src_suffix = '.idl',
+ scanner = idl_scanner)
def generate(env):
- env['PIDL'] = env.Detect('pidl') or './pidl/pidl'
+ env['PIDL'] = env.Detect(['./pidl/pidl', 'pidl'])
env['PIDLFLAGS'] = ['--outputdir', 'librpc/gen_ndr', '--ndr-header', '--ndr-parser', '--header']
env['PIDLCOM'] = '$PIDL $PIDLFLAGS -- $SOURCE'
env['BUILDERS']['NdrMarshaller'] = pidl_builder