Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: build/android/gyp/javac.py

Issue 197693002: [Android] Lint build/android/gyp/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: now using extra_paths_list to avoid F0401s Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/android/gyp/jar_toc.py ('k') | build/android/gyp/lint.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 sys 10 import sys
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 build_utils.CheckOutput(javac_cmd, print_stdout=options.chromium_code) 67 build_utils.CheckOutput(javac_cmd, print_stdout=options.chromium_code)
68 68
69 record_path = '%s/javac.md5.stamp' % options.output_dir 69 record_path = '%s/javac.md5.stamp' % options.output_dir
70 md5_check.CallAndRecordIfStale( 70 md5_check.CallAndRecordIfStale(
71 Compile, 71 Compile,
72 record_path=record_path, 72 record_path=record_path,
73 input_paths=java_files + jar_inputs, 73 input_paths=java_files + jar_inputs,
74 input_strings=javac_cmd) 74 input_strings=javac_cmd)
75 75
76 76
77 def main(argv): 77 def main():
78 parser = optparse.OptionParser() 78 parser = optparse.OptionParser()
79 parser.add_option('--src-gendirs', 79 parser.add_option('--src-gendirs',
80 help='Directories containing generated java files.') 80 help='Directories containing generated java files.')
81 parser.add_option('--javac-includes', 81 parser.add_option('--javac-includes',
82 help='A list of file patterns. If provided, only java files that match' + 82 help='A list of file patterns. If provided, only java files that match' +
83 'one of the patterns will be compiled.') 83 'one of the patterns will be compiled.')
84 parser.add_option('--classpath', help='Classpath for javac.') 84 parser.add_option('--classpath', help='Classpath for javac.')
85 parser.add_option('--output-dir', help='Directory for javac output.') 85 parser.add_option('--output-dir', help='Directory for javac output.')
86 parser.add_option('--stamp', help='Path to touch on success.') 86 parser.add_option('--stamp', help='Path to touch on success.')
87 parser.add_option('--chromium-code', type='int', help='Whether code being ' 87 parser.add_option('--chromium-code', type='int', help='Whether code being '
88 'compiled should be built with stricter warnings for ' 88 'compiled should be built with stricter warnings for '
89 'chromium code.') 89 'chromium code.')
90 90
91 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja. 91 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
92 parser.add_option('--ignore', help='Ignored.') 92 parser.add_option('--ignore', help='Ignored.')
93 93
94 options, args = parser.parse_args() 94 options, args = parser.parse_args()
95 95
96 DoJavac(options, args) 96 DoJavac(options, args)
97 97
98 if options.stamp: 98 if options.stamp:
99 build_utils.Touch(options.stamp) 99 build_utils.Touch(options.stamp)
100 100
101 101
102 if __name__ == '__main__': 102 if __name__ == '__main__':
103 sys.exit(main(sys.argv)) 103 sys.exit(main())
104 104
105 105
OLDNEW
« no previous file with comments | « build/android/gyp/jar_toc.py ('k') | build/android/gyp/lint.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698