| Index: build/util/process_version.gni
|
| diff --git a/chrome/version.gni b/build/util/process_version.gni
|
| similarity index 74%
|
| rename from chrome/version.gni
|
| rename to build/util/process_version.gni
|
| index a29cb8d372ec3c18f2976864b4df4dcc3b20c8eb..100699cab8e6308d0ab306ad6eaeb27eebb79629 100644
|
| --- a/chrome/version.gni
|
| +++ b/build/util/process_version.gni
|
| @@ -2,8 +2,6 @@
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
|
|
| -import("//build/config/chrome_build.gni")
|
| -
|
| # Runs the version processing script over the given template file to produce
|
| # an output file. This is used for generating various forms of files that
|
| # incorporate the product name and version.
|
| @@ -11,12 +9,6 @@ import("//build/config/chrome_build.gni")
|
| # Unlike GYP, this will actually compile the resulting file, so you don't need
|
| # to add it separately to the sources, just depend on the target.
|
| #
|
| -# This template automatically includes VERSION, LASTCHANGE, and BRANDING. It
|
| -# automatically uses the template file .
|
| -# GYP parameterizes this template file but all current invocations use this
|
| -# same one. If in the future we need to set it, this should be added as an
|
| -# optional argument.
|
| -#
|
| # In GYP this is a rule that runs once per ".ver" file. In GN this just
|
| # processes one file per invocation of the template so you may have to have
|
| # multiple targets.
|
| @@ -25,6 +17,7 @@ import("//build/config/chrome_build.gni")
|
| # sources (optional):
|
| # List of file names to read. When converting a GYP target, this should
|
| # list the 'source' (see above) as well as any extra_variable_files.
|
| +# The files will be passed to version.py in the order specified here.
|
| #
|
| # output:
|
| # File name of file to write. In GYP this is unspecified and it will
|
| @@ -33,8 +26,7 @@ import("//build/config/chrome_build.gni")
|
| #
|
| # template_file (optional):
|
| # Template file to use (not a list). Most Windows uses for generating
|
| -# resources will want to specify the chrome_version_rc_template defined
|
| -# below.
|
| +# resources will want to use process_version_rc_template() instead.
|
| #
|
| # extra_args (optional):
|
| # Extra arguments to pass to version.py. Any "-f <filename>" args should
|
| @@ -49,10 +41,12 @@ import("//build/config/chrome_build.gni")
|
| #
|
| # Example:
|
| # process_version("myversion") {
|
| -# sources = [ "myfile.h.in" ]
|
| +# sources = [
|
| +# "//chrome/VERSION"
|
| +# "myfile.h.in"
|
| +# ]
|
| # output = "$target_gen_dir/myfile.h"
|
| -# extra_args = ["-e", "FOO=42"]
|
| -# extra_files = [ "foo/BRANDING" ]
|
| +# extra_args = [ "-e", "FOO=42" ]
|
| # }
|
| template("process_version") {
|
| assert(defined(invoker.output), "Output must be defined for $target_name")
|
| @@ -69,19 +63,7 @@ template("process_version") {
|
| action(action_name) {
|
| script = "//build/util/version.py"
|
|
|
| - lastchange_path = "//build/util/LASTCHANGE"
|
| - version_path = "//chrome/VERSION"
|
| - if (is_chrome_branded) {
|
| - branding_path = "//chrome/app/theme/google_chrome/BRANDING"
|
| - } else {
|
| - branding_path = "//chrome/app/theme/chromium/BRANDING"
|
| - }
|
| -
|
| - inputs = [
|
| - version_path,
|
| - lastchange_path,
|
| - branding_path,
|
| - ]
|
| + inputs = []
|
| if (defined(invoker.inputs)) {
|
| inputs += invoker.inputs
|
| }
|
| @@ -109,14 +91,6 @@ template("process_version") {
|
| }
|
| }
|
|
|
| - args += [
|
| - "-f",
|
| - rebase_path(version_path, root_build_dir),
|
| - "-f",
|
| - rebase_path(branding_path, root_build_dir),
|
| - "-f",
|
| - rebase_path(lastchange_path, root_build_dir),
|
| - ]
|
| if (defined(invoker.extra_args)) {
|
| args += invoker.extra_args
|
| }
|
| @@ -149,5 +123,3 @@ template("process_version") {
|
| }
|
| }
|
| }
|
| -
|
| -chrome_version_rc_template = "//chrome/app/chrome_version.rc.version"
|
|
|