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',
41 'supported_css_properties',
42 'frontend_protocol_sources',
45 ['debug_devtools==0', {
46 'dependencies': ['concatenated_devtools_js',
47 'concatenated_devtools_elements_js',
48 'concatenated_devtools_resources_js',
49 'concatenated_devtools_network_js',
50 'concatenated_devtools_extensions_js',
51 'concatenated_devtools_scripts_js',
52 'concatenated_devtools_timeline_js',
53 'concatenated_devtools_profiles_js',
54 'concatenated_devtools_audits_js',
55 'concatenated_devtools_codemirror_js',
56 'concatenated_devtools_layers_js',
57 'concatenated_heap_snapshot_worker_js',
58 'concatenated_script_formatter_worker_js',
59 'concatenated_temp_storage_shared_worker_js',
60 'concatenated_devtools_css'],
65 'destination': '<(PRODUCT_DIR)/resources/inspector',
67 ['debug_devtools==1', {
70 '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorBackendCommands.js',
71 '<(SHARED_INTERMEDIATE_DIR)/blink/SupportedCSSProperties.js',
72 '<@(devtools_heap_snapshot_worker_js_files)',
73 '<@(devtools_temp_storage_shared_worker_js_files)',
74 '<@(devtools_script_formatter_worker_js_files)',
83 'destination': '<(PRODUCT_DIR)/resources/inspector/UglifyJS',
85 ['debug_devtools==1', {
87 '<@(devtools_uglify_files)',
96 'destination': '<(PRODUCT_DIR)/resources/inspector/cm',
98 ['debug_devtools==1', {
100 '<@(devtools_cm_files)',
109 'destination': '<(PRODUCT_DIR)/resources/inspector/Images',
111 '<@(devtools_image_files)',
117 'target_name': 'devtools_html',
119 'sources': ['<(PRODUCT_DIR)/resources/inspector/devtools.html'],
121 'action_name': 'devtools_html',
122 'script_name': 'scripts/generate_devtools_html.py',
123 'input_page': 'front_end/inspector.html',
128 'outputs': ['<(PRODUCT_DIR)/resources/inspector/devtools.html'],
129 'action': ['python', '<@(_script_name)', '<@(_input_page)', '<@(_outputs)', '<@(debug_devtools)'],
133 'target_name': 'devtools_extension_api',
136 'action_name': 'devtools_html',
137 'script_name': 'scripts/generate_devtools_extension_api.py',
140 '<@(devtools_extension_api_files)',
142 'outputs': ['<(PRODUCT_DIR)/resources/inspector/devtools_extension_api.js'],
143 'action': ['python', '<@(_script_name)', '<@(_outputs)', '<@(devtools_extension_api_files)'],
147 'target_name': 'generate_devtools_grd',
151 'devtools_extension_api'
154 ['debug_devtools==0', {
155 'dependencies': ['concatenated_devtools_js',
156 'concatenated_devtools_elements_js',
157 'concatenated_devtools_resources_js',
158 'concatenated_devtools_network_js',
159 'concatenated_devtools_extensions_js',
160 'concatenated_devtools_scripts_js',
161 'concatenated_devtools_timeline_js',
162 'concatenated_devtools_profiles_js',
163 'concatenated_devtools_audits_js',
164 'concatenated_devtools_codemirror_js',
165 'concatenated_devtools_layers_js',
166 'concatenated_heap_snapshot_worker_js',
167 'concatenated_script_formatter_worker_js',
168 'concatenated_temp_storage_shared_worker_js',
169 'concatenated_devtools_css'],
171 'action_name': 'generate_devtools_grd',
172 'script_name': 'scripts/generate_devtools_grd.py',
174 '<(PRODUCT_DIR)/resources/inspector/devtools.html',
175 '<(PRODUCT_DIR)/resources/inspector/inspector.js',
176 '<(PRODUCT_DIR)/resources/inspector/ElementsPanel.js',
177 '<(PRODUCT_DIR)/resources/inspector/ExtensionServer.js',
178 '<(PRODUCT_DIR)/resources/inspector/ResourcesPanel.js',
179 '<(PRODUCT_DIR)/resources/inspector/NetworkPanel.js',
180 '<(PRODUCT_DIR)/resources/inspector/SourcesPanel.js',
181 '<(PRODUCT_DIR)/resources/inspector/TimelinePanel.js',
182 '<(PRODUCT_DIR)/resources/inspector/ProfilesPanel.js',
183 '<(PRODUCT_DIR)/resources/inspector/AuditsPanel.js',
184 '<(PRODUCT_DIR)/resources/inspector/LayersPanel.js',
185 '<(PRODUCT_DIR)/resources/inspector/CodeMirrorTextEditor.js',
186 '<(PRODUCT_DIR)/resources/inspector/HeapSnapshotWorker.js',
187 '<(PRODUCT_DIR)/resources/inspector/ScriptFormatterWorker.js',
188 '<(PRODUCT_DIR)/resources/inspector/TempStorageSharedWorker.js',
189 '<(PRODUCT_DIR)/resources/inspector/inspector.css',
190 '<(PRODUCT_DIR)/resources/inspector/devtools_extension_api.js',
191 '<@(devtools_standalone_files)',
194 '<@(devtools_image_files)',
204 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resources.grd'],
205 'action': ['python', '<@(_script_name)', '<@(_input_pages)', '--images', '<@(_search_path)', '--output', '<@(_outputs)'],
209 # If we're not concatenating devtools files, we want to
210 # run after the original files have been copied to
211 # <(PRODUCT_DIR)/resources/inspector.
212 'dependencies': ['devtools_frontend_resources'],
214 'action_name': 'generate_devtools_grd',
215 'script_name': 'scripts/generate_devtools_grd.py',
217 '<@(devtools_files)',
218 '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorBackendCommands.js',
219 '<(SHARED_INTERMEDIATE_DIR)/blink/SupportedCSSProperties.js',
220 '<(PRODUCT_DIR)/resources/inspector/devtools.html',
223 '<@(devtools_image_files)',
233 # Note that other files are put under /devtools directory, together with declared devtools_resources.grd
234 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resources.grd'],
235 'action': ['python', '<@(_script_name)', '<@(_input_pages)', '--images', '<@(_search_path)', '--output', '<@(_outputs)'],
241 'target_name': 'frontend_protocol_sources',
245 'action_name': 'generateInspectorProtocolFrontendSources',
247 # The python script in action below.
248 'scripts/CodeGeneratorFrontend.py',
249 # Input file for the script.
253 '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorBackendCommands.js',
257 'scripts/CodeGeneratorFrontend.py',
259 '--output_js_dir', '<(SHARED_INTERMEDIATE_DIR)/blink',
261 'message': 'Generating Inspector protocol frontend sources from protocol.json',
266 'target_name': 'supported_css_properties',
270 'action_name': 'generateSupportedCSSProperties',
272 # The python script in action below.
273 'scripts/generate_supported_css.py',
274 # Input files for the script.
275 '../core/css/CSSPropertyNames.in',
276 '../core/css/SVGCSSPropertyNames.in',
277 '../core/css/CSSShorthands.in',
280 '<(SHARED_INTERMEDIATE_DIR)/blink/SupportedCSSProperties.js',
287 'message': 'Generating supported CSS properties for front end',
293 ['debug_devtools==0', {
296 'target_name': 'concatenated_devtools_js',
300 'supported_css_properties',
301 'frontend_protocol_sources'
304 'action_name': 'concatenate_devtools_js',
305 'script_name': 'scripts/concatenate_js_files.py',
306 'input_page': 'front_end/inspector.html',
310 '<@(devtools_files)',
311 '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorBackendCommands.js',
312 '<(SHARED_INTERMEDIATE_DIR)/blink/SupportedCSSProperties.js'
316 '<(SHARED_INTERMEDIATE_DIR)/blink',
318 'outputs': ['<(PRODUCT_DIR)/resources/inspector/inspector.js'],
319 'action': ['python', '<@(_script_name)', '<@(_input_page)', '<@(_search_path)', '<@(_outputs)'],
323 'target_name': 'concatenated_devtools_elements_js',
326 'action_name': 'concatenate_devtools_elements_js',
327 'script_name': 'scripts/inline_js_imports.py',
328 'input_file': 'front_end/ElementsPanel.js',
331 '<@(devtools_elements_js_files)',
333 'search_path': 'front_end',
334 'outputs': ['<(PRODUCT_DIR)/resources/inspector/ElementsPanel.js'],
335 'action': ['python', '<@(_script_name)', '<@(_input_file)', '<@(_search_path)', '<@(_outputs)'],
339 'target_name': 'concatenated_devtools_resources_js',
342 'action_name': 'concatenate_devtools_resources_js',
343 'script_name': 'scripts/inline_js_imports.py',
344 'input_file': 'front_end/ResourcesPanel.js',
347 '<@(devtools_resources_js_files)',
349 'search_path': 'front_end',
350 'outputs': ['<(PRODUCT_DIR)/resources/inspector/ResourcesPanel.js'],
351 'action': ['python', '<@(_script_name)', '<@(_input_file)', '<@(_search_path)', '<@(_outputs)'],
355 'target_name': 'concatenated_devtools_network_js',
358 'action_name': 'concatenate_devtools_network_js',
359 'script_name': 'scripts/inline_js_imports.py',
360 'input_file': 'front_end/NetworkPanel.js',
363 '<@(devtools_network_js_files)',
365 'search_path': 'front_end',
366 'outputs': ['<(PRODUCT_DIR)/resources/inspector/NetworkPanel.js'],
367 'action': ['python', '<@(_script_name)', '<@(_input_file)', '<@(_search_path)', '<@(_outputs)'],
371 'target_name': 'concatenated_devtools_extensions_js',
374 'action_name': 'concatenate_devtools_extensions_js',
375 'script_name': 'scripts/inline_js_imports.py',
376 'input_file': 'front_end/ExtensionServer.js',
379 '<@(devtools_extensions_js_files)',
381 'search_path': 'front_end',
382 'outputs': ['<(PRODUCT_DIR)/resources/inspector/ExtensionServer.js'],
383 'action': ['python', '<@(_script_name)', '<@(_input_file)', '<@(_search_path)', '<@(_outputs)'],
387 'target_name': 'concatenated_devtools_scripts_js',
390 'action_name': 'concatenate_devtools_scripts_js',
391 'script_name': 'scripts/inline_js_imports.py',
392 'input_file': 'front_end/SourcesPanel.js',
395 '<@(devtools_scripts_js_files)',
397 'search_path': 'front_end',
398 'outputs': ['<(PRODUCT_DIR)/resources/inspector/SourcesPanel.js'],
399 'action': ['python', '<@(_script_name)', '<@(_input_file)', '<@(_search_path)', '<@(_outputs)'],
403 'target_name': 'concatenated_devtools_timeline_js',
406 'action_name': 'concatenate_devtools_timeline_js',
407 'script_name': 'scripts/inline_js_imports.py',
408 'input_file': 'front_end/TimelinePanel.js',
411 '<@(devtools_timeline_js_files)',
413 'search_path': 'front_end',
414 'outputs': ['<(PRODUCT_DIR)/resources/inspector/TimelinePanel.js'],
415 'action': ['python', '<@(_script_name)', '<@(_input_file)', '<@(_search_path)', '<@(_outputs)'],
419 'target_name': 'concatenated_devtools_profiles_js',
422 'action_name': 'concatenate_devtools_profiles_js',
423 'script_name': 'scripts/inline_js_imports.py',
424 'input_file': 'front_end/ProfilesPanel.js',
427 '<@(devtools_profiles_js_files)',
429 'search_path': 'front_end',
430 'outputs': ['<(PRODUCT_DIR)/resources/inspector/ProfilesPanel.js'],
431 'action': ['python', '<@(_script_name)', '<@(_input_file)', '<@(_search_path)', '<@(_outputs)'],
435 'target_name': 'concatenated_devtools_audits_js',
438 'action_name': 'concatenate_devtools_audits_js',
439 'script_name': 'scripts/inline_js_imports.py',
440 'input_file': 'front_end/AuditsPanel.js',
443 '<@(devtools_audits_js_files)',
445 'search_path': 'front_end',
446 'outputs': ['<(PRODUCT_DIR)/resources/inspector/AuditsPanel.js'],
447 'action': ['python', '<@(_script_name)', '<@(_input_file)', '<@(_search_path)', '<@(_outputs)'],
451 'target_name': 'concatenated_devtools_codemirror_js',
454 'action_name': 'concatenate_devtools_codemirror_js',
455 'script_name': 'scripts/inline_js_imports.py',
456 'input_file': 'front_end/CodeMirrorTextEditor.js',
459 '<@(devtools_codemirror_js_files)',
460 '<@(devtools_cm_files)',
462 'search_path': 'front_end',
463 'outputs': ['<(PRODUCT_DIR)/resources/inspector/CodeMirrorTextEditor.js'],
464 'action': ['python', '<@(_script_name)', '<@(_input_file)', '<@(_search_path)', '<@(_outputs)'],
468 'target_name': 'concatenated_heap_snapshot_worker_js',
471 'action_name': 'concatenate_heap_snapshot_worker_js',
472 'script_name': 'scripts/inline_js_imports.py',
473 'input_file': 'front_end/HeapSnapshotWorker.js',
477 '<@(devtools_heap_snapshot_worker_js_files)',
479 'search_path': 'front_end',
480 'outputs': ['<(PRODUCT_DIR)/resources/inspector/HeapSnapshotWorker.js'],
481 'action': ['python', '<@(_script_name)', '<@(_input_file)', '<@(_search_path)', '<@(_outputs)'],
485 'target_name': 'concatenated_script_formatter_worker_js',
488 'action_name': 'concatenate_script_formatter_worker_js',
489 'script_name': 'scripts/inline_js_imports.py',
490 'input_file': 'front_end/ScriptFormatterWorker.js',
494 '<@(devtools_uglify_files)'
496 'search_path': 'front_end',
497 'outputs': ['<(PRODUCT_DIR)/resources/inspector/ScriptFormatterWorker.js'],
498 'action': ['python', '<@(_script_name)', '<@(_input_file)', '<@(_search_path)', '<@(_outputs)'],
502 'target_name': 'concatenated_temp_storage_shared_worker_js',
505 'action_name': 'concatenate_temp_storage_shared_worker_js',
506 'script_name': 'scripts/inline_js_imports.py',
507 'input_file': 'front_end/TempStorageSharedWorker.js',
510 '<@(devtools_temp_storage_shared_worker_js_files)'
512 'search_path': 'front_end',
513 'outputs': ['<(PRODUCT_DIR)/resources/inspector/TempStorageSharedWorker.js'],
514 'action': ['python', '<@(_script_name)', '<@(_input_file)', '<@(_search_path)', '<@(_outputs)'],
518 'target_name': 'concatenated_devtools_layers_js',
521 'action_name': 'concatenate_devtools_layers_js',
522 'script_name': 'scripts/inline_js_imports.py',
523 'input_file': 'front_end/LayersPanel.js',
526 '<@(devtools_layers_js_files)',
528 'search_path': 'front_end',
529 'outputs': ['<(PRODUCT_DIR)/resources/inspector/LayersPanel.js'],
530 'action': ['python', '<@(_script_name)', '<@(_input_file)', '<@(_search_path)', '<@(_outputs)'],
534 'target_name': 'concatenated_devtools_css',
540 'action_name': 'concatenate_devtools_css',
541 'script_name': 'scripts/concatenate_css_files.py',
542 'input_page': 'front_end/inspector.html',
546 '<@(devtools_files)',
548 'search_path': [ 'front_end' ],
549 'outputs': ['<(PRODUCT_DIR)/resources/inspector/inspector.css'],
550 'action': ['python', '<@(_script_name)', '<@(_input_page)', '<@(_search_path)', '<@(_outputs)'],
553 'destination': '<(PRODUCT_DIR)/resources/inspector',
555 '<@(devtools_standalone_files)',