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 # Runs the version processing script over the given template file to produce | 5 # Runs the version processing script over the given template file to produce |
6 # an output file. This is used for generating various forms of files that | 6 # an output file. This is used for generating various forms of files that |
7 # incorporate the product name and version. | 7 # incorporate the product name and version. |
8 # | 8 # |
9 # Unlike GYP, this will actually compile the resulting file, so you don't need | 9 # Unlike GYP, this will actually compile the resulting file, so you don't need |
10 # to add it separately to the sources, just depend on the target. | 10 # to add it separately to the sources, just depend on the target. |
11 # | 11 # |
12 # In GYP this is a rule that runs once per ".ver" file. In GN this just | 12 # In GYP this is a rule that runs once per ".ver" file. In GN this just |
13 # processes one file per invocation of the template so you may have to have | 13 # processes one file per invocation of the template so you may have to have |
14 # multiple targets. | 14 # multiple targets. |
15 # | 15 # |
16 # Parameters: | 16 # Parameters: |
17 # sources (optional): | 17 # sources (optional): |
18 # List of file names to read. When converting a GYP target, this should | 18 # List of file names to read. When converting a GYP target, this should |
19 # list the 'source' (see above) as well as any extra_variable_files. | 19 # list the 'source' (see above) as well as any extra_variable_files. |
20 # The files will be passed to version.py in the order specified here. | 20 # The files will be passed to version.py in the order specified here. |
21 # | 21 # |
22 # output: | 22 # output: |
23 # File name of file to write. In GYP this is unspecified and it will | 23 # File name of file to write. In GYP this is unspecified and it will |
24 # make up a file name for you based on the input name, and tack on | 24 # make up a file name for you based on the input name, and tack on |
25 # "_version.rc" to the end. But in GN you need to specify the full name. | 25 # "_version.rc" to the end. But in GN you need to specify the full name. |
26 # | 26 # |
27 # template_file (optional): | 27 # template_file (optional): |
28 # Template file to use (not a list). Most Windows users that want to use | 28 # Template file to use (not a list). Most Windows users that want to use |
29 # this to process a .rc template should use process_version_rc_template(), | 29 # this to process a .rc template should use process_version_rc_template(), |
30 # defined in //chrome/process_version_rc_template.gni, instead. | 30 # defined in process_version_rc_template.gni, instead. |
31 # | 31 # |
32 # extra_args (optional): | 32 # extra_args (optional): |
33 # Extra arguments to pass to version.py. Any "-f <filename>" args should | 33 # Extra arguments to pass to version.py. Any "-f <filename>" args should |
34 # use sources instead. | 34 # use sources instead. |
35 # | 35 # |
36 # process_only (optional, defaults to false) | 36 # process_only (optional, defaults to false) |
37 # Set to generate only one action that processes the version file and | 37 # Set to generate only one action that processes the version file and |
38 # doesn't attempt to link the result into a source set. This is for if | 38 # doesn't attempt to link the result into a source set. This is for if |
39 # you are processing the version as data only. | 39 # you are processing the version as data only. |
40 # | 40 # |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 if (!process_only) { | 117 if (!process_only) { |
118 source_set(source_set_name) { | 118 source_set(source_set_name) { |
119 forward_variables_from(invoker, [ "visibility" ]) | 119 forward_variables_from(invoker, [ "visibility" ]) |
120 sources = get_target_outputs(":$action_name") | 120 sources = get_target_outputs(":$action_name") |
121 public_deps = [ | 121 public_deps = [ |
122 ":$action_name", | 122 ":$action_name", |
123 ] | 123 ] |
124 } | 124 } |
125 } | 125 } |
126 } | 126 } |
OLD | NEW |