diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-05-05 12:40:20 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-05-14 23:25:45 +1000 |
commit | 79bd6a6764079e982fb7e1ba1c24a9037e126175 (patch) | |
tree | ffc73e627b1e6f7cb7a5d9477490e6187bb83f4c /buildtools | |
parent | 9de745fd5327901846c9b8c6533b7e8156d71a30 (diff) | |
download | samba-79bd6a6764079e982fb7e1ba1c24a9037e126175.tar.gz samba-79bd6a6764079e982fb7e1ba1c24a9037e126175.tar.bz2 samba-79bd6a6764079e982fb7e1ba1c24a9037e126175.zip |
waf: Make waf handle IDL files from Samba3
For s3compat, we need to handle IDL files not in the current directory
(so the incoming file names have a directory prefix - so we must use
os.path.basename()).
We also need to be able to disable the addition of some IDL files into
the tables.c/tables.h - some of the Samba3 IDL files are in conflict
with Samba4.
Andrew Bartlett
Diffstat (limited to 'buildtools')
-rw-r--r-- | buildtools/wafsamba/samba_pidl.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/buildtools/wafsamba/samba_pidl.py b/buildtools/wafsamba/samba_pidl.py index bd8324f40f..b932f59d77 100644 --- a/buildtools/wafsamba/samba_pidl.py +++ b/buildtools/wafsamba/samba_pidl.py @@ -7,11 +7,13 @@ from samba_utils import * def SAMBA_PIDL(bld, pname, source, options='', output_dir='.', - symlink=False): + symlink=False, + generate_tables=True): '''Build a IDL file using pidl. This will produce up to 13 output files depending on the options used''' bname = source[0:-4]; # strip off the .idl suffix + bname = os.path.basename(bname) name = "%s_%s" % (pname, bname.upper()) if not SET_TARGET_TYPE(bld, name, 'PIDL'): @@ -86,7 +88,7 @@ def SAMBA_PIDL(bld, pname, source, real_outputdir = os.path.realpath(outdir) t.env.OUTPUTDIR = os_path_relpath(real_outputdir, os.path.dirname(bld.env.BUILD_DIRECTORY)) - if table_header_idx is not None: + if generate_tables and table_header_idx is not None: pidl_headers = LOCAL_CACHE(bld, 'PIDL_HEADERS') pidl_headers[name] = [bld.path.find_or_declare(out_files[table_header_idx])] @@ -97,10 +99,11 @@ Build.BuildContext.SAMBA_PIDL = SAMBA_PIDL def SAMBA_PIDL_LIST(bld, name, source, options='', output_dir='.', - symlink=False): + symlink=False, + generate_tables=True): '''A wrapper for building a set of IDL files''' for p in TO_LIST(source): - bld.SAMBA_PIDL(name, p, options=options, output_dir=output_dir, symlink=symlink) + bld.SAMBA_PIDL(name, p, options=options, output_dir=output_dir, symlink=symlink, generate_tables=generate_tables) Build.BuildContext.SAMBA_PIDL_LIST = SAMBA_PIDL_LIST @@ -116,6 +119,7 @@ def collect(self): self.bld.ASSERT(y is not None, 'Failed to find PIDL header %s' % name) y.post() for node in hd: + self.bld.ASSERT(node is not None, 'Got None as build node generating PIDL table for %s' % name) self.source += " " + node.relpath_gen(self.path) |