From c172f60bd4f0eca3c546e851a6746ccb8426afcb Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Tue, 15 Nov 2016 12:54:49 -0800 Subject: [PATCH] Adds an environment variable that makes generate_buildfiles.py a no-op R=whesse@google.com Review URL: https://codereview.chromium.org/2507483002 . --- tools/generate_buildfiles.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/generate_buildfiles.py b/tools/generate_buildfiles.py index 391a15a07ea..9aa26e72588 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()