projects.py: Warn about modules which were not found

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2024-06-04 08:56:21 +00:00
commit 6109703ccb

View file

@ -85,6 +85,9 @@ class Projects(object):
if self.opt_debug:
print("DEBUG: ", *objs, file = sys.stderr)
def warn(self, *objs):
print("WARNING: ", *objs, file = sys.stderr)
def err(self, *objs):
print("ERR: ", *objs, file = sys.stderr)
@ -754,7 +757,10 @@ class Projects(object):
scope = 2, add_self=True, names_only=True)
r = ''
for m in reversed(deps):
r = r + ' -I' + self.proj_dir(m) + '/include'
try:
r = r + ' -I' + self.proj_dir(m) + '/include'
except:
self.warn('No include path for module "{}", ignoring'.format(m))
print(r[1:])
def cmd_path(self, args_):
@ -827,7 +833,11 @@ class Projects(object):
args = parser.parse_args(args_)
r = []
for m in args.module:
r.append(self.proj_dir(m))
try:
r.append(self.proj_dir(m))
except:
self.warn('No project directory for module "{}"'.format(module))
continue
print(' '.join(r))
def cmd_htdocs_dir(self, args_):