Chromium Code Reviews| Index: third_party/WebKit/Source/build/scripts/gperf.py |
| diff --git a/third_party/WebKit/Source/build/scripts/gperf.py b/third_party/WebKit/Source/build/scripts/gperf.py |
| index 040cec67d3bb8b8d65a29f7693d8f04f28bba107..a75474c9175907e65a8b93c59f0ea84fd94213b5 100644 |
| --- a/third_party/WebKit/Source/build/scripts/gperf.py |
| +++ b/third_party/WebKit/Source/build/scripts/gperf.py |
| @@ -2,11 +2,23 @@ |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| -# Invokes gperf for the GN build. The first argument is the path to gperf. |
| +# Invokes gperf for the GN build. |
| +# Usage: gperf.py [--developer_dir PATH_TO_XCODE] gperf ... |
| # TODO(brettw) this can be removed once the run_executable rules have been |
| # checked in for the GN build. |
| +import os |
| import subprocess |
| import sys |
| -subprocess.check_call(sys.argv[1:]) |
| + |
| +def main(): |
| + argument_start = 1 |
| + if sys.argv[1] == "--developer_dir": |
|
Nico
2016/10/08 19:03:37
i'd use argparse. it's maybe two lines more code a
erikchen
2016/10/10 19:20:57
Done.
|
| + os.environ['DEVELOPER_DIR'] = sys.argv[2] |
| + argument_start = 3 |
| + |
| + subprocess.check_call(sys.argv[argument_start:]) |
| + |
| +if __name__ == '__main__': |
| + main() |