1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

Rename :all target to :default

This commit is contained in:
Ryan Dahl 2018-08-17 18:23:14 -04:00 committed by Bert Belder
parent 3640ea4c0d
commit 81b042c8db
No known key found for this signature in database
GPG key ID: 7A77887B2E2ED461
4 changed files with 4 additions and 26 deletions

View file

@ -298,8 +298,6 @@ before_build:
# Mark files that are produced during the build, and are known to ninja, as
# needed. We obtain this list by dry-running `ninja -t clean`.
# N.b.: we deliberately do *not* pass `:all` to the clean command. It misses
# some important files, e.g. .exe and .pdb files.
- ps: |-
$outputs = ninja -C $env:DENO_BUILD_PATH -n -t clean -g |
where { $_ -match "^Remove (.*)$" } |
@ -327,7 +325,7 @@ after_test:
# Verify that the build is fully up-to-date. Running ninja should be a no-op.
# This catches erroneous file cleanup, and incorrectly set up build deps.
- ps: |-
$out = ninja -C $env:DENO_BUILD_PATH -n -d explain :all
$out = ninja -C $env:DENO_BUILD_PATH -n -d explain
if ($out -notcontains "ninja: no work to do.") {
throw "Build should be up-to-date but isnt't."
}

View file

@ -6,7 +6,7 @@ import("//build_extra/flatbuffers/rust/rust_flatbuffer.gni")
import("//build_extra/deno.gni")
import("//build_extra/rust/rust.gni")
group("all") {
group("default") {
testonly = true
deps = [
":deno",

View file

@ -94,7 +94,7 @@ To build:
Other useful commands:
# Call ninja manually.
./third_party/depot_tools/ninja -C out/debug :all
./third_party/depot_tools/ninja -C out/debug
# Build a release binary.
DENO_BUILD_MODE=release ./tools/build.py :deno
# List executable targets.

View file

@ -14,27 +14,7 @@ if not os.path.isdir(build_path()):
sys.exit(1)
os.chdir(build_path())
def maybe_add_default_target(args):
lines = run_output(
[third_party.ninja_path, "-t", "targets"],
env=third_party.google_env(),
quiet=True).split("\n")
targets = [l.rsplit(":", 1)[0] for l in lines]
deno_targets = [target for target in targets if target.startswith(":")]
deno_targets += [target.lstrip(":") for target in deno_targets]
target_specified = False
for a in args:
if a in deno_targets:
target_specified = True
break
if not target_specified:
args += [":all"]
return args
ninja_args = maybe_add_default_target(sys.argv[1:])
ninja_args = sys.argv[1:]
run([third_party.ninja_path] + ninja_args,
env=third_party.google_env(),