OLD | NEW |
(Empty) | |
| 1 # Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 template("vulcanize") { |
| 6 action(target_name) { |
| 7 script = "//chrome/browser/resources/vulcanize_gn.py" |
| 8 |
| 9 # Declare dependencies to all involved tools. |
| 10 inputs = [ |
| 11 "//chrome/browser/resources/unpack_pak.py", |
| 12 "//third_party/node/node_modules.tar.gz.sha1", |
| 13 ] |
| 14 |
| 15 if (is_linux) { |
| 16 inputs += [ "//third_party/node/linux/node-linux-x64.tar.gz.sha1" ] |
| 17 } |
| 18 if (is_win) { |
| 19 inputs += [ "//third_party/node/win/node.exe.sha1" ] |
| 20 } |
| 21 if (is_mac) { |
| 22 inputs += [ "//third_party/node/mac/node-darwin-x64.tar.gz.sha1" ] |
| 23 } |
| 24 |
| 25 depfile = "${target_gen_dir}/${target_name}.d" |
| 26 |
| 27 outputs = [ |
| 28 "$target_gen_dir/${invoker.html_out_file}", |
| 29 "$target_gen_dir/${invoker.js_out_file}", |
| 30 ] |
| 31 deps = invoker.deps |
| 32 |
| 33 # Note that we have to manually pass the sources to our script if the |
| 34 # script needs them as inputs. |
| 35 args = [ |
| 36 "--host", |
| 37 invoker.host, |
| 38 "--html_in_file", |
| 39 invoker.html_in_file, |
| 40 "--html_out_file", |
| 41 invoker.html_out_file, |
| 42 "--js_out_file", |
| 43 invoker.js_out_file, |
| 44 "--input_type", |
| 45 invoker.input_type, |
| 46 "--input", |
| 47 invoker.input, |
| 48 "--out_folder", |
| 49 rebase_path(target_gen_dir, root_build_dir), |
| 50 "--depfile", |
| 51 rebase_path(depfile, root_build_dir), |
| 52 ] |
| 53 } |
| 54 } |
OLD | NEW |