summaryrefslogtreecommitdiff
path: root/source4/build/scons
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2005-09-22 23:30:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:45 -0500
commit92d74c340843f52aaced18dcc243965387fcaedb (patch)
tree064cc5336f2f901181e825c0a4c8294dd8c338ff /source4/build/scons
parentf59d4351272233727511b17ba7223a1be90f3ec6 (diff)
downloadsamba-92d74c340843f52aaced18dcc243965387fcaedb.tar.gz
samba-92d74c340843f52aaced18dcc243965387fcaedb.tar.bz2
samba-92d74c340843f52aaced18dcc243965387fcaedb.zip
r10436: Some thoughts on getting pidl working in scons.
(This used to be commit f1688a8066cd787aa630714ffc161eb0f30414f1)
Diffstat (limited to 'source4/build/scons')
-rw-r--r--source4/build/scons/pidl.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/build/scons/pidl.py b/source4/build/scons/pidl.py
index 68a2c2040e..c7d734a4fa 100644
--- a/source4/build/scons/pidl.py
+++ b/source4/build/scons/pidl.py
@@ -10,7 +10,13 @@ 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]))
+ result = ['gen_ndr/%s.c' % base, 'gen_ndr/%s.h' % base]
+ return result
+
pidl_builder = SCons.Builder.Builder(action='$PIDLCOM',
+ emitter = idl_emitter,
src_suffix = '.idl',
suffix='.c',
scanner = idl_scanner)
@@ -18,7 +24,7 @@ pidl_builder = SCons.Builder.Builder(action='$PIDLCOM',
def generate(env):
env['PIDL'] = env.Detect('pidl') or './pidl/pidl'
env['PIDLFLAGS'] = []
- env['PIDLCOM'] = 'CPP=$CPP $PIDL $PIDLFLAGS -- $SOURCE'
+ env['PIDLCOM'] = '$PIDL $PIDLFLAGS -- $SOURCE'
env['BUILDERS']['NdrMarshaller'] = pidl_builder
def exists(env):