• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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      'actions': [
17        {
18          'action_name': 'convert_js_to_cpp_char_array',
19          'inputs': [
20            'build/xxd.py',
21            '<(inspector_injected_script_source)',
22          ],
23          'outputs': [
24            '<(inspector_generated_injected_script)',
25          ],
26          'action': [
27            'python',
28            'build/xxd.py',
29            'InjectedScriptSource_js',
30            'injected-script-source.js',
31            '<@(_outputs)'
32          ],
33        },
34      ],
35      # Since this target generates header files, it needs to be a hard dependency.
36      'hard_dependency': 1,
37    },
38    { 'target_name': 'inspector_debugger_script',
39      'type': 'none',
40      'actions': [
41        {
42          'action_name': 'convert_js_to_cpp_char_array',
43          'inputs': [
44            'build/xxd.py',
45            '<(inspector_debugger_script_source)',
46          ],
47          'outputs': [
48            '<(inspector_generated_debugger_script)',
49          ],
50          'action': [
51            'python',
52            'build/xxd.py',
53            'DebuggerScript_js',
54            'debugger-script.js',
55            '<@(_outputs)'
56          ],
57        },
58      ],
59      # Since this target generates header files, it needs to be a hard dependency.
60      'hard_dependency': 1,
61    },
62    { 'target_name': 'protocol_compatibility',
63      'type': 'none',
64      'actions': [
65        {
66          'action_name': 'protocol_compatibility',
67          'inputs': [
68            'js_protocol.json',
69          ],
70          'outputs': [
71            '<@(SHARED_INTERMEDIATE_DIR)/src/js_protocol.stamp',
72          ],
73          'action': [
74            'python',
75            '<(protocol_path)/CheckProtocolCompatibility.py',
76            '--stamp', '<@(_outputs)',
77            'js_protocol.json',
78          ],
79          'message': 'Generating inspector protocol sources from protocol json definition',
80        },
81      ]
82    },
83    { 'target_name': 'protocol_generated_sources',
84      'type': 'none',
85      'dependencies': [ 'protocol_compatibility' ],
86      'actions': [
87        {
88          'action_name': 'protocol_generated_sources',
89          'inputs': [
90            'js_protocol.json',
91            'inspector_protocol_config.json',
92            '<@(inspector_protocol_files)',
93          ],
94          'outputs': [
95            '<@(inspector_generated_sources)',
96          ],
97          'action': [
98            'python',
99            '<(protocol_path)/CodeGenerator.py',
100            '--jinja_dir', '../../third_party',
101            '--output_base', '<(SHARED_INTERMEDIATE_DIR)/src/inspector',
102            '--config', 'inspector_protocol_config.json',
103          ],
104          'message': 'Generating inspector protocol sources from protocol json',
105        },
106      ]
107    },
108  ],
109}
110