mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 09:53:34 +08:00
events: pass relative paths plus base path to source parser script (#22551)
* events: pass relative paths plus base path to source parser script to work around maximum Makefile command lenght limits. * events: correct cmake comment typo Co-authored-by: Beat Küng <beat-kueng@gmx.net> --------- Co-authored-by: Beat Küng <beat-kueng@gmx.net>
This commit is contained in:
co-authored by
Beat Küng
parent
f38fe24a98
commit
6ffc5a9eae
@@ -55,6 +55,10 @@ def main():
|
||||
metavar="PATH",
|
||||
nargs='*',
|
||||
help="one or more paths/files to source files to scan for events")
|
||||
parser.add_argument("-b", "--base-path",
|
||||
default=[""],
|
||||
metavar="PATH",
|
||||
help="path prefix for everything passed with --src-path")
|
||||
parser.add_argument("-j", "--json",
|
||||
nargs='?',
|
||||
const="events.json",
|
||||
@@ -84,7 +88,7 @@ def main():
|
||||
# canonicalize + remove duplicates
|
||||
src_paths = set()
|
||||
for path in args.src_path:
|
||||
src_paths.add(os.path.realpath(path))
|
||||
src_paths.add(os.path.realpath(os.path.join(args.base_path, path)))
|
||||
|
||||
if not scanner.ScanDir(src_paths, parser):
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user