diff options
author | Evan Martin <martine@danga.com> | 2012-04-10 23:25:02 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-04-10 23:25:02 (GMT) |
commit | 39bf6c94701d089f70b761ce8247356df751203d (patch) | |
tree | 6fbf94368e917ee2c0ae9f669b087fc035d1c8be /bootstrap.py | |
parent | 3e4c0bcef56dceceb28b0ef51d06dd474d6e8480 (diff) | |
parent | 82ed9f4df0f5da81ef355f0ae5a1e958929598da (diff) | |
download | Ninja-39bf6c94701d089f70b761ce8247356df751203d.zip Ninja-39bf6c94701d089f70b761ce8247356df751203d.tar.gz Ninja-39bf6c94701d089f70b761ce8247356df751203d.tar.bz2 |
Merge pull request #265 from mathstuf/dev/verbose-bootstrap
Allow the bootstrap to be verbose
Diffstat (limited to 'bootstrap.py')
-rwxr-xr-x | bootstrap.py | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/bootstrap.py b/bootstrap.py index 9d00ca8..1df423d 100755 --- a/bootstrap.py +++ b/bootstrap.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +from optparse import OptionParser import sys import os import glob @@ -20,6 +21,11 @@ import errno import shlex import subprocess +parser = OptionParser() +parser.add_option('--verbose', action='store_true', + help='enable verbose build',) +(options, conf_args) = parser.parse_args() + def run(*args, **kwargs): try: subprocess.check_call(*args, **kwargs) @@ -81,11 +87,19 @@ if vcdir: args.extend(['/link', '/out:' + binary]) else: args.extend(['-o', binary]) + +if options.verbose: + print ' '.join(args) + run(args) +verbose = [] +if options.verbose: + verbose = ['-v'] + print 'Building ninja using itself...' -run([sys.executable, 'configure.py'] + sys.argv[1:]) -run(['./' + binary]) +run([sys.executable, 'configure.py'] + conf_args) +run(['./' + binary] + verbose) os.unlink(binary) print 'Done!' |