| OLD | NEW | 
|---|
|  | (Empty) | 
| 1 #!/usr/bin/env python |  | 
| 2 |  | 
| 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 |  | 
| 5 # BSD-style license that can be found in the LICENSE file. |  | 
| 6 |  | 
| 7 import os |  | 
| 8 import sys |  | 
| 9 |  | 
| 10 # Change into the dart directory as we want the project to be rooted here. |  | 
| 11 runtime_src = os.path.join(os.path.dirname(sys.argv[0]), os.pardir) |  | 
| 12 gclient_src = os.path.join(runtime_src, os.pardir) |  | 
| 13 project_src = os.path.join(gclient_src, sys.argv[1]) |  | 
| 14 os.chdir(project_src) |  | 
| 15 |  | 
| 16 # Add gyp to the imports and if needed get it from the third_party location |  | 
| 17 # inside the standalone dart gclient checkout. |  | 
| 18 try: |  | 
| 19   import gyp |  | 
| 20 except ImportError, e: |  | 
| 21   sys.path.append(os.path.join(os.pardir, 'third_party', 'gyp', 'pylib')) |  | 
| 22   import gyp |  | 
| 23 |  | 
| 24 if __name__ == '__main__': |  | 
| 25   args = ['--depth', '.'] |  | 
| 26   args += ['dart-runtime.gyp'] |  | 
| 27 |  | 
| 28   # Generate the projects. |  | 
| 29   sys.exit(gyp.main(args)) |  | 
| OLD | NEW | 
|---|