| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 sys.argv[0] = os.path.abspath(sys.argv[0]) | 53 sys.argv[0] = os.path.abspath(sys.argv[0]) |
| 54 | 54 |
| 55 # Add any extra arguments. Needed by compiler/dart.gyp to build v8. | 55 # Add any extra arguments. Needed by compiler/dart.gyp to build v8. |
| 56 args = sys.argv[2:] | 56 args = sys.argv[2:] |
| 57 | 57 |
| 58 args += ['--depth', project_src] | 58 args += ['--depth', project_src] |
| 59 args += ['-I', './tools/gyp/common.gypi'] | 59 args += ['-I', './tools/gyp/common.gypi'] |
| 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-analysis.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 |
| 71 # Change into the dart directory as we want the project to be rooted here. | 71 # 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. | 72 # Also, GYP is very sensitive to exacly from where it is being run. |
| 73 os.chdir(dart_src) | 73 os.chdir(dart_src) |
| 74 | 74 |
| 75 args += [GetProjectGypFile(project_src)] | 75 args += [GetProjectGypFile(project_src)] |
| 76 | 76 |
| 77 # Generate the projects. | 77 # Generate the projects. |
| 78 sys.exit(gyp.main(args)) | 78 sys.exit(gyp.main(args)) |
| OLD | NEW |