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

Side by Side Diff: native_client_sdk/src/build_tools/build_examples.py

Issue 11882012: Convert all project to use common.mk (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 7 years, 11 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 | « no previous file | native_client_sdk/src/build_tools/build_sdk.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 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import optparse 6 import optparse
7 import os 7 import os
8 import sys 8 import sys
9 9
10 import build_sdk 10 import build_sdk
11 import build_utils 11 import build_utils
12 import test_sdk 12 import test_sdk
13 13
14 sys.path.append(os.path.join(build_sdk.SDK_SRC_DIR, 'tools')) 14 sys.path.append(os.path.join(build_sdk.SDK_SRC_DIR, 'tools'))
15 import getos 15 import getos
16 16
17 17
18 def main(args): 18 def main(args):
19 parser = optparse.OptionParser() 19 parser = optparse.OptionParser()
20 parser.add_option('--copy',
21 help='Only copy the files, don\'t build.',
22 action='store_true' )
20 parser.add_option('--clobber-examples', 23 parser.add_option('--clobber-examples',
21 help='Don\'t examples directory before copying new files', 24 help='Don\'t examples directory before copying new files',
22 action='store_true' ) 25 action='store_true' )
23 parser.add_option('--test-examples', 26 parser.add_option('--test-examples',
24 help='Run the pyauto tests for examples.', action='store_true') 27 help='Run the pyauto tests for examples.', action='store_true')
25 parser.add_option('--experimental', 28 parser.add_option('--experimental',
26 help='build experimental examples and libraries', action='store_true') 29 help='build experimental examples and libraries', action='store_true')
27 parser.add_option('-t', '--toolchain', 30 parser.add_option('-t', '--toolchain',
28 help='Build using toolchain. Can be passed more than once.', 31 help='Build using toolchain. Can be passed more than once.',
29 action='append') 32 action='append')
(...skipping 11 matching lines...) Expand all
41 if invalid_toolchains: 44 if invalid_toolchains:
42 print 'Ignoring invalid toolchains: %s' % (', '.join(invalid_toolchains),) 45 print 'Ignoring invalid toolchains: %s' % (', '.join(invalid_toolchains),)
43 toolchains = list(set(options.toolchain) - invalid_toolchains) 46 toolchains = list(set(options.toolchain) - invalid_toolchains)
44 47
45 pepper_ver = str(int(build_utils.ChromeMajorVersion())) 48 pepper_ver = str(int(build_utils.ChromeMajorVersion()))
46 pepperdir = os.path.join(build_sdk.OUT_DIR, 'pepper_' + pepper_ver) 49 pepperdir = os.path.join(build_sdk.OUT_DIR, 'pepper_' + pepper_ver)
47 platform = getos.GetPlatform() 50 platform = getos.GetPlatform()
48 51
49 build_sdk.options = options 52 build_sdk.options = options
50 53
54 build_sdk.BuildStepCopyBuildHelpers(pepperdir, platform)
51 build_sdk.BuildStepCopyExamples(pepperdir, toolchains, options.experimental, 55 build_sdk.BuildStepCopyExamples(pepperdir, toolchains, options.experimental,
52 options.clobber_examples) 56 options.clobber_examples)
57 test_sdk.BuildStepCopyTests(pepperdir, toolchains, options.experimental,
58 options.clobber_examples)
59 if options.copy:
60 return 0
61
53 # False = don't clean after building the libraries directory. 62 # False = don't clean after building the libraries directory.
54 build_sdk.BuildStepBuildLibraries(pepperdir, platform, 'src', False) 63 build_sdk.BuildStepBuildLibraries(pepperdir, platform, 'src', False)
55 test_sdk.BuildStepBuildExamples(pepperdir, platform) 64 test_sdk.BuildStepBuildExamples(pepperdir, platform)
56 test_sdk.BuildStepCopyTests(pepperdir, toolchains, options.experimental,
57 options.clobber_examples)
58 test_sdk.BuildStepBuildTests(pepperdir, platform) 65 test_sdk.BuildStepBuildTests(pepperdir, platform)
59 if options.test_examples: 66 if options.test_examples:
60 test_sdk.BuildStepRunPyautoTests(pepperdir, platform, pepper_ver) 67 test_sdk.BuildStepRunPyautoTests(pepperdir, platform, pepper_ver)
61 68
62 return 0 69 return 0
63 70
64 71
65 if __name__ == '__main__': 72 if __name__ == '__main__':
66 sys.exit(main(sys.argv)) 73 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | native_client_sdk/src/build_tools/build_sdk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698