- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / version_resource_rules.gypi
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 # This file defines rules that allow you to generate version resources for
6 # Windows images.
7
8 # Include 'version.gypi' at the top of your GYP file to define
9 # the required variables:
10 #
11 #  'includes': [
12 #    '<(DEPTH)/chrome/version.gypi',
13 #  ],
14 #
15 # Then include this rule file in a productname_resources target:
16
17 #    {
18 #      'target_name': 'chrome_version_resources',
19 #      ...
20 #      'variables': {
21 #        'output_dir': 'product_version',
22 #        'branding_path': 'some/branding/file',
23 #        'template_input_path': 'some/product_version.rc.version',
24 #        'extra_variable_files_arguments': [ '-f', 'some/file/with/variables' ],
25 #        'extra_variable_files': [ 'some/file/with/variables' ], # NOTE: matches that above
26 #      },
27 #      'includes': [
28 #        '<(DEPTH)/chrome/version_resource_rules.gypi',
29 #      ],
30 #    }
31 #
32 {
33   'rules': [
34     {
35       'rule_name': 'version',
36       'extension': 'ver',
37       'variables': {
38         'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
39         'extra_variable_files%': [],
40         'extra_variable_files_arguments%': [],
41       },
42       'inputs': [
43         '<(version_py_path)',
44         '<(version_path)',
45         '<(branding_path)',
46         '<(lastchange_path)',
47         '<@(extra_variable_files)',
48         '<(template_input_path)',
49       ],
50       'outputs': [
51         '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)/<(RULE_INPUT_ROOT)_version.rc',
52       ],
53       'action': [
54         'python',
55         '<(version_py_path)',
56         '-f', '<(RULE_INPUT_PATH)',
57         '-f', '<(version_path)',
58         '-f', '<(branding_path)',
59         '-f', '<(lastchange_path)',
60         '<@(extra_variable_files_arguments)',
61         '<(template_input_path)',
62         '<@(_outputs)',
63       ],
64       'message': 'Generating version information in <@(_outputs)'
65     },
66   ],
67 }