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:
Matthias Grob
2023-12-18 09:33:53 +01:00
committed by GitHub
co-authored by Beat Küng
parent f38fe24a98
commit 6ffc5a9eae
3 changed files with 15 additions and 2 deletions
+5 -1
View File
@@ -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)