diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-03-17 21:53:29 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-06 20:26:40 +1000 |
commit | 7ed65d2e126161f269ea823d2fa02e79b779fc63 (patch) | |
tree | 614ee0cf71a12bbcd6c6f5a7d6b45a4055b32c61 /buildtools/wafsamba/samba_pidl.py | |
parent | 36e6d11dceb7af9cccdff3c631745427e31b8835 (diff) | |
download | samba-7ed65d2e126161f269ea823d2fa02e79b779fc63.tar.gz samba-7ed65d2e126161f269ea823d2fa02e79b779fc63.tar.bz2 samba-7ed65d2e126161f269ea823d2fa02e79b779fc63.zip |
build: result of hack session with ita
Diffstat (limited to 'buildtools/wafsamba/samba_pidl.py')
-rw-r--r-- | buildtools/wafsamba/samba_pidl.py | 44 |
1 files changed, 31 insertions, 13 deletions
diff --git a/buildtools/wafsamba/samba_pidl.py b/buildtools/wafsamba/samba_pidl.py index 9269566111..bea97acf03 100644 --- a/buildtools/wafsamba/samba_pidl.py +++ b/buildtools/wafsamba/samba_pidl.py @@ -40,33 +40,51 @@ def SAMBA_PIDL(bld, pname, source, options=''): t.env.OPTIONS = options t.env.OUTPUTDIR = bld.BUILD_PATH(gen_ndr_dir) - # I'm creating the list of headers for the tables rule here. - # then the tables rule itself is below - #t.collect_headers = [bld.path.find_or_declare(out_files[1])] #, bld.path.find_or_declare(out_files[6])] - #if name.rfind('PIDL') > -1: - # print name, "t.coll", t.collect_headers - #print name, "so bld.PIDL_STUFF is defined", id(bld) try: bld.PIDL_STUFF[name] = [bld.path.find_or_declare(out_files[1])] except AttributeError: bld.PIDL_STUFF = {} bld.PIDL_STUFF[name] = [bld.path.find_or_declare(out_files[1])] - # I think I need to build this list as absolute paths, then - # re-do as relative paths in the tables rule t.more_includes = '#' + bld.path.relpath_gen(bld.srcnode) - #if not 'PIDL_HEADERS' in bld.env: - # bld.env.PIDL_HEADERS = [] - #bld.env.PIDL_HEADERS.append(gen_ndr_dir + 'ndr_%s.h' % bname) +Build.BuildContext.SAMBA_PIDL = SAMBA_PIDL +def SAMBA_PIDL_TDR(bld, pname, source, options=''): + '''Build a IDL file using pidl. + This will only produce the header and tdr parser''' -Build.BuildContext.SAMBA_PIDL = SAMBA_PIDL + bname = source[0:-4]; + name = "PIDL_%s" % bname.upper() + + if not SET_TARGET_TYPE(bld, name, 'PIDL'): + return + + bld.SET_BUILD_GROUP('build_source') + + out_files = [] + out_files.append('tdr_%s.c' % bname) + out_files.append('tdr_%s.h' % bname) + + pidl = bld.srcnode.find_resource('pidl/pidl').relpath_gen(bld.path) + t = bld(rule='${PIDL} ${PIDL_BUILD_TYPES} ${OPTIONS} --outputdir ${TGT[0].parent.abspath(env)} -- ${SRC[0].abspath(env)}', + ext_out = '.c', + before = 'cc', + shell = False, + source=source, + target = out_files, + name=name) + + t.env.PIDL = "../../pidl/pidl" + t.env.PIDL_BUILD_TYPES = '--header --tdr-parser' + t.env.OPTIONS = options + +Build.BuildContext.SAMBA_PIDL_TDR = SAMBA_PIDL_TDR ################################################################# # define a set of Samba PIDL targets -def SAMBA_PIDL_LIST(bld, name, source, options=''): +def SAMBA_PIDL_LIST(bld, name, source,options=''): for p in source.split(): bld.SAMBA_PIDL(name, p, options) Build.BuildContext.SAMBA_PIDL_LIST = SAMBA_PIDL_LIST |