MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / RelativeProjectPath

Function RelativeProjectPath

tools/targets/eclipse.py:451–464  ·  view source on GitHub ↗
(env, path)

Source from the content-addressed store, hash-verified

449
450
451def RelativeProjectPath(env, path):
452 project_root = os.path.abspath(env['BSP_ROOT'])
453 rtt_root = os.path.abspath(env['RTT_ROOT'])
454
455 if path.startswith(project_root):
456 return _make_path_relative(project_root, path)
457
458 if path.startswith(rtt_root):
459 return 'rt-thread/' + _make_path_relative(rtt_root, path)
460
461 # TODO add others folder
462 print('ERROR: the ' + path + ' not support')
463
464 return path
465
466
467def HandleExcludingOption(entry, sourceEntries, excluding):

Callers 2

HandleToolOptionFunction · 0.85
GenExcludingFunction · 0.85

Calls 1

_make_path_relativeFunction · 0.90

Tested by

no test coverage detected