Index: tools/generate_buildfiles.py |
diff --git a/tools/generate_buildfiles.py b/tools/generate_buildfiles.py |
index 391a15a07ea4358d84c0ed8783ebdaa8b4f7b0b2..9aa26e725881842e497fc6e87155c26c509bdfea 100644 |
--- a/tools/generate_buildfiles.py |
+++ b/tools/generate_buildfiles.py |
@@ -12,12 +12,17 @@ import utils |
SCRIPT_DIR = os.path.dirname(sys.argv[0]) |
DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..')) |
DART_USE_GN = "DART_USE_GN" |
+DART_DISABLE_BUILDFILES = "DART_DISABLE_BUILDFILES" |
def use_gn(): |
return DART_USE_GN in os.environ |
+def disable_buildfiles(): |
+ return DART_DISABLE_BUILDFILES in os.environ |
+ |
+ |
def execute(args): |
process = subprocess.Popen(args, cwd=DART_ROOT) |
process.wait() |
@@ -68,6 +73,9 @@ def parse_args(args): |
def main(argv): |
+ # Check the environment and become a no-op if directed. |
+ if disable_buildfiles(): |
+ return 0 |
options = parse_args(argv) |
if options.gn: |
return run_gn() |