Update code documentation for enum in EWK headers
[platform/framework/web/chromium-efl.git] / chrome / process_version_rc_template.gni
1 # Copyright 2016 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("//build/config/chrome_build.gni")
6 import("//build/util/lastchange.gni")
7 import("//build/util/process_version.gni")
8
9 # This is a wrapper around process_version() that eases the task of processing
10 # a .rc.version file (used especially on Windows).
11 #
12 # This template automatically includes VERSION, LASTCHANGE and BRANDING, and
13 # any additional source files are passed after those (so their values can
14 # override the ones specified by those 3 files).
15 #
16 # Parameters:
17 #   sources (optional):
18 #     List of files with value definitions that will be passed in addition to
19 #     VERSION, LASTCHANGE and BRANDING.
20 #
21 #   template_file (optional):
22 #     Template file to use (not a list). If not specified, a default value,
23 #     //chrome/app/chrome_version.rc.version will be used.
24 #
25 # This template forwards all other parameters directly to process_version().
26 #
27 # Examples:
28 #   process_version_rc_template("my_exe_version") {
29 #     output = "$target_gen_dir/my_exe_version.rc"
30 #     sources = [ "frob/my_exe.ver" ]
31 #     extra_args = [ "-e", "FOO=42" ]
32 #   }
33 #
34 #   process_version_rc_template("my_dll_version") {
35 #     output = "$target_gen_dir/my_dll_version.rc"
36 #     template_file = [ "//foo/bar/my_dll_version.rc.version" ]
37 #   }
38 template("process_version_rc_template") {
39   if (defined(invoker.template_file)) {
40     _template_file = invoker.template_file
41   } else {
42     _template_file = "//chrome/app/chrome_version.rc.version"
43   }
44   _sources = [
45     "//chrome/VERSION",
46     branding_file_path,
47     lastchange_file,
48   ]
49   if (defined(invoker.sources)) {
50     _sources += invoker.sources
51   }
52
53   process_version(target_name) {
54     template_file = _template_file
55     sources = _sources
56     forward_variables_from(invoker,
57                            "*",
58                            [
59                              "sources",
60                              "template_file",
61                            ])
62   }
63 }