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

Unified Diff: tools/gyp_dart.py

Issue 1023893003: Make tools/gypdart independent of the directory from which it is called. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: move dir constants to top level Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gyp_dart.py
diff --git a/tools/gyp_dart.py b/tools/gyp_dart.py
index acec8ed6a48328caaa1ae347c96c3f22bc4ad55d..cce1b343e5a6bca43e5f7320b3352b2183a0a00a 100644
--- a/tools/gyp_dart.py
+++ b/tools/gyp_dart.py
@@ -12,8 +12,11 @@ import os
import subprocess
import sys
+SCRIPT_DIR = os.path.dirname(sys.argv[0])
+DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..'))
+
def execute(args):
- process = subprocess.Popen(args)
+ process = subprocess.Popen(args, cwd=DART_ROOT)
process.wait()
return process.returncode
@@ -23,11 +26,11 @@ def main():
component = sys.argv[1]
component_gyp_files = {
- 'all' : 'dart/dart.gyp',
- 'runtime' : 'dart/runtime/dart-runtime.gyp',
+ 'all' : 'dart.gyp',
+ 'runtime' : 'runtime/dart-runtime.gyp',
}
- args = ['python', '-S', 'dart/third_party/gyp/gyp_main.py',
- '--depth=dart', '-Idart/tools/gyp/all.gypi',
+ args = ['python', '-S', 'third_party/gyp/gyp_main.py',
+ '--depth=.', '-Itools/gyp/all.gypi',
component_gyp_files[component]]
if sys.platform == 'win32':
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698