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.
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': '',
16 # GN version: //components/version_info
17 'target_name': 'version_info',
18 'type': 'static_library',
23 '../base/base.gyp:base',
24 '../ui/base/ui_base.gyp:ui_base',
25 'components_strings.gyp:components_strings',
26 'generate_version_info',
29 'version_info/version_info.cc',
30 'version_info/version_info.h',
34 # GN version: //components/version_info:generate_version
35 'target_name': 'generate_version_info',
37 'direct_dependent_settings': {
39 '<(SHARED_INTERMEDIATE_DIR)',
42 # Because generate_version_info generates a header, the target must set
43 # the hard_dependency flag.
47 'action_name': 'generation_version_info',
48 'message': 'Generating version information',
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',
64 '<(template_input_path)',
70 '<(SHARED_INTERMEDIATE_DIR)/components/version_info/version_info_values.h',
75 '-f', '<(version_path)',
76 '-f', '<(branding_path)',
77 '-f', '<(lastchange_path)',
78 '<@(extra_version_flags)',
79 '<(template_input_path)',
83 ['extra_version_name!=""', {
85 'extra_version_flags': [
86 '-f', '<(extra_version_name)',
90 '<(extra_version_name)'
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',
112 ['use_canary_version_file==1', {
114 'extra_version_name': '../ios/build/util/CANARY_VERSION',
118 'extra_version_name': '<(ios_extra_version_path)',