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

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

Issue 341823003: Add depfile support to android build scripts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « build/android/gn/zip.py ('k') | build/android/gyp/jar_toc.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 optparse 7 import optparse
8 import os 8 import os
9 import sys 9 import sys
10 10
(...skipping 13 matching lines...) Expand all
24 '-I', options.include_path, 24 '-I', options.include_path,
25 '-o', options.output, 25 '-o', options.output,
26 options.template 26 options.template
27 ]) 27 ])
28 28
29 build_utils.CheckOutput(gcc_cmd) 29 build_utils.CheckOutput(gcc_cmd)
30 30
31 31
32 def main(): 32 def main():
33 parser = optparse.OptionParser() 33 parser = optparse.OptionParser()
34 build_utils.AddDepfileOption(parser)
35
34 parser.add_option('--include-path', help='Include path for gcc.') 36 parser.add_option('--include-path', help='Include path for gcc.')
35 parser.add_option('--template', help='Path to template.') 37 parser.add_option('--template', help='Path to template.')
36 parser.add_option('--output', help='Path for generated file.') 38 parser.add_option('--output', help='Path for generated file.')
37 parser.add_option('--stamp', help='Path to touch on success.') 39 parser.add_option('--stamp', help='Path to touch on success.')
38 parser.add_option('--defines', help='Pre-defines macros', action='append') 40 parser.add_option('--defines', help='Pre-defines macros', action='append')
39 41
40 options, _ = parser.parse_args() 42 options, _ = parser.parse_args()
41 43
42 DoGcc(options) 44 DoGcc(options)
43 45
46 if options.depfile:
47 build_utils.WriteDepfile(
48 options.depfile,
49 build_utils.GetPythonDependencies())
50
44 if options.stamp: 51 if options.stamp:
45 build_utils.Touch(options.stamp) 52 build_utils.Touch(options.stamp)
46 53
47 54
48 if __name__ == '__main__': 55 if __name__ == '__main__':
49 sys.exit(main()) 56 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/gn/zip.py ('k') | build/android/gyp/jar_toc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698