1# Copyright 2016 the V8 project 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 'variables': { 7 'protocol_path': '../../third_party/inspector_protocol', 8 }, 9 'includes': [ 10 'inspector.gypi', 11 '<(PRODUCT_DIR)/../../../third_party/inspector_protocol/inspector_protocol.gypi', 12 ], 13 'targets': [ 14 { 'target_name': 'inspector_injected_script', 15 'type': 'none', 16 'conditions': [ 17 ['want_separate_host_toolset==1', { 18 'toolsets': ['host', 'target'], 19 }, { 20 'toolsets': ['target'], 21 }] 22 ], 23 'actions': [ 24 { 25 'action_name': 'convert_js_to_cpp_char_array', 26 'inputs': [ 27 'build/xxd.py', 28 '<(inspector_injected_script_source)', 29 ], 30 'outputs': [ 31 '<(inspector_generated_injected_script)', 32 ], 33 'action': [ 34 'python', 35 'build/xxd.py', 36 'InjectedScriptSource_js', 37 'injected-script-source.js', 38 '<@(_outputs)' 39 ], 40 }, 41 ], 42 # Since this target generates header files, it needs to be a hard dependency. 43 'hard_dependency': 1, 44 }, 45 { 'target_name': 'inspector_debugger_script', 46 'type': 'none', 47 'conditions': [ 48 ['want_separate_host_toolset==1', { 49 'toolsets': ['host', 'target'], 50 }, { 51 'toolsets': ['target'], 52 }] 53 ], 54 'actions': [ 55 { 56 'action_name': 'convert_js_to_cpp_char_array', 57 'inputs': [ 58 'build/xxd.py', 59 '<(inspector_debugger_script_source)', 60 ], 61 'outputs': [ 62 '<(inspector_generated_debugger_script)', 63 ], 64 'action': [ 65 'python', 66 'build/xxd.py', 67 'DebuggerScript_js', 68 'debugger-script.js', 69 '<@(_outputs)' 70 ], 71 }, 72 ], 73 # Since this target generates header files, it needs to be a hard dependency. 74 'hard_dependency': 1, 75 }, 76 { 'target_name': 'protocol_compatibility', 77 'type': 'none', 78 'conditions': [ 79 ['want_separate_host_toolset==1', { 80 'toolsets': ['host', 'target'], 81 }, { 82 'toolsets': ['target'], 83 }] 84 ], 85 'actions': [ 86 { 87 'action_name': 'protocol_compatibility', 88 'inputs': [ 89 'js_protocol.json', 90 ], 91 'outputs': [ 92 '<@(SHARED_INTERMEDIATE_DIR)/src/js_protocol.stamp', 93 ], 94 'action': [ 95 'python', 96 '<(protocol_path)/CheckProtocolCompatibility.py', 97 '--stamp', '<@(_outputs)', 98 'js_protocol.json', 99 ], 100 'message': 'Generating inspector protocol sources from protocol json definition', 101 }, 102 ] 103 }, 104 { 'target_name': 'protocol_generated_sources', 105 'type': 'none', 106 'dependencies': [ 'protocol_compatibility' ], 107 'conditions': [ 108 ['want_separate_host_toolset==1', { 109 'toolsets': ['host', 'target'], 110 }, { 111 'toolsets': ['target'], 112 }] 113 ], 114 'actions': [ 115 { 116 'action_name': 'protocol_generated_sources', 117 'inputs': [ 118 'js_protocol.json', 119 'inspector_protocol_config.json', 120 '<@(inspector_protocol_files)', 121 ], 122 'outputs': [ 123 '<@(inspector_generated_sources)', 124 ], 125 'action': [ 126 'python', 127 '<(protocol_path)/CodeGenerator.py', 128 '--jinja_dir', '../../third_party', 129 '--output_base', '<(SHARED_INTERMEDIATE_DIR)/src/inspector', 130 '--config', 'inspector_protocol_config.json', 131 ], 132 'message': 'Generating inspector protocol sources from protocol json', 133 }, 134 ] 135 }, 136 ], 137} 138