Add a pair of DCHECKs in URLRequestJob for jobs that restart themselves.
[chromium-blink-merge.git] / components / version_info.gypi
blobfa18bfec82dd690ec89f36b59ff7236834b55cf8
1 # Copyright 2015 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.
6   'variables': {
7     # Some plaform want to override part of the version number generation
8     # (for example iOS uses a different value for PATCH level for canary).
9     # This can be done settings "extra_version_path" variable to the path
10     # of a file with the corresponding value overrides. If present it will
11     # be loaded after all other input files.
12     'extra_version_name': '',
13   },
14   'targets': [
15     {
16       # GN version: //components/version_info
17       'target_name': 'version_info',
18       'type': 'static_library',
19       'include_dirs': [
20         '..',
21       ],
22       'dependencies': [
23         '../base/base.gyp:base',
24         '../ui/base/ui_base.gyp:ui_base',
25         'components_strings.gyp:components_strings',
26         'generate_version_info',
27       ],
28       'sources': [
29         'version_info/version_info.cc',
30         'version_info/version_info.h',
31       ],
32     },
33     {
34       # GN version: //components/version_info:generate_version
35       'target_name': 'generate_version_info',
36       'type': 'none',
37       'direct_dependent_settings': {
38         'include_dirs': [
39           '<(SHARED_INTERMEDIATE_DIR)',
40         ],
41       },
42       # Because generate_version_info generates a header, the target must set
43       # the hard_dependency flag.
44       'hard_dependency': 1,
45       'actions': [
46         {
47           'action_name': 'generation_version_info',
48           'message': 'Generating version information',
49           'variables': {
50             'extra_version_flags': [],
51             'lastchange_path': '../build/util/LASTCHANGE',
52             'version_py_path': '../build/util/version.py',
53             'template_input_path': 'version_info/version_info_values.h.version',
54             # Use VERSION and BRANDING files from //chrome even if this is bad
55             # dependency until they are moved to src/ for VERSION and to the
56             # version_info component for BRANDING. Synchronisation with TPM and
57             # all release script is required for thoses moves. They are tracked
58             # by issues http://crbug.com/512347 and http://crbug.com/513603.
59             'version_path': '../chrome/VERSION',
60             'branding_path': '../chrome/app/theme/<(branding_path_component)/BRANDING',
61           },
62           'inputs': [
63             '<(version_py_path)',
64             '<(template_input_path)',
65             '<(version_path)',
66             '<(branding_path)',
67             '<(lastchange_path)',
68           ],
69           'outputs': [
70             '<(SHARED_INTERMEDIATE_DIR)/components/version_info/version_info_values.h',
71           ],
72           'action': [
73             'python',
74             '<(version_py_path)',
75             '-f', '<(version_path)',
76             '-f', '<(branding_path)',
77             '-f', '<(lastchange_path)',
78             '<@(extra_version_flags)',
79             '<(template_input_path)',
80             '<@(_outputs)',
81           ],
82           'conditions': [
83             ['extra_version_name!=""', {
84               'variables': {
85                 'extra_version_flags': [
86                   '-f', '<(extra_version_name)',
87                 ],
88               },
89               'inputs': [
90                 '<(extra_version_name)'
91               ],
92             }],
93           ],
94         },
95       ],
96     },
97   ],
98   'conditions': [
99     ['OS=="ios"', {
100       'variables': {
101         # Controls whether the extra version path should be overridden to
102         # use ios/build/util/CANARY_VERSION (legacy until the bots have
103         # been updated to override ios_extra_version_path instead).
104         # TODO(sdefresne): remove once http://crbug.com/514560 is fixed.
105         'use_canary_version_file%': 0,
107         # Path to the file used to override the version PATH level on iOS.
108         # Default to ios/build/util/VERSION.
109         'ios_extra_version_path%': '../ios/build/util/VERSION',
110       },
111       'conditions': [
112         ['use_canary_version_file==1', {
113           'variables': {
114             'extra_version_name': '../ios/build/util/CANARY_VERSION',
115           },
116         }, {
117           'variables': {
118             'extra_version_name': '<(ios_extra_version_path)',
119           },
120         }],
121       ],
122     }],
123   ],