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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 # Can happen when a target goes from having no sources, to having sources. | 190 # Can happen when a target goes from having no sources, to having sources. |
191 # It's created by the call to build_utils.Touch() below. | 191 # It's created by the call to build_utils.Touch() below. |
192 if options.incremental: | 192 if options.incremental: |
193 if os.path.exists(pdb_path) and not os.path.getsize(pdb_path): | 193 if os.path.exists(pdb_path) and not os.path.getsize(pdb_path): |
194 os.unlink(pdb_path) | 194 os.unlink(pdb_path) |
195 | 195 |
196 # Don't include the output directory in the initial set of args since it | 196 # Don't include the output directory in the initial set of args since it |
197 # being in a temp dir makes it unstable (breaks md5 stamping). | 197 # being in a temp dir makes it unstable (breaks md5 stamping). |
198 cmd = javac_cmd + ['-d', classes_dir] + java_files | 198 cmd = javac_cmd + ['-d', classes_dir] + java_files |
199 | 199 |
| 200 if cmd[0].endswith('jmake'): |
| 201 jar_args = '"%s"' % ' '.join(cmd[1:]) |
| 202 cmd = [cmd[0], '--jar-args', jar_args] |
| 203 |
200 # JMake prints out some diagnostic logs that we want to ignore. | 204 # JMake prints out some diagnostic logs that we want to ignore. |
201 # This assumes that all compiler output goes through stderr. | 205 # This assumes that all compiler output goes through stderr. |
202 stdout_filter = lambda s: '' | 206 stdout_filter = lambda s: '' |
203 if md5_check.PRINT_EXPLANATIONS: | 207 if md5_check.PRINT_EXPLANATIONS: |
204 stdout_filter = None | 208 stdout_filter = None |
205 | 209 |
206 attempt_build = lambda: build_utils.CheckOutput( | 210 attempt_build = lambda: build_utils.CheckOutput( |
207 cmd, | 211 cmd, |
208 print_stdout=options.chromium_code, | 212 print_stdout=options.chromium_code, |
209 stdout_filter=stdout_filter, | 213 stdout_filter=stdout_filter, |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 options, | 388 options, |
385 input_paths=input_paths, | 389 input_paths=input_paths, |
386 input_strings=javac_cmd, | 390 input_strings=javac_cmd, |
387 output_paths=output_paths, | 391 output_paths=output_paths, |
388 force=force, | 392 force=force, |
389 pass_changes=True) | 393 pass_changes=True) |
390 | 394 |
391 | 395 |
392 if __name__ == '__main__': | 396 if __name__ == '__main__': |
393 sys.exit(main(sys.argv[1:])) | 397 sys.exit(main(sys.argv[1:])) |
OLD | NEW |