2 # Copyright (C) 2013 Google Inc. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above
11 # copyright notice, this list of conditions and the following disclaimer
12 # in the documentation and/or other materials provided with the
14 # * Neither the name of Google Inc. nor the names of its
15 # contributors may be used to endorse or promote products derived from
16 # this software without specific prior written permission.
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 'target_name': 'devtools_frontend_resources',
40 'supported_css_properties',
41 'frontend_protocol_sources',
45 ['debug_devtools==0', {
47 'concatenated_devtools_css',
48 'concatenated_toolbox_css',
54 'destination': '<(PRODUCT_DIR)/resources/inspector/Images',
56 '<@(devtools_image_files)',
62 'target_name': 'devtools_extension_api',
65 'action_name': 'devtools_extension_api',
66 'script_name': 'scripts/generate_devtools_extension_api.py',
69 '<@(devtools_extension_api_files)',
71 'outputs': ['<(PRODUCT_DIR)/resources/inspector/devtools_extension_api.js'],
72 'action': ['python', '<@(_script_name)', '<@(_outputs)', '<@(devtools_extension_api_files)'],
76 'target_name': 'generate_devtools_grd',
79 'devtools_extension_api',
80 'devtools_frontend_resources',
83 ['debug_devtools==0', {
85 'action_name': 'generate_devtools_grd',
86 'script_name': 'scripts/generate_devtools_grd.py',
87 'relative_path_dirs': [
88 '<(PRODUCT_DIR)/resources/inspector',
92 # Intentionally empty. Should get rebuilt when switching from debug_devtools==1.
94 'devtools_static_files_list': '<|(devtools_static_grd_files.tmp <@(_static_files))',
96 '<(PRODUCT_DIR)/resources/inspector/devtools.css',
97 '<(PRODUCT_DIR)/resources/inspector/devtools.html',
98 '<(PRODUCT_DIR)/resources/inspector/devtools.js',
99 '<(PRODUCT_DIR)/resources/inspector/toolbox.css',
100 '<(PRODUCT_DIR)/resources/inspector/toolbox.html',
101 '<(PRODUCT_DIR)/resources/inspector/toolbox.js',
102 '<(PRODUCT_DIR)/resources/inspector/audits_module.js',
103 '<(PRODUCT_DIR)/resources/inspector/console_module.js',
104 '<(PRODUCT_DIR)/resources/inspector/devices_module.js',
105 '<(PRODUCT_DIR)/resources/inspector/documentation_module.js',
106 '<(PRODUCT_DIR)/resources/inspector/elements_module.js',
107 '<(PRODUCT_DIR)/resources/inspector/heap_snapshot_worker_module.js',
108 '<(PRODUCT_DIR)/resources/inspector/layers_module.js',
109 '<(PRODUCT_DIR)/resources/inspector/network_module.js',
110 '<(PRODUCT_DIR)/resources/inspector/profiler_module.js',
111 '<(PRODUCT_DIR)/resources/inspector/promises_module.js',
112 '<(PRODUCT_DIR)/resources/inspector/resources_module.js',
113 '<(PRODUCT_DIR)/resources/inspector/script_formatter_worker_module.js',
114 '<(PRODUCT_DIR)/resources/inspector/settings_module.js',
115 '<(PRODUCT_DIR)/resources/inspector/source_frame_module.js',
116 '<(PRODUCT_DIR)/resources/inspector/sources_module.js',
117 '<(PRODUCT_DIR)/resources/inspector/temp_storage_shared_worker_module.js',
118 '<(PRODUCT_DIR)/resources/inspector/timeline_module.js',
119 '<(PRODUCT_DIR)/resources/inspector/devtools_extension_api.js',
124 '<@(_generated_files)',
125 '<@(devtools_image_files)',
126 '<(_devtools_static_files_list)',
131 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resources.grd'],
132 'action': ['python', '<@(_script_name)', '<@(_generated_files)', '--static_files_list', '<(_devtools_static_files_list)', '--relative_path_dirs', '<@(_relative_path_dirs)', '--images', '<@(_images_path)', '--output', '<@(_outputs)'],
136 # If we're not concatenating devtools files, we want to
137 # run after the original files have been copied to
138 # <(PRODUCT_DIR)/resources/inspector.
139 'dependencies': ['devtools_frontend_resources'],
141 'action_name': 'generate_devtools_grd',
142 'script_name': 'scripts/generate_devtools_grd.py',
143 'relative_path_dirs': [
145 '<(PRODUCT_DIR)/resources/inspector',
148 '<@(all_devtools_files)',
149 'front_end/Runtime.js',
151 'devtools_static_files_list': '<|(devtools_static_grd_files.tmp <@(_static_files))',
153 '<(PRODUCT_DIR)/resources/inspector/InspectorBackendCommands.js',
154 '<(PRODUCT_DIR)/resources/inspector/SupportedCSSProperties.js',
155 '<(PRODUCT_DIR)/resources/inspector/devtools.html',
156 '<(PRODUCT_DIR)/resources/inspector/toolbox.html',
161 '<@(_generated_files)',
162 '<@(devtools_image_files)',
163 '<(_devtools_static_files_list)',
168 # Note that other files are put under /devtools directory, together with declared devtools_resources.grd
169 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resources.grd'],
170 'action': ['python', '<@(_script_name)', '<@(_generated_files)', '--static_files_list', '<(_devtools_static_files_list)', '--relative_path_dirs', '<@(_relative_path_dirs)', '--images', '<@(_images_path)', '--output', '<@(_outputs)'],
176 'target_name': 'frontend_protocol_sources',
180 'action_name': 'generateInspectorProtocolFrontendSources',
182 # The python script in action below.
183 'scripts/CodeGeneratorFrontend.py',
184 # Input file for the script.
188 '<(PRODUCT_DIR)/resources/inspector/InspectorBackendCommands.js',
192 'scripts/CodeGeneratorFrontend.py',
194 '--output_js_dir', '<(PRODUCT_DIR)/resources/inspector/',
196 'message': 'Generating Inspector protocol frontend sources from protocol.json',
201 'target_name': 'supported_css_properties',
205 'action_name': 'generateSupportedCSSProperties',
207 # The python script in action below.
208 'scripts/generate_supported_css.py',
209 # Input files for the script.
210 '../core/css/CSSProperties.in',
213 '<(PRODUCT_DIR)/resources/inspector/SupportedCSSProperties.js',
220 'message': 'Generating supported CSS properties for front end',
225 # Frontend applications and modules.
227 'target_name': 'build_applications',
230 'supported_css_properties',
231 'frontend_protocol_sources',
233 'output_path': '<(PRODUCT_DIR)/resources/inspector/',
235 'action_name': 'build_applications',
236 'script_name': 'scripts/build_applications.py',
238 'scripts/modular_build.py',
239 'scripts/concatenate_application_code.py',
243 '<@(_helper_scripts)',
244 '<@(all_devtools_files)',
245 'front_end/devtools.html',
246 'front_end/toolbox.html',
247 '<(_output_path)/InspectorBackendCommands.js',
248 '<(_output_path)/SupportedCSSProperties.js',
250 'action': ['python', '<@(_script_name)', 'devtools', 'toolbox', '--input_path', 'front_end', '--output_path', '<@(_output_path)', '--debug', '<@(debug_devtools)'],
252 ['debug_devtools==0', { # Release
254 '<(_output_path)/devtools.html',
255 '<(_output_path)/devtools.js',
256 '<(_output_path)/toolbox.html',
257 '<(_output_path)/toolbox.js',
258 '<(_output_path)/audits_module.js',
259 '<(_output_path)/console_module.js',
260 '<(_output_path)/devices_module.js',
261 '<(_output_path)/documentation_module.js',
262 '<(_output_path)/elements_module.js',
263 '<(_output_path)/heap_snapshot_worker_module.js',
264 '<(_output_path)/layers_module.js',
265 '<(_output_path)/network_module.js',
266 '<(_output_path)/profiler_module.js',
267 '<(_output_path)/promises_module.js',
268 '<(_output_path)/resources_module.js',
269 '<(_output_path)/script_formatter_worker_module.js',
270 '<(_output_path)/settings_module.js',
271 '<(_output_path)/source_frame_module.js',
272 '<(_output_path)/sources_module.js',
273 '<(_output_path)/temp_storage_shared_worker_module.js',
274 '<(_output_path)/timeline_module.js',
279 '<(_output_path)/devtools.html',
280 '<(_output_path)/toolbox.html',
286 ['debug_devtools==0', { # Release
289 # Copy runtime core and non-module directories here.
292 'destination': '<(_output_path)',
294 '<@(devtools_core_base_files)',
295 '<@(devtools_core_css_files)',
299 'destination': '<(_output_path)/UglifyJS',
301 '<@(devtools_uglify_files)',
305 'destination': '<(_output_path)/cm',
307 '<@(devtools_cm_js_files)',
308 '<@(devtools_cm_css_files)',
317 ['debug_devtools==0', {
320 'target_name': 'concatenated_devtools_css',
323 'action_name': 'concatenate_devtools_css',
324 'script_name': 'scripts/concatenate_css_files.py',
325 'input_stylesheet': 'front_end/devtools.css',
328 '<@(_input_stylesheet)',
329 '<@(devtools_core_base_files)',
331 'search_path': [ 'front_end' ],
332 'outputs': ['<(PRODUCT_DIR)/resources/inspector/devtools.css'],
333 'action': ['python', '<@(_script_name)', '<@(_input_stylesheet)', '<@(_outputs)'],
337 'target_name': 'concatenated_toolbox_css',
340 'action_name': 'concatenate_toolbox_css',
341 'script_name': 'scripts/concatenate_css_files.py',
342 'input_stylesheet': 'front_end/toolbox.css',
345 '<@(_input_stylesheet)',
346 '<@(devtools_core_base_files)',
348 'search_path': [ 'front_end' ],
349 'outputs': ['<(PRODUCT_DIR)/resources/inspector/toolbox.css'],
350 'action': ['python', '<@(_script_name)', '<@(_input_stylesheet)', '<@(_outputs)'],