16 parser = argparse.ArgumentParser(
17 'Merges sources of a Dart target and its dependencies', fromfile_prefix_chars=
'@'
20 '--output', help=
'Path to output the final list', type=argparse.FileType(
'w'), required=
True
24 help=
'Path to the depfile to generate',
25 type=argparse.FileType(
'w'),
30 help=
'Sources of this target',
33 parser.add_argument(
'--source_lists', help=
'Files containing lists of Dart sources', nargs=
'*')
34 args = parser.parse_args()
36 args.depfile.write(
'{}: {}\n'.
format(args.output.name,
' '.join(args.source_lists)))
39 all_sources = set(args.sources)
40 for f
in args.source_lists:
41 with open(f,
'r')
as f:
42 all_sources.update(json.load(f))
43 json.dump(sorted(all_sources), args.output)
uint32_t uint32_t * format