OLD | NEW |
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 ''' A tool to setup the NaCl build env and invoke a command such as make ''' | 6 ''' A tool to setup the NaCl build env and invoke a command such as make ''' |
7 | 7 |
8 __author__ = 'gwink@google.com (Georges Winkenbach)' | 8 __author__ = 'gwink@google.com (Georges Winkenbach)' |
9 | 9 |
10 import optparse | 10 import optparse |
11 import os | 11 import os |
12 import re | |
13 import subprocess | 12 import subprocess |
14 import sys | 13 import sys |
15 | 14 |
16 # The default sdk platform to use if the user doesn't specify one. | 15 # The default sdk platform to use if the user doesn't specify one. |
17 __DEFAULT_SDK_PLATFORM = 'pepper_15' | 16 __DEFAULT_SDK_PLATFORM = 'pepper_15' |
18 | 17 |
19 # Usage info. | 18 # Usage info. |
20 __GLOBAL_HELP = '''%prog options [command] | 19 __GLOBAL_HELP = '''%prog options [command] |
21 | 20 |
22 set-nacl-env is a utility that sets up the environment required to build | 21 set-nacl-env is a utility that sets up the environment required to build |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 # Verify that we're running on a supported host. | 483 # Verify that we're running on a supported host. |
485 if sys.platform not in __PLATFORM_TO_HOST_MAP: | 484 if sys.platform not in __PLATFORM_TO_HOST_MAP: |
486 sys.stderr.write('Platform %s is not supported.' % sys.platform) | 485 sys.stderr.write('Platform %s is not supported.' % sys.platform) |
487 return 1 | 486 return 1 |
488 | 487 |
489 return GenerateBuildSettings(options, args) | 488 return GenerateBuildSettings(options, args) |
490 | 489 |
491 | 490 |
492 if __name__ == '__main__': | 491 if __name__ == '__main__': |
493 sys.exit(main(sys.argv[1:])) | 492 sys.exit(main(sys.argv[1:])) |
OLD | NEW |