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

Side by Side Diff: Source/devtools/devtools.gyp

Issue 646413002: DevTools: Refactor build script to copy module files in debug_devtools mode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename root -> src_dir Created 6 years, 2 months 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 | « Source/devtools/BUILD.gn ('k') | Source/devtools/devtools.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 1 #
2 # Copyright (C) 2013 Google Inc. All rights reserved. 2 # Copyright (C) 2013 Google Inc. All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 19 matching lines...) Expand all
30 30
31 { 31 {
32 'includes': [ 32 'includes': [
33 'devtools.gypi', 33 'devtools.gypi',
34 ], 34 ],
35 'targets': [ 35 'targets': [
36 { 36 {
37 'target_name': 'devtools_frontend_resources', 37 'target_name': 'devtools_frontend_resources',
38 'type': 'none', 38 'type': 'none',
39 'dependencies': [ 39 'dependencies': [
40 'devtools_html',
41 'toolbox_html',
42 'supported_css_properties', 40 'supported_css_properties',
43 'frontend_protocol_sources', 41 'frontend_protocol_sources',
44 'build_applications', 42 'build_applications',
45 ], 43 ],
46 'conditions': [ 44 'conditions': [
47 ['debug_devtools==0', { 45 ['debug_devtools==0', {
48 'dependencies': [ 46 'dependencies': [
49 'copy_standalone_css', 47 'copy_standalone_css',
50 'concatenated_devtools_css', 48 'concatenated_devtools_css',
51 'concatenated_toolbox_css', 49 'concatenated_toolbox_css',
52 ], 50 ],
53 }], 51 }],
54 ], 52 ],
55 'copies': [ 53 'copies': [
56 { 54 {
57 'destination': '<(PRODUCT_DIR)/resources/inspector/Images', 55 'destination': '<(PRODUCT_DIR)/resources/inspector/Images',
58 'files': [ 56 'files': [
59 '<@(devtools_image_files)', 57 '<@(devtools_image_files)',
60 ], 58 ],
61 }, 59 },
62 ], 60 ],
63 }, 61 },
64 { 62 {
65 'target_name': 'devtools_html',
66 'type': 'none',
67 'sources': ['front_end/devtools.html'],
68 'actions': [{
69 'action_name': 'devtools_html',
70 'script_name': 'scripts/generate_devtools_html.py',
71 'input_page': 'front_end/devtools.html',
72 'inputs': [
73 '<@(_script_name)',
74 '<@(_input_page)',
75 ],
76 'outputs': ['<(PRODUCT_DIR)/resources/inspector/devtools.html'],
77 'action': ['python', '<@(_script_name)', '<@(_input_page)', '<@( _outputs)', '<@(debug_devtools)'],
78 }],
79 },
80 {
81 'target_name': 'toolbox_html',
82 'type': 'none',
83 'sources': ['front_end/toolbox.html'],
84 'actions': [{
85 'action_name': 'toolbox_html',
86 'script_name': 'scripts/generate_devtools_html.py',
87 'input_page': 'front_end/toolbox.html',
88 'inputs': [
89 '<@(_script_name)',
90 '<@(_input_page)',
91 ],
92 'outputs': ['<(PRODUCT_DIR)/resources/inspector/toolbox.html'],
93 'action': ['python', '<@(_script_name)', '<@(_input_page)', '<@( _outputs)', '<@(debug_devtools)'],
94 }],
95 },
96 {
97 'target_name': 'devtools_extension_api', 63 'target_name': 'devtools_extension_api',
98 'type': 'none', 64 'type': 'none',
99 'actions': [{ 65 'actions': [{
100 'action_name': 'devtools_extension_api', 66 'action_name': 'devtools_extension_api',
101 'script_name': 'scripts/generate_devtools_extension_api.py', 67 'script_name': 'scripts/generate_devtools_extension_api.py',
102 'inputs': [ 68 'inputs': [
103 '<@(_script_name)', 69 '<@(_script_name)',
104 '<@(devtools_extension_api_files)', 70 '<@(devtools_extension_api_files)',
105 ], 71 ],
106 'outputs': ['<(PRODUCT_DIR)/resources/inspector/devtools_extensi on_api.js'], 72 'outputs': ['<(PRODUCT_DIR)/resources/inspector/devtools_extensi on_api.js'],
107 'action': ['python', '<@(_script_name)', '<@(_outputs)', '<@(dev tools_extension_api_files)'], 73 'action': ['python', '<@(_script_name)', '<@(_outputs)', '<@(dev tools_extension_api_files)'],
108 }], 74 }],
109 }, 75 },
110 { 76 {
111 'target_name': 'generate_devtools_grd', 77 'target_name': 'generate_devtools_grd',
112 'type': 'none', 78 'type': 'none',
113 'dependencies': [ 79 'dependencies': [
114 'devtools_html',
115 'toolbox_html',
116 'devtools_extension_api', 80 'devtools_extension_api',
117 'devtools_frontend_resources', 81 'devtools_frontend_resources',
118 ], 82 ],
119 'conditions': [ 83 'conditions': [
120 ['debug_devtools==0', { 84 ['debug_devtools==0', {
121 'actions': [{ 85 'actions': [{
122 'action_name': 'generate_devtools_grd', 86 'action_name': 'generate_devtools_grd',
123 'script_name': 'scripts/generate_devtools_grd.py', 87 'script_name': 'scripts/generate_devtools_grd.py',
124 'relative_path_dirs': [ 88 'relative_path_dirs': [
125 '<(PRODUCT_DIR)/resources/inspector', 89 '<(PRODUCT_DIR)/resources/inspector',
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 ], 218 ],
255 'message': 'Generating supported CSS properties for front end', 219 'message': 'Generating supported CSS properties for front end',
256 }, 220 },
257 ] 221 ]
258 }, 222 },
259 223
260 # Frontend applications and modules. 224 # Frontend applications and modules.
261 { 225 {
262 'target_name': 'build_applications', 226 'target_name': 'build_applications',
263 'type': 'none', 227 'type': 'none',
264 'conditions': [ 228 'dependencies': [
265 ['debug_devtools==0', { # Release 229 'supported_css_properties',
266 'dependencies': [ 230 'frontend_protocol_sources',
267 'devtools_html', 231 ],
268 'toolbox_html', 232 'output_path': '<(PRODUCT_DIR)/resources/inspector/',
269 'supported_css_properties', 233 'actions': [{
270 'frontend_protocol_sources', 234 'action_name': 'build_applications',
271 ], 235 'script_name': 'scripts/build_applications.py',
272 'actions': [{ 236 'helper_scripts': [
273 'action_name': 'build_applications', 237 'scripts/modular_build.py',
274 'script_name': 'scripts/build_applications.py', 238 'scripts/concatenate_application_code.py',
275 'helper_scripts': [ 239 ],
276 'scripts/modular_build.py', 240 'inputs': [
277 'scripts/concatenate_application_code.py', 241 '<@(_script_name)',
278 ], 242 '<@(_helper_scripts)',
279 'inputs': [ 243 '<@(all_devtools_files)',
280 '<@(_script_name)', 244 '<(_output_path)/InspectorBackendCommands.js',
281 '<@(_helper_scripts)', 245 '<(_output_path)/SupportedCSSProperties.js',
282 '<@(all_devtools_files)', 246 ],
283 '<(PRODUCT_DIR)/resources/inspector/InspectorBackend Commands.js', 247 'action': ['python', '<@(_script_name)', 'devtools', 'toolbox', '--input_path', 'front_end', '--output_path', '<@(_output_path)', '--debug', '<@ (debug_devtools)'],
284 '<(PRODUCT_DIR)/resources/inspector/SupportedCSSProp erties.js', 248 'conditions': [
285 ], 249 ['debug_devtools==0', { # Release
286 'output_path': '<(PRODUCT_DIR)/resources/inspector/',
287 'outputs': [ 250 'outputs': [
288 '<(_output_path)/devtools.js', 251 '<(_output_path)/devtools.js',
252 '<(_output_path)/devtools.html',
289 '<(_output_path)/toolbox.js', 253 '<(_output_path)/toolbox.js',
254 '<(_output_path)/toolbox.html',
290 '<(_output_path)/audits_module.js', 255 '<(_output_path)/audits_module.js',
291 '<(_output_path)/console_module.js', 256 '<(_output_path)/console_module.js',
292 '<(_output_path)/devices_module.js', 257 '<(_output_path)/devices_module.js',
293 '<(_output_path)/documentation_module.js', 258 '<(_output_path)/documentation_module.js',
294 '<(_output_path)/elements_module.js', 259 '<(_output_path)/elements_module.js',
295 '<(_output_path)/extensions_module.js', 260 '<(_output_path)/extensions_module.js',
296 '<(_output_path)/heap_snapshot_worker_module.js', 261 '<(_output_path)/heap_snapshot_worker_module.js',
297 '<(_output_path)/layers_module.js', 262 '<(_output_path)/layers_module.js',
298 '<(_output_path)/network_module.js', 263 '<(_output_path)/network_module.js',
299 '<(_output_path)/profiler_module.js', 264 '<(_output_path)/profiler_module.js',
300 '<(_output_path)/promises_module.js', 265 '<(_output_path)/promises_module.js',
301 '<(_output_path)/resources_module.js', 266 '<(_output_path)/resources_module.js',
302 '<(_output_path)/script_formatter_worker_module.js', 267 '<(_output_path)/script_formatter_worker_module.js',
303 '<(_output_path)/settings_module.js', 268 '<(_output_path)/settings_module.js',
304 '<(_output_path)/source_frame_module.js', 269 '<(_output_path)/source_frame_module.js',
305 '<(_output_path)/sources_module.js', 270 '<(_output_path)/sources_module.js',
306 '<(_output_path)/temp_storage_shared_worker_module.j s', 271 '<(_output_path)/temp_storage_shared_worker_module.j s',
307 '<(_output_path)/timeline_module.js', 272 '<(_output_path)/timeline_module.js',
308 ], 273 ],
309 'action': ['python', '<@(_script_name)', 'devtools', 'to olbox', '--input_path', 'front_end', '--output_path', '<@(_output_path)', '--deb ug', '<@(debug_devtools)'], 274 },
275 { # Debug
276 'outputs': [
277 '<(_output_path)/devtools.html',
278 '<(_output_path)/toolbox.html',
279 ]
310 }] 280 }]
281 ]
282 }],
283 'conditions': [
284 ['debug_devtools==0', { # Release
311 }, 285 },
312 { # Debug 286 { # Debug
313 # Copy Runtime.js and all modules of all applications here. 287 # Copy runtime core and non-module directories here.
314 'app_target': '<(PRODUCT_DIR)/resources/inspector',
315 'copies': [ 288 'copies': [
316 { 289 {
317 'destination': '<(_app_target)', 290 'destination': '<(_output_path)',
318 'files': [ 291 'files': [
319 '<@(devtools_core_base_files)', 292 '<@(devtools_core_base_non_generated_files)',
320 ], 293 ],
321 }, 294 },
322 { 295 {
323 'destination': '<(_app_target)/common', 296 'destination': '<(_output_path)/UglifyJS',
324 'files': [
325 '<@(devtools_common_js_files)',
326 'front_end/common/module.json',
327 ],
328 },
329 {
330 'destination': '<(_app_target)/components',
331 'files': [
332 '<@(devtools_components_js_files)',
333 'front_end/components/module.json',
334 ],
335 },
336 {
337 'destination': '<(_app_target)/sdk',
338 'files': [
339 '<@(devtools_sdk_js_files)',
340 'front_end/sdk/module.json',
341 ],
342 },
343 {
344 'destination': '<(_app_target)/workspace',
345 'files': [
346 '<@(devtools_workspace_js_files)',
347 'front_end/workspace/module.json',
348 ],
349 },
350 {
351 'destination': '<(_app_target)/bindings',
352 'files': [
353 '<@(devtools_bindings_js_files)',
354 'front_end/bindings/module.json',
355 ],
356 },
357 {
358 'destination': '<(_app_target)/ui',
359 'files': [
360 '<@(devtools_ui_js_files)',
361 'front_end/ui/module.json',
362 ],
363 },
364 {
365 'destination': '<(_app_target)/host',
366 'files': [
367 '<@(devtools_host_js_files)',
368 'front_end/host/module.json',
369 ],
370 },
371 {
372 'destination': '<(_app_target)/screencast',
373 'files': [
374 '<@(devtools_screencast_js_files)',
375 'front_end/screencast/module.json',
376 ],
377 },
378 {
379 'destination': '<(_app_target)/toolbox',
380 'files': [
381 '<@(devtools_toolbox_js_files)',
382 'front_end/toolbox/module.json',
383 ],
384 },
385 {
386 'destination': '<(_app_target)/toolbox_bootstrap',
387 'files': [
388 '<@(devtools_toolbox_bootstrap_js_files)',
389 'front_end/toolbox_bootstrap/module.json',
390 ],
391 },
392 {
393 'destination': '<(_app_target)/main',
394 'files': [
395 '<@(devtools_main_js_files)',
396 'front_end/main/module.json',
397 ],
398 },
399 {
400 'destination': '<(_app_target)/audits',
401 'files': [
402 '<@(devtools_audits_js_files)',
403 'front_end/audits/module.json',
404 ],
405 },
406 {
407 'destination': '<(_app_target)/console',
408 'files': [
409 '<@(devtools_console_js_files)',
410 'front_end/console/module.json',
411 ],
412 },
413 {
414 'destination': '<(_app_target)/devices',
415 'files': [
416 '<@(devtools_devices_js_files)',
417 'front_end/devices/module.json',
418 ],
419 },
420 {
421 'destination': '<(_app_target)/documentation',
422 'files': [
423 '<@(devtools_documentation_js_files)',
424 'front_end/documentation/module.json',
425 ],
426 },
427 {
428 'destination': '<(_app_target)/elements',
429 'files': [
430 '<@(devtools_elements_js_files)',
431 'front_end/elements/module.json',
432 ],
433 },
434 {
435 'destination': '<(_app_target)/extensions',
436 'files': [
437 '<@(devtools_extensions_js_files)',
438 'front_end/extensions/module.json',
439 ],
440 },
441 {
442 'destination': '<(_app_target)/heap_snapshot_worker' ,
443 'files': [
444 '<@(devtools_heap_snapshot_worker_js_files)',
445 'front_end/heap_snapshot_worker/module.json',
446 ],
447 },
448 {
449 'destination': '<(_app_target)/layers',
450 'files': [
451 '<@(devtools_layers_js_files)',
452 'front_end/layers/module.json',
453 ],
454 },
455 {
456 'destination': '<(_app_target)/network',
457 'files': [
458 '<@(devtools_network_js_files)',
459 'front_end/network/module.json',
460 ],
461 },
462 {
463 'destination': '<(_app_target)/profiler',
464 'files': [
465 '<@(devtools_profiler_js_files)',
466 'front_end/profiler/module.json',
467 ],
468 },
469 {
470 'destination': '<(_app_target)/promises',
471 'files': [
472 '<@(devtools_promises_js_files)',
473 'front_end/promises/module.json',
474 ],
475 },
476 {
477 'destination': '<(_app_target)/resources',
478 'files': [
479 '<@(devtools_resources_js_files)',
480 'front_end/resources/module.json',
481 ],
482 },
483 {
484 'destination': '<(_app_target)/script_formatter_work er',
485 'files': [
486 # FIXME: This will excessively copy files from c ommon/ and cm/ folders into worker folder, which is fine for the debug mode.
487 '<@(devtools_script_formatter_worker_js_files)',
488 'front_end/script_formatter_worker/module.json',
489 ],
490 },
491 {
492 'destination': '<(_app_target)/UglifyJS',
493 'files': [ 297 'files': [
494 '<@(devtools_uglify_files)', 298 '<@(devtools_uglify_files)',
495 ], 299 ],
496 }, 300 },
497 { 301 {
498 'destination': '<(_app_target)/settings', 302 'destination': '<(_output_path)/cm',
499 'files': [
500 '<@(devtools_settings_js_files)',
501 'front_end/settings/module.json',
502 ],
503 },
504 {
505 'destination': '<(_app_target)/source_frame',
506 'files': [
507 '<@(devtools_source_frame_js_files)',
508 'front_end/source_frame/module.json',
509 ],
510 },
511 {
512 'destination': '<(_app_target)/cm',
513 'files': [ 303 'files': [
514 '<@(devtools_cm_js_files)', 304 '<@(devtools_cm_js_files)',
515 '<@(devtools_cm_css_files)', 305 '<@(devtools_cm_css_files)',
516 ], 306 ],
517 }, 307 },
518 {
519 'destination': '<(_app_target)/sources',
520 'files': [
521 '<@(devtools_sources_js_files)',
522 'front_end/sources/module.json',
523 ],
524 },
525 {
526 'destination': '<(_app_target)/temp_storage_shared_w orker',
527 'files': [
528 '<@(devtools_temp_storage_shared_worker_js_files )',
529 'front_end/temp_storage_shared_worker/module.jso n',
530 ],
531 },
532 {
533 'destination': '<(_app_target)/timeline',
534 'files': [
535 '<@(devtools_timeline_js_files)',
536 'front_end/timeline/module.json',
537 ],
538 }
539 ] 308 ]
540 }] 309 }]
541 ] 310 ]
542 }, 311 },
543 ], # targets 312 ], # targets
544 'conditions': [ 313 'conditions': [
545 ['debug_devtools==0', { 314 ['debug_devtools==0', {
546 'targets': [ 315 'targets': [
547 { 316 {
548 'target_name': 'copy_standalone_css', 317 'target_name': 'copy_standalone_css',
549 'type': 'none', 318 'type': 'none',
550 'copies': [{ 319 'copies': [{
551 'destination': '<(PRODUCT_DIR)/resources/inspector', 320 'destination': '<(PRODUCT_DIR)/resources/inspector',
552 'files': [ 321 'files': [
553 '<@(devtools_standalone_files)', 322 '<@(devtools_standalone_files)',
554 ], 323 ],
555 }, 324 },
556 { 325 {
557 'destination': '<(PRODUCT_DIR)/resources/inspector/cm', 326 'destination': '<(PRODUCT_DIR)/resources/inspector/cm',
558 'files': [ 327 'files': [
559 '<@(devtools_cm_css_files)', 328 '<@(devtools_cm_css_files)',
560 ], 329 ],
561 }], 330 }],
562 }, 331 },
563 { 332 {
564 'target_name': 'concatenated_devtools_css', 333 'target_name': 'concatenated_devtools_css',
565 'type': 'none', 334 'type': 'none',
566 'dependencies': [
567 'devtools_html',
568 ],
569 'actions': [{ 335 'actions': [{
570 'action_name': 'concatenate_devtools_css', 336 'action_name': 'concatenate_devtools_css',
571 'script_name': 'scripts/concatenate_css_files.py', 337 'script_name': 'scripts/concatenate_css_files.py',
572 'input_stylesheet': 'front_end/devtools.css', 338 'input_stylesheet': 'front_end/devtools.css',
573 'inputs': [ 339 'inputs': [
574 '<@(_script_name)', 340 '<@(_script_name)',
575 '<@(_input_stylesheet)', 341 '<@(_input_stylesheet)',
576 '<@(devtools_core_base_files)', 342 '<@(devtools_core_base_files)',
577 ], 343 ],
578 'search_path': [ 'front_end' ], 344 'search_path': [ 'front_end' ],
579 'outputs': ['<(PRODUCT_DIR)/resources/inspector/devtools .css'], 345 'outputs': ['<(PRODUCT_DIR)/resources/inspector/devtools .css'],
580 'action': ['python', '<@(_script_name)', '<@(_input_styl esheet)', '<@(_outputs)'], 346 'action': ['python', '<@(_script_name)', '<@(_input_styl esheet)', '<@(_outputs)'],
581 }], 347 }],
582 }, 348 },
583 { 349 {
584 'target_name': 'concatenated_toolbox_css', 350 'target_name': 'concatenated_toolbox_css',
585 'type': 'none', 351 'type': 'none',
586 'dependencies': [
587 'toolbox_html',
588 ],
589 'actions': [{ 352 'actions': [{
590 'action_name': 'concatenate_toolbox_css', 353 'action_name': 'concatenate_toolbox_css',
591 'script_name': 'scripts/concatenate_css_files.py', 354 'script_name': 'scripts/concatenate_css_files.py',
592 'input_stylesheet': 'front_end/toolbox.css', 355 'input_stylesheet': 'front_end/toolbox.css',
593 'inputs': [ 356 'inputs': [
594 '<@(_script_name)', 357 '<@(_script_name)',
595 '<@(_input_stylesheet)', 358 '<@(_input_stylesheet)',
596 '<@(devtools_core_base_files)', 359 '<@(devtools_core_base_files)',
597 ], 360 ],
598 'search_path': [ 'front_end' ], 361 'search_path': [ 'front_end' ],
599 'outputs': ['<(PRODUCT_DIR)/resources/inspector/toolbox. css'], 362 'outputs': ['<(PRODUCT_DIR)/resources/inspector/toolbox. css'],
600 'action': ['python', '<@(_script_name)', '<@(_input_styl esheet)', '<@(_outputs)'], 363 'action': ['python', '<@(_script_name)', '<@(_input_styl esheet)', '<@(_outputs)'],
601 }], 364 }],
602 }, 365 },
603 ], 366 ],
604 }], 367 }],
605 ], # conditions 368 ], # conditions
606 } 369 }
OLDNEW
« no previous file with comments | « Source/devtools/BUILD.gn ('k') | Source/devtools/devtools.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698