| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 # Instantiate grit. This will produce a script target to run grit, and a | 5 # Instantiate grit. This will produce a script target to run grit, and a |
| 6 # static library that compiles the .cc files. | 6 # static library that compiles the .cc files. |
| 7 # | 7 # |
| 8 # Parameters | 8 # Parameters |
| 9 # | 9 # |
| 10 # source (required) | 10 # source (required) |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 grit_inputs = [ invoker.source ] | 221 grit_inputs = [ invoker.source ] |
| 222 | 222 |
| 223 assert_files_flags = [] | 223 assert_files_flags = [] |
| 224 | 224 |
| 225 # We want to make sure the declared outputs actually match what Grit is | 225 # We want to make sure the declared outputs actually match what Grit is |
| 226 # writing. We write the list to a file (some of the output lists are long | 226 # writing. We write the list to a file (some of the output lists are long |
| 227 # enough to not fit on a Windows command line) and ask Grit to verify those | 227 # enough to not fit on a Windows command line) and ask Grit to verify those |
| 228 # are the actual outputs at runtime. | 228 # are the actual outputs at runtime. |
| 229 asserted_list_file = "$target_out_dir/${target_name}_expected_outputs.txt" | 229 asserted_list_file = "$target_out_dir/${target_name}_expected_outputs.txt" |
| 230 write_file(asserted_list_file, | 230 write_file(asserted_list_file, |
| 231 rebase_path(invoker.outputs, root_build_dir, target_gen_dir)) | 231 rebase_path(invoker.outputs, root_build_dir, output_dir)) |
| 232 assert_files_flags += [ | 232 assert_files_flags += [ |
| 233 "--assert-file-list=" + rebase_path(asserted_list_file, root_build_dir), | 233 "--assert-file-list=" + rebase_path(asserted_list_file, root_build_dir), |
| 234 ] | 234 ] |
| 235 grit_outputs = get_path_info( | 235 grit_outputs = get_path_info( |
| 236 rebase_path(invoker.outputs, ".", target_gen_dir), | 236 rebase_path(invoker.outputs, ".", output_dir), |
| 237 "abspath") | 237 "abspath") |
| 238 | 238 |
| 239 # The config and the action below get this visibility son only the generated | 239 # The config and the action below get this visibility son only the generated |
| 240 # source set can depend on them. The variable "target_name" will get | 240 # source set can depend on them. The variable "target_name" will get |
| 241 # overwritten inside the innter classes so we need to compute it here. | 241 # overwritten inside the innter classes so we need to compute it here. |
| 242 target_visibility = ":$target_name" | 242 target_visibility = ":$target_name" |
| 243 | 243 |
| 244 # The current grit setup makes an file in $output_dir/grit/foo.h that | 244 # The current grit setup makes an file in $output_dir/grit/foo.h that |
| 245 # the source code expects to include via "grit/foo.h". It would be nice to | 245 # the source code expects to include via "grit/foo.h". It would be nice to |
| 246 # change this to including absolute paths relative to the root gen directory | 246 # change this to including absolute paths relative to the root gen directory |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 direct_dependent_configs = [ ":$grit_config" ] | 296 direct_dependent_configs = [ ":$grit_config" ] |
| 297 | 297 |
| 298 if (defined(invoker.visibility)) { | 298 if (defined(invoker.visibility)) { |
| 299 visibility = invoker.visibility | 299 visibility = invoker.visibility |
| 300 } | 300 } |
| 301 if (defined(invoker.output_name)) { | 301 if (defined(invoker.output_name)) { |
| 302 output_name = invoker.output_name | 302 output_name = invoker.output_name |
| 303 } | 303 } |
| 304 } | 304 } |
| 305 } | 305 } |
| OLD | NEW |