| 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 fnmatch | 7 import fnmatch |
| 8 import optparse | 8 import optparse |
| 9 import os | 9 import os |
| 10 import shutil | 10 import shutil |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 if options.javac_includes: | 229 if options.javac_includes: |
| 230 javac_includes = build_utils.ParseGypList(options.javac_includes) | 230 javac_includes = build_utils.ParseGypList(options.javac_includes) |
| 231 filtered_java_files = [] | 231 filtered_java_files = [] |
| 232 for f in java_files: | 232 for f in java_files: |
| 233 for include in javac_includes: | 233 for include in javac_includes: |
| 234 if fnmatch.fnmatch(f, include): | 234 if fnmatch.fnmatch(f, include): |
| 235 filtered_java_files.append(f) | 235 filtered_java_files.append(f) |
| 236 break | 236 break |
| 237 java_files = filtered_java_files | 237 java_files = filtered_java_files |
| 238 | 238 |
| 239 DoJavac( | 239 if len(java_files) != 0: |
| 240 classpath, | 240 DoJavac( |
| 241 classes_dir, | 241 classpath, |
| 242 options.chromium_code, | 242 classes_dir, |
| 243 java_files) | 243 options.chromium_code, |
| 244 java_files) |
| 244 | 245 |
| 245 if options.jar_path: | 246 if options.jar_path: |
| 246 if options.main_class or options.manifest_entry: | 247 if options.main_class or options.manifest_entry: |
| 247 if options.manifest_entry: | 248 if options.manifest_entry: |
| 248 entries = map(lambda e: e.split(":"), options.manifest_entry) | 249 entries = map(lambda e: e.split(":"), options.manifest_entry) |
| 249 else: | 250 else: |
| 250 entries = [] | 251 entries = [] |
| 251 manifest_file = os.path.join(temp_dir, 'manifest') | 252 manifest_file = os.path.join(temp_dir, 'manifest') |
| 252 CreateManifest(manifest_file, classpath, options.main_class, entries) | 253 CreateManifest(manifest_file, classpath, options.main_class, entries) |
| 253 else: | 254 else: |
| (...skipping 18 matching lines...) Expand all Loading... |
| 272 input_files + build_utils.GetPythonDependencies()) | 273 input_files + build_utils.GetPythonDependencies()) |
| 273 | 274 |
| 274 if options.stamp: | 275 if options.stamp: |
| 275 build_utils.Touch(options.stamp) | 276 build_utils.Touch(options.stamp) |
| 276 | 277 |
| 277 | 278 |
| 278 if __name__ == '__main__': | 279 if __name__ == '__main__': |
| 279 sys.exit(main(sys.argv[1:])) | 280 sys.exit(main(sys.argv[1:])) |
| 280 | 281 |
| 281 | 282 |
| OLD | NEW |