Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: build/grit_action.gypi

Issue 1419503006: fix breaking third parties using grit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/chrome_settings.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # This file is meant to be included into an action to invoke grit in a 5 # This file is meant to be included into an action to invoke grit in a
6 # consistent manner. To use this the following variables need to be 6 # consistent manner. To use this the following variables need to be
7 # defined: 7 # defined:
8 # grit_grd_file: string: grd file path 8 # grit_grd_file: string: grd file path
9 # grit_out_dir: string: the output directory path 9 # grit_out_dir: string: the output directory path
10 10
11 # It would be really nice to do this with a rule instead of actions, but it 11 # It would be really nice to do this with a rule instead of actions, but it
12 # would need to determine inputs and outputs via grit_info on a per-file 12 # would need to determine inputs and outputs via grit_info on a per-file
13 # basis. GYP rules don't currently support that. They could be extended to 13 # basis. GYP rules don't currently support that. They could be extended to
14 # do this, but then every generator would need to be updated to handle this. 14 # do this, but then every generator would need to be updated to handle this.
15 15
16 { 16 {
17 'variables': { 17 'variables': {
18 'grit_cmd': ['python', '<(DEPTH)/tools/grit/grit.py'], 18 'grit_cmd': ['python', '<(DEPTH)/tools/grit/grit.py'],
19 'grit_resource_ids%': '<(DEPTH)/tools/gritsettings/resource_ids', 19 'grit_resource_ids%': '<(DEPTH)/tools/gritsettings/resource_ids',
20 # This makes it possible to add more defines in specific targets, 20 # This makes it possible to add more defines in specific targets,
21 # instead of build/common.gypi . 21 # instead of build/common.gypi .
22 'grit_additional_defines%': ['-D', 'version=<(version_full)'], 22 'grit_additional_defines%': [],
23 'grit_rc_header_format%': [], 23 'grit_rc_header_format%': [],
24 'grit_whitelist%': '', 24 'grit_whitelist%': '',
25 25
26 'conditions': [ 26 'conditions': [
27 # These scripts can skip writing generated files if they are identical 27 # These scripts can skip writing generated files if they are identical
28 # to the already existing files, which avoids further build steps, like 28 # to the already existing files, which avoids further build steps, like
29 # recompilation. However, a dependency (earlier build step) having a 29 # recompilation. However, a dependency (earlier build step) having a
30 # newer timestamp than an output (later build step) confuses some build 30 # newer timestamp than an output (later build step) confuses some build
31 # systems, so only use this on ninja, which explicitly supports this use 31 # systems, so only use this on ninja, which explicitly supports this use
32 # case (gyp turns all actions into ninja restat rules). 32 # case (gyp turns all actions into ninja restat rules).
33 ['"<(GENERATOR)"=="ninja"', { 33 ['"<(GENERATOR)"=="ninja"', {
34 'write_only_new': '1', 34 'write_only_new': '1',
35 }, { 35 }, {
36 'write_only_new': '0', 36 'write_only_new': '0',
37 }], 37 }],
38 ], 38 ],
39 }, 39 },
40 'includes': [
41 '../build/util/version.gypi'
42 ],
43 'conditions': [ 40 'conditions': [
44 ['"<(grit_whitelist)"==""', { 41 ['"<(grit_whitelist)"==""', {
45 'variables': { 42 'variables': {
46 'grit_whitelist_flag': [], 43 'grit_whitelist_flag': [],
47 } 44 }
48 }, { 45 }, {
49 'variables': { 46 'variables': {
50 'grit_whitelist_flag': ['-w', '<(grit_whitelist)'], 47 'grit_whitelist_flag': ['-w', '<(grit_whitelist)'],
51 } 48 }
52 }] 49 }]
(...skipping 12 matching lines...) Expand all
65 '-i', '<(grit_grd_file)', 'build', 62 '-i', '<(grit_grd_file)', 'build',
66 '-f', '<(grit_resource_ids)', 63 '-f', '<(grit_resource_ids)',
67 '-o', '<(grit_out_dir)', 64 '-o', '<(grit_out_dir)',
68 '--write-only-new=<(write_only_new)', 65 '--write-only-new=<(write_only_new)',
69 '<@(grit_defines)', 66 '<@(grit_defines)',
70 '<@(grit_whitelist_flag)', 67 '<@(grit_whitelist_flag)',
71 '<@(grit_additional_defines)', 68 '<@(grit_additional_defines)',
72 '<@(grit_rc_header_format)'], 69 '<@(grit_rc_header_format)'],
73 'message': 'Generating resources from <(grit_grd_file)', 70 'message': 'Generating resources from <(grit_grd_file)',
74 } 71 }
OLDNEW
« no previous file with comments | « build/chrome_settings.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698