From 45ed1c5b5dbb63b8e51daac77344cbe312164fc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Thu, 29 Jul 2021 10:39:45 +0200 Subject: [PATCH] uorb_graph: improve module dependency search --- Tools/uorb_graph/create.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Tools/uorb_graph/create.py b/Tools/uorb_graph/create.py index 43c177e8bb..58b7f5ae51 100755 --- a/Tools/uorb_graph/create.py +++ b/Tools/uorb_graph/create.py @@ -445,16 +445,18 @@ class Graph(object): elif found_module_depends: # two tabs is a *sketchy* heuristic -- spacing isn't guaranteed by cmake; # ... but the hard-tabs *is* specified by PX4 coding standards, so it's likely to be consistent - if line.startswith('\t\t'): + if line.startswith('\t\t') and not line.strip().startswith('#'): depends = [dep.strip() for dep in line.split()] for name in depends: + log.debug(' >> {:}: found module dep: {:}' + .format(self._current_scope[-1].name, name)) self._current_scope[-1].add_dependency(name) if kwargs['merge_depends']: if (0 < len(self._scope_whitelist)) and self._current_scope[-1].name in self._scope_whitelist: # if we whitelist a module with dependencies, whitelist the dependencies, too self._scope_whitelist.add(name) - else: + elif line.strip() != "": found_module_depends = False ## done with the 'DEPENDS' section. words = line.split()