OLD | NEW |
---|---|
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 template("shim_headers") { | 5 template("shim_headers") { |
6 action_name = "gen_${target_name}" | 6 action_name = "gen_${target_name}" |
7 config_name = "${target_name}_config" | 7 config_name = "${target_name}_config" |
8 shim_headers_path = "${root_gen_dir}/shim_headers/${target_name}" | 8 shim_headers_path = "${root_gen_dir}/shim_headers/${target_name}" |
9 | 9 |
10 config(config_name) { | 10 config(config_name) { |
11 include_dirs = [ shim_headers_path ] | 11 include_dirs = [ shim_headers_path ] |
12 } | 12 } |
13 | 13 |
14 action(action_name) { | 14 action(action_name) { |
15 script = "//tools/generate_shim_headers/generate_shim_headers.py" | 15 script = "//tools/generate_shim_headers/generate_shim_headers.py" |
16 args = [ | 16 args = [ |
17 "--generate", | 17 "--generate", |
Lei Zhang
2017/05/18 23:42:04
BTW, the indentation seems a bit off, compared to,
Paweł Hajdan Jr.
2017/05/22 12:52:25
Oh, I was going to blame git cl format but after m
| |
18 "--headers-root", | 18 "--headers-root", |
19 rebase_path(invoker.root_path), | 19 rebase_path(invoker.root_path), |
20 "--output-directory", | 20 "--output-directory", |
21 rebase_path(shim_headers_path), | 21 rebase_path(shim_headers_path), |
22 ] + invoker.headers | 22 ] |
23 if (defined(invoker.prefix)) { | |
24 args += [ "--prefix", invoker.prefix ] | |
25 } | |
26 args += invoker.headers | |
23 | 27 |
24 outputs = process_file_template(invoker.headers, | 28 outputs = process_file_template(invoker.headers, |
25 "${shim_headers_path}/{{source_file_part}}") | 29 "${shim_headers_path}/{{source_file_part}}") |
26 } | 30 } |
27 | 31 |
28 group(target_name) { | 32 group(target_name) { |
29 deps = [ | 33 deps = [ |
30 ":${action_name}", | 34 ":${action_name}", |
31 ] | 35 ] |
32 all_dependent_configs = [ ":${config_name}" ] | 36 all_dependent_configs = [ ":${config_name}" ] |
33 } | 37 } |
34 } | 38 } |
OLD | NEW |