Chromium Code Reviews| 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 | 10 # source |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 180 # the current one. | 180 # the current one. |
| 181 grit_inputs = rebase_path(grit_inputs_build_rel, ".", root_build_dir) + [ | 181 grit_inputs = rebase_path(grit_inputs_build_rel, ".", root_build_dir) + [ |
| 182 grit_resource_id_file, | 182 grit_resource_id_file, |
| 183 ] | 183 ] |
| 184 | 184 |
| 185 grit_outputs_build_rel = exec_script(grit_info_script, | 185 grit_outputs_build_rel = exec_script(grit_info_script, |
| 186 [ "--outputs", "$output_dir", source_path, "-f", resource_ids ] + | 186 [ "--outputs", "$output_dir", source_path, "-f", resource_ids ] + |
| 187 grit_flags, | 187 grit_flags, |
| 188 "list lines") | 188 "list lines") |
| 189 | 189 |
| 190 # The inputs are relative to the current (build) directory, rebase to | 190 # The inputs are relative to the current (build) directory, make absolute. |
|
awong
2014/07/11 19:52:20
Can you explain why abspath is required?
| |
| 191 # the current one. | 191 grit_outputs = get_path_info( |
| 192 grit_outputs = rebase_path(grit_outputs_build_rel, ".", root_build_dir) | 192 rebase_path(grit_outputs_build_rel, ".", root_build_dir), "abspath") |
| 193 | 193 |
| 194 # The config and the action below get this visibility son only the generated | 194 # The config and the action below get this visibility son only the generated |
| 195 # source set can depend on them. The variable "target_name" will get | 195 # source set can depend on them. The variable "target_name" will get |
| 196 # overwritten inside the innter classes so we need to compute it here. | 196 # overwritten inside the innter classes so we need to compute it here. |
| 197 target_visibility = ":$target_name" | 197 target_visibility = ":$target_name" |
| 198 | 198 |
| 199 # The current grit setup makes an file in $target_gen_dir/grit/foo.h that | 199 # The current grit setup makes an file in $target_gen_dir/grit/foo.h that |
| 200 # the source code expects to include via "grit/foo.h". It would be nice to | 200 # the source code expects to include via "grit/foo.h". It would be nice to |
| 201 # change this to including absolute paths relative to the root gen directory | 201 # change this to including absolute paths relative to the root gen directory |
| 202 # (like "mycomponent/foo.h"). This config sets up the include path. | 202 # (like "mycomponent/foo.h"). This config sets up the include path. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 238 direct_dependent_configs = [ ":$grit_config" ] | 238 direct_dependent_configs = [ ":$grit_config" ] |
| 239 | 239 |
| 240 if (defined(invoker.visibility)) { | 240 if (defined(invoker.visibility)) { |
| 241 visibility = invoker.visibility | 241 visibility = invoker.visibility |
| 242 } | 242 } |
| 243 if (defined(invoker.output_name)) { | 243 if (defined(invoker.output_name)) { |
| 244 output_name = invoker.output_name | 244 output_name = invoker.output_name |
| 245 } | 245 } |
| 246 } | 246 } |
| 247 } | 247 } |
| OLD | NEW |