OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2013 The Chromium Authors. All rights reserved. | 3 # Copyright 2013 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 import optparse | 7 import optparse |
8 import os | 8 import os |
9 import shutil | 9 import shutil |
10 import re | 10 import re |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 for arg in options.java_srcjars: | 317 for arg in options.java_srcjars: |
318 java_srcjars += build_utils.ParseGypList(arg) | 318 java_srcjars += build_utils.ParseGypList(arg) |
319 options.java_srcjars = java_srcjars | 319 options.java_srcjars = java_srcjars |
320 | 320 |
321 if options.src_gendirs: | 321 if options.src_gendirs: |
322 options.src_gendirs = build_utils.ParseGypList(options.src_gendirs) | 322 options.src_gendirs = build_utils.ParseGypList(options.src_gendirs) |
323 | 323 |
324 options.javac_includes = build_utils.ParseGypList(options.javac_includes) | 324 options.javac_includes = build_utils.ParseGypList(options.javac_includes) |
325 options.jar_excluded_classes = ( | 325 options.jar_excluded_classes = ( |
326 build_utils.ParseGypList(options.jar_excluded_classes)) | 326 build_utils.ParseGypList(options.jar_excluded_classes)) |
327 return options, args | 327 |
| 328 java_files = [] |
| 329 for arg in args: |
| 330 # Interpret a path prefixed with @ as a file containing a list of sources. |
| 331 if arg.startswith('@'): |
| 332 with open(arg[1:]) as f: |
| 333 java_files.extend(l.strip() for l in f) |
| 334 else: |
| 335 java_files.append(arg) |
| 336 |
| 337 return options, java_files |
328 | 338 |
329 | 339 |
330 def main(argv): | 340 def main(argv): |
331 colorama.init() | 341 colorama.init() |
332 | 342 |
333 argv = build_utils.ExpandFileArgs(argv) | 343 argv = build_utils.ExpandFileArgs(argv) |
334 options, java_files = _ParseOptions(argv) | 344 options, java_files = _ParseOptions(argv) |
335 | 345 |
336 if options.src_gendirs: | 346 if options.src_gendirs: |
337 java_files += build_utils.FindInDirectories(options.src_gendirs, '*.java') | 347 java_files += build_utils.FindInDirectories(options.src_gendirs, '*.java') |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 options, | 418 options, |
409 input_paths=input_paths, | 419 input_paths=input_paths, |
410 input_strings=javac_cmd, | 420 input_strings=javac_cmd, |
411 output_paths=output_paths, | 421 output_paths=output_paths, |
412 force=force, | 422 force=force, |
413 pass_changes=True) | 423 pass_changes=True) |
414 | 424 |
415 | 425 |
416 if __name__ == '__main__': | 426 if __name__ == '__main__': |
417 sys.exit(main(sys.argv[1:])) | 427 sys.exit(main(sys.argv[1:])) |
OLD | NEW |