Index: Source/bindings/scripts/compute_interfaces_info_individual.py |
diff --git a/Source/bindings/scripts/compute_interfaces_info_individual.py b/Source/bindings/scripts/compute_interfaces_info_individual.py |
index 65bfc1e85dd6d13cc185524055e8aa4fe27ff43e..2d9beab220e0d149d69ac75840cc4a6a5e12bc1a 100755 |
--- a/Source/bindings/scripts/compute_interfaces_info_individual.py |
+++ b/Source/bindings/scripts/compute_interfaces_info_individual.py |
@@ -58,11 +58,14 @@ partial_interface_files = defaultdict(lambda: { |
def parse_options(): |
usage = 'Usage: %prog [options] [generated1.idl]...' |
parser = optparse.OptionParser(usage=usage) |
+ parser.add_option('--component-dir', help='component directory') |
parser.add_option('--idl-files-list', help='file listing IDL files') |
parser.add_option('--interfaces-info-file', help='output pickle file') |
parser.add_option('--write-file-only-if-changed', type='int', help='if true, do not write an output file if it would be identical to the existing one, which avoids unnecessary rebuilds in ninja') |
options, args = parser.parse_args() |
+ if options.component_dir is None: |
+ parser.error('Must specify a component directory using --component-dir.') |
if options.interfaces_info_file is None: |
parser.error('Must specify an output file using --interfaces-info-file.') |
if options.idl_files_list is None: |
@@ -100,7 +103,7 @@ def add_paths_to_partials_dict(partial_interface_name, full_path, this_include_p |
paths_dict['include_paths'].append(this_include_path) |
-def compute_info_individual(idl_filename): |
+def compute_info_individual(idl_filename, component_dir): |
full_path = os.path.realpath(idl_filename) |
idl_file_contents = get_file_contents(full_path) |
@@ -124,6 +127,7 @@ def compute_info_individual(idl_filename): |
left_interfaces, right_interfaces = get_implements_from_idl(idl_file_contents, interface_name) |
interfaces_info[interface_name] = { |
+ 'component_dir': component_dir, |
'extended_attributes': extended_attributes, |
'full_path': full_path, |
'implemented_as': implemented_as, |
@@ -172,7 +176,7 @@ def main(): |
# Information is stored in global variables interfaces_info and |
# partial_interface_files. |
for idl_filename in idl_files: |
- compute_info_individual(idl_filename) |
+ compute_info_individual(idl_filename, options.component_dir) |
write_pickle_file(options.interfaces_info_file, |
info_individual(), |