blob: a2e5a03a9a615c7aed7c72f3c845be964515c168 [file] [log] [blame]
Primiano Tucci69132a12020-02-07 22:33:06 +00001# Copyright (C) 2020 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15import("perfetto.gni")
16
17# This template, when instantiated, runs
18# tools/install-build-deps --check-only ${args}.
19# It's used to ensure that deps are current before building.
20template("perfetto_check_build_deps") {
Joel Fernandes090d2712020-02-24 13:53:27 -050021 if (perfetto_build_standalone && !skip_buildtools_check) {
Primiano Tucci69132a12020-02-07 22:33:06 +000022 action(target_name) {
23 out_file = "$target_gen_dir/$target_name.check"
24 out_file_path = rebase_path(out_file, root_build_dir)
25 script = "${perfetto_root_path}tools/install-build-deps"
26 args = [ "--check-only=${out_file_path}" ]
27 args += invoker.args
28 inputs = []
29 if (defined(invoker.inputs)) {
30 inputs += invoker.inputs
31 }
32 outputs = [ out_file ]
33 }
34 } else {
35 group(target_name) {
36 not_needed(invoker, "*")
37 }
38 }
39}