diff options
author | Josh Morman <mormjb@gmail.com> | 2020-01-14 11:58:31 -0500 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2020-01-24 23:49:10 -0800 |
commit | 2f8c0092ae0ac25387e0f9b7e36c8850d3d64229 (patch) | |
tree | 282b97fe24db2b842313905bdf5dcfd9562f85df /gr-utils/python/blocktool/core/parseheader.py | |
parent | a11d2e36c63a3011ab2b3407798b766068e31d8f (diff) |
blocktool: add include paths option
Diffstat (limited to 'gr-utils/python/blocktool/core/parseheader.py')
-rw-r--r-- | gr-utils/python/blocktool/core/parseheader.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gr-utils/python/blocktool/core/parseheader.py b/gr-utils/python/blocktool/core/parseheader.py index 7b1e743554..2ff4378fe6 100644 --- a/gr-utils/python/blocktool/core/parseheader.py +++ b/gr-utils/python/blocktool/core/parseheader.py @@ -51,11 +51,13 @@ class BlockHeaderParser(BlockTool): name = 'Block Parse Header' description = 'Create a parsed output from a block header file' - def __init__(self, file_path=None, blocktool_comments=False, **kwargs): + def __init__(self, file_path=None, blocktool_comments=False, include_paths=None, **kwargs): """ __init__ """ BlockTool.__init__(self, **kwargs) self.parsed_data = {} self.addcomments = blocktool_comments + if (include_paths): + self.include_paths = [p.strip() for p in include_paths.split(',')] if not os.path.isfile(file_path): raise BlockToolException('file does not exist') file_path = os.path.abspath(file_path) @@ -104,6 +106,7 @@ class BlockHeaderParser(BlockTool): xml_generator_config = parser.xml_generator_configuration_t( xml_generator_path=generator_path, xml_generator=generator_name, + include_paths=self.include_paths, compiler='gcc') decls = parser.parse( [self.target_file], xml_generator_config) |