OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
6 | 6 |
7 import os | 7 import os |
8 import sys | 8 import sys |
9 import platform | 9 import platform |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 | 60 |
61 if platform.system() == 'Linux': | 61 if platform.system() == 'Linux': |
62 # We need to fiddle with toplevel-dir to work around a GYP bug | 62 # We need to fiddle with toplevel-dir to work around a GYP bug |
63 # that breaks building v8 from compiler/dart.gyp. | 63 # that breaks building v8 from compiler/dart.gyp. |
64 args += ['--toplevel-dir', os.curdir] | 64 args += ['--toplevel-dir', os.curdir] |
65 args += ['--generator-output', project_src] | 65 args += ['--generator-output', project_src] |
66 else: | 66 else: |
67 # On at least the Mac, the toplevel-dir should be where the | 67 # On at least the Mac, the toplevel-dir should be where the |
68 # sources are. Otherwise, Xcode won't show sources correctly. | 68 # sources are. Otherwise, Xcode won't show sources correctly. |
69 args += ['--toplevel-dir', project_src] | 69 args += ['--toplevel-dir', project_src] |
70 | 70 |
Emily Fortuna
2012/08/06 17:04:08
nit: extra whitespace?
| |
71 | |
72 # On Win32 default to Visual Studio 2008 if no version is specified. | |
73 | |
Emily Fortuna
2012/08/06 17:04:08
extra whitespace?
| |
74 if sys.platform == 'win32': | |
75 if not os.environ.get('GYP_MSVS_VERSION'): | |
76 args.extend(['-G', 'msvs_version=2008']) | |
77 | |
71 # Change into the dart directory as we want the project to be rooted here. | 78 # Change into the dart directory as we want the project to be rooted here. |
72 # Also, GYP is very sensitive to exacly from where it is being run. | 79 # Also, GYP is very sensitive to exacly from where it is being run. |
73 os.chdir(dart_src) | 80 os.chdir(dart_src) |
74 | 81 |
75 args += [GetProjectGypFile(project_src)] | 82 args += [GetProjectGypFile(project_src)] |
76 | 83 |
77 # Generate the projects. | 84 # Generate the projects. |
78 sys.exit(gyp.main(args)) | 85 sys.exit(gyp.main(args)) |
OLD | NEW |