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

Side by Side Diff: chrome/app/policy/policy_templates.gypi

Issue 4644002: Refactor: move all the policy-template related targets into one gypi file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase for commit Created 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/chrome.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright (c) 2010 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 {
6 'conditions': [
7 ['OS=="win" or OS=="mac" or OS=="linux"', {
8 'targets': [
9 {
10 # policy_templates has different inputs and outputs, so it can't use
11 # the rules of chrome_strings
12 'target_name': 'policy_templates',
13 'type': 'none',
14 'variables': {
15 'grd_path': 'policy_templates.grd',
16 'template_files': [
17 '<!@(<(grit_info_cmd) --outputs \'<(grit_out_dir)\' <(grd_path))'
18 ],
19 },
20 'actions': [
21 {
22 'action_name': 'policy_templates',
23 'variables': {
24 'conditions': [
25 ['branding=="Chrome"', {
26 # TODO(mmoss) The .grd files look for _google_chrome, but
27 # for consistency they should look for GOOGLE_CHROME_BUILD
28 # like C++.
29 # Clean this up when Windows moves to gyp.
30 'chrome_build': '_google_chrome',
31 }, { # else: branding!="Chrome"
32 'chrome_build': '_chromium',
33 }],
34 ],
35 },
36 'inputs': [
37 '<!@(<(grit_info_cmd) --inputs <(grd_path))',
38 ],
39 'outputs': [
40 '<@(template_files)'
41 ],
42 'action': [
43 '<@(grit_cmd)',
44 '-i', '<(grd_path)', 'build',
45 '-o', '<(grit_out_dir)',
46 '-D', '<(chrome_build)'
47 ],
48 'conditions': [
49 ['chromeos==1', {
50 'action': ['-D', 'chromeos'],
51 }],
52 ['use_titlecase_in_grd_files==1', {
53 'action': ['-D', 'use_titlecase'],
54 }],
55 ['OS == "mac"', {
56 'action': ['-D', 'mac_bundle_id=<(mac_bundle_id)'],
57 }],
58 ],
59 'message': 'Generating policy templates from <(grd_path)',
60 },
61 ],
62 'direct_dependent_settings': {
63 'include_dirs': [
64 '<(grit_out_dir)',
65 ],
66 },
67 'conditions': [
68 ['OS=="win"', {
69 'actions': [
70 {
71 # Add all the templates generated at the previous step into
72 # a zip archive.
73 'action_name': 'pack_templates',
74 'variables': {
75 'zip_script':
76 'tools/build/win/make_zip_with_relative_entries.py'
77 },
78 'inputs': [
79 '<@(template_files)',
80 '<(zip_script)'
81 ],
82 'outputs': [
83 '<(PRODUCT_DIR)/policy_templates.zip'
84 ],
85 'action': [
86 'python',
87 '<(zip_script)',
88 '<@(_outputs)',
89 '<(grit_out_dir)/app/policy',
90 '<@(template_files)'
91 ],
92 'message': 'Packing generated templates into <(_outputs)',
93 }
94 ]
95 }],
96 ['OS=="win"', {
97 'dependencies': ['../build/win/system.gyp:cygwin'],
98 }],
99 ],
100 },
101 ], # 'targets'
102 }], # OS=="win" or OS=="mac" or OS=="linux"
103 ['OS=="mac"', {
104 'targets': [
105 {
106 # This is the bundle of the manifest file of Chrome.
107 # It contains the manifest file and its string tables.
108 'target_name': 'chrome_manifest_bundle',
109 'type': 'loadable_module',
110 'mac_bundle': 1,
111 'product_extension': 'manifest',
112 'product_name': '<(mac_bundle_id)',
113 'variables': {
114 # This avoids stripping debugging symbols from the target, which
115 # would fail because there is no binary code here.
116 'mac_strip': 0,
117 },
118 'dependencies': [
119 # Provides app-Manifest.plist and its string tables:
120 'policy_templates',
121 ],
122 'actions': [
123 {
124 'action_name': 'Copy MCX manifest file to manifest bundle',
125 'inputs': [
126 '<(grit_out_dir)/app/policy/mac/app-Manifest.plist',
127 ],
128 'outputs': [
129 '<(INTERMEDIATE_DIR)/app_manifest/<(mac_bundle_id).manifest',
130 ],
131 'action': [
132 'cp',
133 '<@(_inputs)',
134 '<@(_outputs)',
135 ],
136 'message':
137 'Copying the MCX policy manifest file to the manifest bundle',
138 'process_outputs_as_mac_bundle_resources': 1,
139 },
140 {
141 'action_name':
142 'Copy Localizable.strings files to manifest bundle',
143 'variables': {
144 'input_path': '<(grit_out_dir)/app/policy/mac/strings',
145 # Directory to collect the Localizable.strings files before
146 # they are copied to the bundle.
147 'output_path': '<(INTERMEDIATE_DIR)/app_manifest',
148 # TODO(gfeher): replace this with <(locales) when we have real
149 # translations
150 'available_locales': 'en',
151 },
152 'inputs': [
153 # TODO: remove this helper when we have loops in GYP
154 '>!@(<(apply_locales_cmd) -d \'<(input_path)/ZZLOCALE.lproj/Loca lizable.strings\' <(available_locales))',
155 ],
156 'outputs': [
157 # TODO: remove this helper when we have loops in GYP
158 '>!@(<(apply_locales_cmd) -d \'<(output_path)/ZZLOCALE.lproj/Loc alizable.strings\' <(available_locales))',
159 ],
160 'action': [
161 'cp', '-R',
162 '<(input_path)/',
163 '<(output_path)',
164 ],
165 'message':
166 'Copy the Localizable.strings files to the manifest bundle',
167 'process_outputs_as_mac_bundle_resources': 1,
168 },
169 ],
170 },
171 ]
172 }]
173 ], # 'conditions'
174 }
175
176 # Local Variables:
177 # tab-width:2
178 # indent-tabs-mode:nil
179 # End:
180 # vim: set expandtab tabstop=2 shiftwidth=2:
OLDNEW
« no previous file with comments | « no previous file | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698