2018-07-24 13:42:23 -04:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
2018-09-02 14:00:25 -04:00
|
|
|
from __future__ import print_function
|
2018-07-24 13:42:23 -04:00
|
|
|
import os
|
|
|
|
import sys
|
2018-07-26 20:15:55 -04:00
|
|
|
import third_party
|
2018-09-02 17:37:14 -04:00
|
|
|
from util import build_path, enable_ansi_colors, run
|
|
|
|
|
|
|
|
enable_ansi_colors()
|
2018-07-24 13:42:23 -04:00
|
|
|
|
2018-07-26 20:15:55 -04:00
|
|
|
third_party.fix_symlinks()
|
2018-07-24 13:42:23 -04:00
|
|
|
|
2018-08-17 18:23:14 -04:00
|
|
|
ninja_args = sys.argv[1:]
|
2018-09-02 14:00:25 -04:00
|
|
|
if not "-C" in ninja_args:
|
|
|
|
if not os.path.isdir(build_path()):
|
|
|
|
print("Build directory '%s' does not exist." % build_path(),
|
|
|
|
"Run tools/setup.py")
|
|
|
|
sys.exit(1)
|
|
|
|
ninja_args = ["-C", build_path()] + ninja_args
|
2018-07-24 13:42:23 -04:00
|
|
|
|
2018-07-26 20:15:55 -04:00
|
|
|
run([third_party.ninja_path] + ninja_args,
|
|
|
|
env=third_party.google_env(),
|
|
|
|
quiet=True)
|